1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Nosql
  5. getIndex
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

oci.Nosql.getIndex

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    This data source provides details about a specific Index resource in Oracle Cloud Infrastructure NoSQL Database service.

    Get information about a single index.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testIndex = oci.Nosql.getIndex({
        indexName: testIndexOciNosqlIndex.name,
        tableNameOrId: testTableNameOr.id,
        compartmentId: compartmentId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_index = oci.Nosql.get_index(index_name=test_index_oci_nosql_index["name"],
        table_name_or_id=test_table_name_or["id"],
        compartment_id=compartment_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Nosql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Nosql.GetIndex(ctx, &nosql.GetIndexArgs{
    			IndexName:     testIndexOciNosqlIndex.Name,
    			TableNameOrId: testTableNameOr.Id,
    			CompartmentId: compartmentId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testIndex = Oci.Nosql.GetIndex.Invoke(new()
        {
            IndexName = testIndexOciNosqlIndex.Name,
            TableNameOrId = testTableNameOr.Id,
            CompartmentId = compartmentId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Nosql.NosqlFunctions;
    import com.pulumi.oci.Nosql.inputs.GetIndexArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testIndex = NosqlFunctions.getIndex(GetIndexArgs.builder()
                .indexName(testIndexOciNosqlIndex.name())
                .tableNameOrId(testTableNameOr.id())
                .compartmentId(compartmentId)
                .build());
    
        }
    }
    
    variables:
      testIndex:
        fn::invoke:
          Function: oci:Nosql:getIndex
          Arguments:
            indexName: ${testIndexOciNosqlIndex.name}
            tableNameOrId: ${testTableNameOr.id}
            compartmentId: ${compartmentId}
    

    Using getIndex

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getIndex(args: GetIndexArgs, opts?: InvokeOptions): Promise<GetIndexResult>
    function getIndexOutput(args: GetIndexOutputArgs, opts?: InvokeOptions): Output<GetIndexResult>
    def get_index(compartment_id: Optional[str] = None,
                  index_name: Optional[str] = None,
                  table_name_or_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetIndexResult
    def get_index_output(compartment_id: Optional[pulumi.Input[str]] = None,
                  index_name: Optional[pulumi.Input[str]] = None,
                  table_name_or_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetIndexResult]
    func GetIndex(ctx *Context, args *GetIndexArgs, opts ...InvokeOption) (*GetIndexResult, error)
    func GetIndexOutput(ctx *Context, args *GetIndexOutputArgs, opts ...InvokeOption) GetIndexResultOutput

    > Note: This function is named GetIndex in the Go SDK.

    public static class GetIndex 
    {
        public static Task<GetIndexResult> InvokeAsync(GetIndexArgs args, InvokeOptions? opts = null)
        public static Output<GetIndexResult> Invoke(GetIndexInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIndexResult> getIndex(GetIndexArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Nosql/getIndex:getIndex
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of a table's compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
    IndexName string
    The name of a table's index.
    TableNameOrId string
    A table name within the compartment, or a table OCID.
    CompartmentId string
    The ID of a table's compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
    IndexName string
    The name of a table's index.
    TableNameOrId string
    A table name within the compartment, or a table OCID.
    compartmentId String
    The ID of a table's compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
    indexName String
    The name of a table's index.
    tableNameOrId String
    A table name within the compartment, or a table OCID.
    compartmentId string
    The ID of a table's compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
    indexName string
    The name of a table's index.
    tableNameOrId string
    A table name within the compartment, or a table OCID.
    compartment_id str
    The ID of a table's compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
    index_name str
    The name of a table's index.
    table_name_or_id str
    A table name within the compartment, or a table OCID.
    compartmentId String
    The ID of a table's compartment. When a table is identified by name, the compartmentId is often needed to provide context for interpreting the name.
    indexName String
    The name of a table's index.
    tableNameOrId String
    A table name within the compartment, or a table OCID.

    getIndex Result

    The following output properties are available:

    CompartmentId string
    Compartment Identifier.
    Id string
    IndexName string
    IsIfNotExists bool
    Keys List<GetIndexKey>
    A set of keys for a secondary index.
    LifecycleDetails string
    A message describing the current state in more detail.
    Name string
    Index name.
    State string
    The state of an index.
    TableId string
    the OCID of the table to which this index belongs.
    TableName string
    The name of the table to which this index belongs.
    TableNameOrId string
    CompartmentId string
    Compartment Identifier.
    Id string
    IndexName string
    IsIfNotExists bool
    Keys []GetIndexKey
    A set of keys for a secondary index.
    LifecycleDetails string
    A message describing the current state in more detail.
    Name string
    Index name.
    State string
    The state of an index.
    TableId string
    the OCID of the table to which this index belongs.
    TableName string
    The name of the table to which this index belongs.
    TableNameOrId string
    compartmentId String
    Compartment Identifier.
    id String
    indexName String
    isIfNotExists Boolean
    keys List<GetIndexKey>
    A set of keys for a secondary index.
    lifecycleDetails String
    A message describing the current state in more detail.
    name String
    Index name.
    state String
    The state of an index.
    tableId String
    the OCID of the table to which this index belongs.
    tableName String
    The name of the table to which this index belongs.
    tableNameOrId String
    compartmentId string
    Compartment Identifier.
    id string
    indexName string
    isIfNotExists boolean
    keys GetIndexKey[]
    A set of keys for a secondary index.
    lifecycleDetails string
    A message describing the current state in more detail.
    name string
    Index name.
    state string
    The state of an index.
    tableId string
    the OCID of the table to which this index belongs.
    tableName string
    The name of the table to which this index belongs.
    tableNameOrId string
    compartment_id str
    Compartment Identifier.
    id str
    index_name str
    is_if_not_exists bool
    keys Sequence[nosql.GetIndexKey]
    A set of keys for a secondary index.
    lifecycle_details str
    A message describing the current state in more detail.
    name str
    Index name.
    state str
    The state of an index.
    table_id str
    the OCID of the table to which this index belongs.
    table_name str
    The name of the table to which this index belongs.
    table_name_or_id str
    compartmentId String
    Compartment Identifier.
    id String
    indexName String
    isIfNotExists Boolean
    keys List<Property Map>
    A set of keys for a secondary index.
    lifecycleDetails String
    A message describing the current state in more detail.
    name String
    Index name.
    state String
    The state of an index.
    tableId String
    the OCID of the table to which this index belongs.
    tableName String
    The name of the table to which this index belongs.
    tableNameOrId String

    Supporting Types

    GetIndexKey

    ColumnName string
    The name of a column to be included as an index key.
    JsonFieldType string
    If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
    JsonPath string
    If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.
    ColumnName string
    The name of a column to be included as an index key.
    JsonFieldType string
    If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
    JsonPath string
    If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.
    columnName String
    The name of a column to be included as an index key.
    jsonFieldType String
    If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
    jsonPath String
    If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.
    columnName string
    The name of a column to be included as an index key.
    jsonFieldType string
    If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
    jsonPath string
    If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.
    column_name str
    The name of a column to be included as an index key.
    json_field_type str
    If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
    json_path str
    If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.
    columnName String
    The name of a column to be included as an index key.
    jsonFieldType String
    If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
    jsonPath String
    If the specified column is of type JSON, jsonPath contains a dotted path indicating the field within the JSON object that will be the index key.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi