Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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 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:
- 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.
- Index
Name string - The name of a table's index.
- Table
Name stringOr Id - 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.
- Index
Name string - The name of a table's index.
- Table
Name stringOr Id - 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.
- index
Name String - The name of a table's index.
- table
Name StringOr Id - 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.
- index
Name string - The name of a table's index.
- table
Name 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.
- 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.
- index
Name String - The name of a table's index.
- table
Name StringOr Id - A table name within the compartment, or a table OCID.
getIndex Result
The following output properties are available:
- Compartment
Id string - Compartment Identifier.
- Id string
- Index
Name string - Is
If boolNot Exists - Keys
List<Get
Index Key> - A set of keys for a secondary index.
- Lifecycle
Details string - A message describing the current state in more detail.
- Name string
- Index name.
- State string
- The state of an index.
- Table
Id string - the OCID of the table to which this index belongs.
- Table
Name string - The name of the table to which this index belongs.
- Table
Name stringOr Id
- Compartment
Id string - Compartment Identifier.
- Id string
- Index
Name string - Is
If boolNot Exists - Keys
[]Get
Index Key - A set of keys for a secondary index.
- Lifecycle
Details string - A message describing the current state in more detail.
- Name string
- Index name.
- State string
- The state of an index.
- Table
Id string - the OCID of the table to which this index belongs.
- Table
Name string - The name of the table to which this index belongs.
- Table
Name stringOr Id
- compartment
Id String - Compartment Identifier.
- id String
- index
Name String - is
If BooleanNot Exists - keys
List<Get
Index Key> - A set of keys for a secondary index.
- lifecycle
Details String - A message describing the current state in more detail.
- name String
- Index name.
- state String
- The state of an index.
- table
Id String - the OCID of the table to which this index belongs.
- table
Name String - The name of the table to which this index belongs.
- table
Name StringOr Id
- compartment
Id string - Compartment Identifier.
- id string
- index
Name string - is
If booleanNot Exists - keys
Get
Index Key[] - A set of keys for a secondary index.
- lifecycle
Details string - A message describing the current state in more detail.
- name string
- Index name.
- state string
- The state of an index.
- table
Id string - the OCID of the table to which this index belongs.
- table
Name string - The name of the table to which this index belongs.
- table
Name stringOr Id
- compartment_
id str - Compartment Identifier.
- id str
- index_
name str - is_
if_ boolnot_ exists - keys
Sequence[nosql.
Get Index 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
- compartment
Id String - Compartment Identifier.
- id String
- index
Name String - is
If BooleanNot Exists - keys List<Property Map>
- A set of keys for a secondary index.
- lifecycle
Details String - A message describing the current state in more detail.
- name String
- Index name.
- state String
- The state of an index.
- table
Id String - the OCID of the table to which this index belongs.
- table
Name String - The name of the table to which this index belongs.
- table
Name StringOr Id
Supporting Types
GetIndexKey
- Column
Name string - The name of a column to be included as an index key.
- Json
Field stringType - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- Json
Path 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 string - The name of a column to be included as an index key.
- Json
Field stringType - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- Json
Path 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 String - The name of a column to be included as an index key.
- json
Field StringType - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- json
Path 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 string - The name of a column to be included as an index key.
- json
Field stringType - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- json
Path 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.
- column
Name String - The name of a column to be included as an index key.
- json
Field StringType - If the specified column is of type JSON, jsonFieldType contains the type of the field indicated by jsonPath.
- json
Path 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.