Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi
oci.Nosql.getIndexes
Explore with Pulumi AI
This data source provides the list of Indexes in Oracle Cloud Infrastructure NoSQL Database service.
Get a list of indexes on a table.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testIndexes = oci.Nosql.getIndexes({
tableNameOrId: testTableNameOr.id,
compartmentId: compartmentId,
name: indexName,
state: indexState,
});
import pulumi
import pulumi_oci as oci
test_indexes = oci.Nosql.get_indexes(table_name_or_id=test_table_name_or["id"],
compartment_id=compartment_id,
name=index_name,
state=index_state)
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.GetIndexes(ctx, &nosql.GetIndexesArgs{
TableNameOrId: testTableNameOr.Id,
CompartmentId: pulumi.StringRef(compartmentId),
Name: pulumi.StringRef(indexName),
State: pulumi.StringRef(indexState),
}, 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 testIndexes = Oci.Nosql.GetIndexes.Invoke(new()
{
TableNameOrId = testTableNameOr.Id,
CompartmentId = compartmentId,
Name = indexName,
State = indexState,
});
});
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.GetIndexesArgs;
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 testIndexes = NosqlFunctions.getIndexes(GetIndexesArgs.builder()
.tableNameOrId(testTableNameOr.id())
.compartmentId(compartmentId)
.name(indexName)
.state(indexState)
.build());
}
}
variables:
testIndexes:
fn::invoke:
function: oci:Nosql:getIndexes
arguments:
tableNameOrId: ${testTableNameOr.id}
compartmentId: ${compartmentId}
name: ${indexName}
state: ${indexState}
Using getIndexes
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 getIndexes(args: GetIndexesArgs, opts?: InvokeOptions): Promise<GetIndexesResult>
function getIndexesOutput(args: GetIndexesOutputArgs, opts?: InvokeOptions): Output<GetIndexesResult>
def get_indexes(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_nosql.GetIndexesFilter]] = None,
name: Optional[str] = None,
state: Optional[str] = None,
table_name_or_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIndexesResult
def get_indexes_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_nosql.GetIndexesFilterArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
table_name_or_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIndexesResult]
func GetIndexes(ctx *Context, args *GetIndexesArgs, opts ...InvokeOption) (*GetIndexesResult, error)
func GetIndexesOutput(ctx *Context, args *GetIndexesOutputArgs, opts ...InvokeOption) GetIndexesResultOutput
> Note: This function is named GetIndexes
in the Go SDK.
public static class GetIndexes
{
public static Task<GetIndexesResult> InvokeAsync(GetIndexesArgs args, InvokeOptions? opts = null)
public static Output<GetIndexesResult> Invoke(GetIndexesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIndexesResult> getIndexes(GetIndexesArgs args, InvokeOptions options)
public static Output<GetIndexesResult> getIndexes(GetIndexesArgs args, InvokeOptions options)
fn::invoke:
function: oci:Nosql/getIndexes:getIndexes
arguments:
# arguments dictionary
The following arguments are supported:
- Table
Name Or Id This property is required. string - A table name within the compartment, or a table OCID.
- Compartment
Id 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.
- Filters
Changes to this property will trigger replacement.
Indexes Filter> - Name string
- A shell-globbing-style (*?[]) filter for names.
- State string
- Filter list by the lifecycle state of the item.
- Table
Name Or Id This property is required. string - A table name within the compartment, or a table OCID.
- Compartment
Id 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.
- Filters
Changes to this property will trigger replacement.
Indexes Filter - Name string
- A shell-globbing-style (*?[]) filter for names.
- State string
- Filter list by the lifecycle state of the item.
- table
Name Or Id This property is required. String - A table name within the compartment, or a table OCID.
- compartment
Id 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.
- filters
Changes to this property will trigger replacement.
Indexes Filter> - name String
- A shell-globbing-style (*?[]) filter for names.
- state String
- Filter list by the lifecycle state of the item.
- table
Name Or Id This property is required. string - A table name within the compartment, or a table OCID.
- compartment
Id 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.
- filters
Changes to this property will trigger replacement.
Indexes Filter[] - name string
- A shell-globbing-style (*?[]) filter for names.
- state string
- Filter list by the lifecycle state of the item.
- table_
name_ or_ id This property is required. str - 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.
- filters
Changes to this property will trigger replacement.
Get Indexes Filter] - name str
- A shell-globbing-style (*?[]) filter for names.
- state str
- Filter list by the lifecycle state of the item.
- table
Name Or Id This property is required. String - A table name within the compartment, or a table OCID.
- compartment
Id 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.
- filters
Changes to this property will trigger replacement.
- name String
- A shell-globbing-style (*?[]) filter for names.
- state String
- Filter list by the lifecycle state of the item.
getIndexes Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Index
Collections List<GetIndexes Index Collection> - The list of index_collection.
- Table
Name stringOr Id - Compartment
Id string - Compartment Identifier.
- Filters
List<Get
Indexes Filter> - Name string
- Index name.
- State string
- The state of an index.
- Id string
- The provider-assigned unique ID for this managed resource.
- Index
Collections []GetIndexes Index Collection - The list of index_collection.
- Table
Name stringOr Id - Compartment
Id string - Compartment Identifier.
- Filters
[]Get
Indexes Filter - Name string
- Index name.
- State string
- The state of an index.
- id String
- The provider-assigned unique ID for this managed resource.
- index
Collections List<GetIndexes Index Collection> - The list of index_collection.
- table
Name StringOr Id - compartment
Id String - Compartment Identifier.
- filters
List<Get
Indexes Filter> - name String
- Index name.
- state String
- The state of an index.
- id string
- The provider-assigned unique ID for this managed resource.
- index
Collections GetIndexes Index Collection[] - The list of index_collection.
- table
Name stringOr Id - compartment
Id string - Compartment Identifier.
- filters
Get
Indexes Filter[] - name string
- Index name.
- state string
- The state of an index.
- id str
- The provider-assigned unique ID for this managed resource.
- index_
collections Sequence[nosql.Get Indexes Index Collection] - The list of index_collection.
- table_
name_ stror_ id - compartment_
id str - Compartment Identifier.
- filters
Sequence[nosql.
Get Indexes Filter] - name str
- Index name.
- state str
- The state of an index.
- id String
- The provider-assigned unique ID for this managed resource.
- index
Collections List<Property Map> - The list of index_collection.
- table
Name StringOr Id - compartment
Id String - Compartment Identifier.
- filters List<Property Map>
- name String
- Index name.
- state String
- The state of an index.
Supporting Types
GetIndexesFilter
GetIndexesIndexCollection
- Compartment
Id 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.
- Id
This property is required. string - Is
If Not Exists This property is required. bool - Keys
This property is required. List<GetIndexes Index Collection Key> - A set of keys for a secondary index.
- Lifecycle
Details This property is required. string - A message describing the current state in more detail.
- Name
This property is required. string - A shell-globbing-style (*?[]) filter for names.
- State
This property is required. string - Filter list by the lifecycle state of the item.
- Table
Id This property is required. string - the OCID of the table to which this index belongs.
- Table
Name This property is required. string - The name of the table to which this index belongs.
- Table
Name Or Id This property is required. string - A table name within the compartment, or a table OCID.
- Compartment
Id 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.
- Id
This property is required. string - Is
If Not Exists This property is required. bool - Keys
This property is required. []GetIndexes Index Collection Key - A set of keys for a secondary index.
- Lifecycle
Details This property is required. string - A message describing the current state in more detail.
- Name
This property is required. string - A shell-globbing-style (*?[]) filter for names.
- State
This property is required. string - Filter list by the lifecycle state of the item.
- Table
Id This property is required. string - the OCID of the table to which this index belongs.
- Table
Name This property is required. string - The name of the table to which this index belongs.
- Table
Name Or Id This property is required. string - A table name within the compartment, or a table OCID.
- compartment
Id 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.
- id
This property is required. String - is
If Not Exists This property is required. Boolean - keys
This property is required. List<GetIndexes Index Collection Key> - A set of keys for a secondary index.
- lifecycle
Details This property is required. String - A message describing the current state in more detail.
- name
This property is required. String - A shell-globbing-style (*?[]) filter for names.
- state
This property is required. String - Filter list by the lifecycle state of the item.
- table
Id This property is required. String - the OCID of the table to which this index belongs.
- table
Name This property is required. String - The name of the table to which this index belongs.
- table
Name Or Id This property is required. String - A table name within the compartment, or a table OCID.
- compartment
Id 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.
- id
This property is required. string - is
If Not Exists This property is required. boolean - keys
This property is required. GetIndexes Index Collection Key[] - A set of keys for a secondary index.
- lifecycle
Details This property is required. string - A message describing the current state in more detail.
- name
This property is required. string - A shell-globbing-style (*?[]) filter for names.
- state
This property is required. string - Filter list by the lifecycle state of the item.
- table
Id This property is required. string - the OCID of the table to which this index belongs.
- table
Name This property is required. string - The name of the table to which this index belongs.
- table
Name Or Id 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.
- id
This property is required. str - is_
if_ not_ exists This property is required. bool - keys
This property is required. Sequence[nosql.Get Indexes Index Collection Key] - A set of keys for a secondary index.
- lifecycle_
details This property is required. str - A message describing the current state in more detail.
- name
This property is required. str - A shell-globbing-style (*?[]) filter for names.
- state
This property is required. str - Filter list by the lifecycle state of the item.
- table_
id This property is required. str - the OCID of the table to which this index belongs.
- table_
name This property is required. str - The name of the table to which this index belongs.
- table_
name_ or_ id This property is required. str - A table name within the compartment, or a table OCID.
- compartment
Id 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.
- id
This property is required. String - is
If Not Exists This property is required. Boolean - keys
This property is required. List<Property Map> - A set of keys for a secondary index.
- lifecycle
Details This property is required. String - A message describing the current state in more detail.
- name
This property is required. String - A shell-globbing-style (*?[]) filter for names.
- state
This property is required. String - Filter list by the lifecycle state of the item.
- table
Id This property is required. String - the OCID of the table to which this index belongs.
- table
Name This property is required. String - The name of the table to which this index belongs.
- table
Name Or Id This property is required. String - A table name within the compartment, or a table OCID.
GetIndexesIndexCollectionKey
- Column
Name This property is required. string - The name of a column to be included as an index key.
- Json
Field Type This property is required. string - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- Json
Path 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. string - The name of a column to be included as an index key.
- Json
Field Type This property is required. string - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- Json
Path 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. String - The name of a column to be included as an index key.
- json
Field Type This property is required. String - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- json
Path 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. string - The name of a column to be included as an index key.
- json
Field Type This property is required. string - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- json
Path 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.
- column
Name This property is required. String - The name of a column to be included as an index key.
- json
Field Type This property is required. String - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- json
Path 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.