Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Nosql.getIndex
Explore with Pulumi AI
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/v2/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 LookupIndex(ctx *Context, args *LookupIndexArgs, opts ...InvokeOption) (*LookupIndexResult, error)
func LookupIndexOutput(ctx *Context, args *LookupIndexOutputArgs, opts ...InvokeOption) LookupIndexResultOutput> Note: This function is named LookupIndex 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)
public static Output<GetIndexResult> getIndex(GetIndexArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Nosql/getIndex:getIndex
  arguments:
    # arguments dictionaryThe 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.
- TableName stringOr Id 
- 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.
- TableName stringOr Id 
- 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.
- tableName StringOr Id 
- 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.
- tableName stringOr Id 
- 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_ stror_ id 
- 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.
- tableName StringOr Id 
- 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
- IsIf boolNot Exists 
- Keys
List<GetIndex Key> 
- 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.
- TableName stringOr Id 
- CompartmentId string
- Compartment Identifier.
- Id string
- IndexName string
- IsIf boolNot Exists 
- Keys
[]GetIndex Key 
- 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.
- TableName stringOr Id 
- compartmentId String
- Compartment Identifier.
- id String
- indexName String
- isIf BooleanNot Exists 
- keys
List<GetIndex Key> 
- 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.
- tableName StringOr Id 
- compartmentId string
- Compartment Identifier.
- id string
- indexName string
- isIf booleanNot Exists 
- keys
GetIndex Key[] 
- 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.
- tableName stringOr Id 
- compartment_id str
- Compartment Identifier.
- id str
- index_name str
- is_if_ boolnot_ exists 
- keys
Sequence[GetIndex Key] 
- 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_ stror_ id 
- compartmentId String
- Compartment Identifier.
- id String
- indexName String
- isIf BooleanNot Exists 
- 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.
- tableName StringOr Id 
Supporting Types
GetIndexKey  
- ColumnName string
- The name of a column to be included as an index key.
- JsonField stringType 
- 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.
- JsonField stringType 
- 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.
- jsonField StringType 
- 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.
- jsonField stringType 
- 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_ strtype 
- 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.
- jsonField StringType 
- 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 ociTerraform Provider.