1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Nosql
  5. getIndexes
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Nosql.getIndexes

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    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/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Nosql/getIndexes:getIndexes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    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.
    Filters List<GetIndexesFilter>
    Name string
    A shell-globbing-style (*?[]) filter for names.
    State string
    Filter list by the lifecycle state of the item.
    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.
    Filters []GetIndexesFilter
    Name string
    A shell-globbing-style (*?[]) filter for names.
    State string
    Filter list by the lifecycle state of the item.
    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.
    filters List<GetIndexesFilter>
    name String
    A shell-globbing-style (*?[]) filter for names.
    state String
    Filter list by the lifecycle state of the item.
    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.
    filters GetIndexesFilter[]
    name string
    A shell-globbing-style (*?[]) filter for names.
    state string
    Filter list by the lifecycle state of the item.
    table_name_or_id 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 Sequence[nosql.GetIndexesFilter]
    name str
    A shell-globbing-style (*?[]) filter for names.
    state str
    Filter list by the lifecycle state of the item.
    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.
    filters List<Property Map>
    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.
    IndexCollections List<GetIndexesIndexCollection>
    The list of index_collection.
    TableNameOrId string
    CompartmentId string
    Compartment Identifier.
    Filters List<GetIndexesFilter>
    Name string
    Index name.
    State string
    The state of an index.
    Id string
    The provider-assigned unique ID for this managed resource.
    IndexCollections []GetIndexesIndexCollection
    The list of index_collection.
    TableNameOrId string
    CompartmentId string
    Compartment Identifier.
    Filters []GetIndexesFilter
    Name string
    Index name.
    State string
    The state of an index.
    id String
    The provider-assigned unique ID for this managed resource.
    indexCollections List<GetIndexesIndexCollection>
    The list of index_collection.
    tableNameOrId String
    compartmentId String
    Compartment Identifier.
    filters List<GetIndexesFilter>
    name String
    Index name.
    state String
    The state of an index.
    id string
    The provider-assigned unique ID for this managed resource.
    indexCollections GetIndexesIndexCollection[]
    The list of index_collection.
    tableNameOrId string
    compartmentId string
    Compartment Identifier.
    filters GetIndexesFilter[]
    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.GetIndexesIndexCollection]
    The list of index_collection.
    table_name_or_id str
    compartment_id str
    Compartment Identifier.
    filters Sequence[nosql.GetIndexesFilter]
    name str
    Index name.
    state str
    The state of an index.
    id String
    The provider-assigned unique ID for this managed resource.
    indexCollections List<Property Map>
    The list of index_collection.
    tableNameOrId String
    compartmentId String
    Compartment Identifier.
    filters List<Property Map>
    name String
    Index name.
    state String
    The state of an index.

    Supporting Types

    GetIndexesFilter

    Name string
    A shell-globbing-style (*?[]) filter for names.
    Values List<string>
    Regex bool
    Name string
    A shell-globbing-style (*?[]) filter for names.
    Values []string
    Regex bool
    name String
    A shell-globbing-style (*?[]) filter for names.
    values List<String>
    regex Boolean
    name string
    A shell-globbing-style (*?[]) filter for names.
    values string[]
    regex boolean
    name str
    A shell-globbing-style (*?[]) filter for names.
    values Sequence[str]
    regex bool
    name String
    A shell-globbing-style (*?[]) filter for names.
    values List<String>
    regex Boolean

    GetIndexesIndexCollection

    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.
    Id string
    IsIfNotExists bool
    Keys List<GetIndexesIndexCollectionKey>
    A set of keys for a secondary index.
    LifecycleDetails string
    A message describing the current state in more detail.
    Name string
    A shell-globbing-style (*?[]) filter for names.
    State string
    Filter list by the lifecycle state of the item.
    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
    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.
    Id string
    IsIfNotExists bool
    Keys []GetIndexesIndexCollectionKey
    A set of keys for a secondary index.
    LifecycleDetails string
    A message describing the current state in more detail.
    Name string
    A shell-globbing-style (*?[]) filter for names.
    State string
    Filter list by the lifecycle state of the item.
    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
    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.
    id String
    isIfNotExists Boolean
    keys List<GetIndexesIndexCollectionKey>
    A set of keys for a secondary index.
    lifecycleDetails String
    A message describing the current state in more detail.
    name String
    A shell-globbing-style (*?[]) filter for names.
    state String
    Filter list by the lifecycle state of the item.
    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
    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.
    id string
    isIfNotExists boolean
    keys GetIndexesIndexCollectionKey[]
    A set of keys for a secondary index.
    lifecycleDetails string
    A message describing the current state in more detail.
    name string
    A shell-globbing-style (*?[]) filter for names.
    state string
    Filter list by the lifecycle state of the item.
    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
    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.
    id str
    is_if_not_exists bool
    keys Sequence[nosql.GetIndexesIndexCollectionKey]
    A set of keys for a secondary index.
    lifecycle_details str
    A message describing the current state in more detail.
    name str
    A shell-globbing-style (*?[]) filter for names.
    state str
    Filter list by the lifecycle state of the item.
    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
    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.
    id 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
    A shell-globbing-style (*?[]) filter for names.
    state String
    Filter list by the lifecycle state of the item.
    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
    A table name within the compartment, or a table OCID.

    GetIndexesIndexCollectionKey

    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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi