1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ots
  5. getSecondaryIndexes
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ots.getSecondaryIndexes

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the ots secondary index of the current Alibaba Cloud user.

For information about OTS secondary index and how to use it, see Secondary index overview.

NOTE: Available in v1.187.0+.

Example Usage

data "alicloud_ots_secondary_indexes" "secondary_index_ds" {
  instance_name = "sample-instance"
  table_name = "sample-table"
  name_regex    = "sample-secondary-index"
  output_file   = "secondary-indexs.txt"
}

output "first_secondary_index_id" {
  value = "${data.alicloud_ots_secondary_indexes.secondary_index_ds.indexs.0.id}"
}
Copy

Using getSecondaryIndexes

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 getSecondaryIndexes(args: GetSecondaryIndexesArgs, opts?: InvokeOptions): Promise<GetSecondaryIndexesResult>
function getSecondaryIndexesOutput(args: GetSecondaryIndexesOutputArgs, opts?: InvokeOptions): Output<GetSecondaryIndexesResult>
Copy
def get_secondary_indexes(ids: Optional[Sequence[str]] = None,
                          instance_name: Optional[str] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          table_name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSecondaryIndexesResult
def get_secondary_indexes_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          instance_name: Optional[pulumi.Input[str]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          table_name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSecondaryIndexesResult]
Copy
func GetSecondaryIndexes(ctx *Context, args *GetSecondaryIndexesArgs, opts ...InvokeOption) (*GetSecondaryIndexesResult, error)
func GetSecondaryIndexesOutput(ctx *Context, args *GetSecondaryIndexesOutputArgs, opts ...InvokeOption) GetSecondaryIndexesResultOutput
Copy

> Note: This function is named GetSecondaryIndexes in the Go SDK.

public static class GetSecondaryIndexes 
{
    public static Task<GetSecondaryIndexesResult> InvokeAsync(GetSecondaryIndexesArgs args, InvokeOptions? opts = null)
    public static Output<GetSecondaryIndexesResult> Invoke(GetSecondaryIndexesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSecondaryIndexesResult> getSecondaryIndexes(GetSecondaryIndexesArgs args, InvokeOptions options)
public static Output<GetSecondaryIndexesResult> getSecondaryIndexes(GetSecondaryIndexesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ots/getSecondaryIndexes:getSecondaryIndexes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of OTS instance.
TableName
This property is required.
Changes to this property will trigger replacement.
string
The name of OTS table.
Ids Changes to this property will trigger replacement. List<string>
A list of secondary index IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by secondary index name.
OutputFile string
File name where to save data source results (after running pulumi preview).
InstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of OTS instance.
TableName
This property is required.
Changes to this property will trigger replacement.
string
The name of OTS table.
Ids Changes to this property will trigger replacement. []string
A list of secondary index IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by secondary index name.
OutputFile string
File name where to save data source results (after running pulumi preview).
instanceName
This property is required.
Changes to this property will trigger replacement.
String
The name of OTS instance.
tableName
This property is required.
Changes to this property will trigger replacement.
String
The name of OTS table.
ids Changes to this property will trigger replacement. List<String>
A list of secondary index IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by secondary index name.
outputFile String
File name where to save data source results (after running pulumi preview).
instanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of OTS instance.
tableName
This property is required.
Changes to this property will trigger replacement.
string
The name of OTS table.
ids Changes to this property will trigger replacement. string[]
A list of secondary index IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by secondary index name.
outputFile string
File name where to save data source results (after running pulumi preview).
instance_name
This property is required.
Changes to this property will trigger replacement.
str
The name of OTS instance.
table_name
This property is required.
Changes to this property will trigger replacement.
str
The name of OTS table.
ids Changes to this property will trigger replacement. Sequence[str]
A list of secondary index IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by secondary index name.
output_file str
File name where to save data source results (after running pulumi preview).
instanceName
This property is required.
Changes to this property will trigger replacement.
String
The name of OTS instance.
tableName
This property is required.
Changes to this property will trigger replacement.
String
The name of OTS table.
ids Changes to this property will trigger replacement. List<String>
A list of secondary index IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by secondary index name.
outputFile String
File name where to save data source results (after running pulumi preview).

getSecondaryIndexes Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of secondary index IDs.
Indexes List<Pulumi.AliCloud.Ots.Outputs.GetSecondaryIndexesIndex>
A list of indexes. Each element contains the following attributes:
InstanceName string
The OTS instance name.
Names List<string>
A list of secondary index names.
TableName string
The table name of the OTS which could not be changed.
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of secondary index IDs.
Indexes []GetSecondaryIndexesIndex
A list of indexes. Each element contains the following attributes:
InstanceName string
The OTS instance name.
Names []string
A list of secondary index names.
TableName string
The table name of the OTS which could not be changed.
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of secondary index IDs.
indexes List<GetSecondaryIndexesIndex>
A list of indexes. Each element contains the following attributes:
instanceName String
The OTS instance name.
names List<String>
A list of secondary index names.
tableName String
The table name of the OTS which could not be changed.
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of secondary index IDs.
indexes GetSecondaryIndexesIndex[]
A list of indexes. Each element contains the following attributes:
instanceName string
The OTS instance name.
names string[]
A list of secondary index names.
tableName string
The table name of the OTS which could not be changed.
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of secondary index IDs.
indexes Sequence[GetSecondaryIndexesIndex]
A list of indexes. Each element contains the following attributes:
instance_name str
The OTS instance name.
names Sequence[str]
A list of secondary index names.
table_name str
The table name of the OTS which could not be changed.
name_regex str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of secondary index IDs.
indexes List<Property Map>
A list of indexes. Each element contains the following attributes:
instanceName String
The OTS instance name.
names List<String>
A list of secondary index names.
tableName String
The table name of the OTS which could not be changed.
nameRegex String
outputFile String

Supporting Types

GetSecondaryIndexesIndex

DefinedColumns This property is required. List<string>
A list of defined column for index, referenced from Table's primary keys or predefined columns.
Id This property is required. string
The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
IndexName This property is required. string
The index name of the OTS Table which could not be changed.
IndexType This property is required. string
The index type of the OTS Table which could not be changed.
InstanceName This property is required. string
The name of OTS instance.
PrimaryKeys This property is required. List<string>
A list of primary keys for index, referenced from Table's primary keys or predefined columns.
TableName This property is required. string
The name of OTS table.
DefinedColumns This property is required. []string
A list of defined column for index, referenced from Table's primary keys or predefined columns.
Id This property is required. string
The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
IndexName This property is required. string
The index name of the OTS Table which could not be changed.
IndexType This property is required. string
The index type of the OTS Table which could not be changed.
InstanceName This property is required. string
The name of OTS instance.
PrimaryKeys This property is required. []string
A list of primary keys for index, referenced from Table's primary keys or predefined columns.
TableName This property is required. string
The name of OTS table.
definedColumns This property is required. List<String>
A list of defined column for index, referenced from Table's primary keys or predefined columns.
id This property is required. String
The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
indexName This property is required. String
The index name of the OTS Table which could not be changed.
indexType This property is required. String
The index type of the OTS Table which could not be changed.
instanceName This property is required. String
The name of OTS instance.
primaryKeys This property is required. List<String>
A list of primary keys for index, referenced from Table's primary keys or predefined columns.
tableName This property is required. String
The name of OTS table.
definedColumns This property is required. string[]
A list of defined column for index, referenced from Table's primary keys or predefined columns.
id This property is required. string
The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
indexName This property is required. string
The index name of the OTS Table which could not be changed.
indexType This property is required. string
The index type of the OTS Table which could not be changed.
instanceName This property is required. string
The name of OTS instance.
primaryKeys This property is required. string[]
A list of primary keys for index, referenced from Table's primary keys or predefined columns.
tableName This property is required. string
The name of OTS table.
defined_columns This property is required. Sequence[str]
A list of defined column for index, referenced from Table's primary keys or predefined columns.
id This property is required. str
The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
index_name This property is required. str
The index name of the OTS Table which could not be changed.
index_type This property is required. str
The index type of the OTS Table which could not be changed.
instance_name This property is required. str
The name of OTS instance.
primary_keys This property is required. Sequence[str]
A list of primary keys for index, referenced from Table's primary keys or predefined columns.
table_name This property is required. str
The name of OTS table.
definedColumns This property is required. List<String>
A list of defined column for index, referenced from Table's primary keys or predefined columns.
id This property is required. String
The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
indexName This property is required. String
The index name of the OTS Table which could not be changed.
indexType This property is required. String
The index type of the OTS Table which could not be changed.
instanceName This property is required. String
The name of OTS instance.
primaryKeys This property is required. List<String>
A list of primary keys for index, referenced from Table's primary keys or predefined columns.
tableName This property is required. String
The name of OTS table.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi