1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Nosql
  5. getIndex
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.Nosql.getIndex

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testIndex:
    fn::invoke:
      function: oci:Nosql:getIndex
      arguments:
        indexName: ${testIndexOciNosqlIndex.name}
        tableNameOrId: ${testTableNameOr.id}
        compartmentId: ${compartmentId}
Copy

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>
Copy
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]
Copy
func GetIndex(ctx *Context, args *GetIndexArgs, opts ...InvokeOption) (*GetIndexResult, error)
func GetIndexOutput(ctx *Context, args *GetIndexOutputArgs, opts ...InvokeOption) GetIndexResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetIndexResult> getIndex(GetIndexArgs args, InvokeOptions options)
public static Output<GetIndexResult> getIndex(GetIndexArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Nosql/getIndex:getIndex
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. 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 This property is required. string
The name of a table's index.
TableNameOrId This property is required. string
A table name within the compartment, or a table OCID.
CompartmentId This property is required. 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 This property is required. string
The name of a table's index.
TableNameOrId This property is required. string
A table name within the compartment, or a table OCID.
compartmentId This property is required. 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 This property is required. String
The name of a table's index.
tableNameOrId This property is required. String
A table name within the compartment, or a table OCID.
compartmentId This property is required. 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 This property is required. string
The name of a table's index.
tableNameOrId This property is required. string
A table name within the compartment, or a table OCID.
compartment_id This property is required. 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 This property is required. str
The name of a table's index.
table_name_or_id This property is required. str
A table name within the compartment, or a table OCID.
compartmentId This property is required. 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 This property is required. String
The name of a table's index.
tableNameOrId This property is required. 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 This property is required. string
The name of a column to be included as an index key.
JsonFieldType This property is required. string
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
JsonPath This property is required. 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 This property is required. string
The name of a column to be included as an index key.
JsonFieldType This property is required. string
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
JsonPath This property is required. 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 This property is required. String
The name of a column to be included as an index key.
jsonFieldType This property is required. String
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
jsonPath This property is required. 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 This property is required. string
The name of a column to be included as an index key.
jsonFieldType This property is required. string
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
jsonPath This property is required. 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 This property is required. str
The name of a column to be included as an index key.
json_field_type This property is required. str
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
json_path This property is required. 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 This property is required. String
The name of a column to be included as an index key.
jsonFieldType This property is required. String
If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
jsonPath This property is required. 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.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi