Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.ots.getSecondaryIndexes
Explore with Pulumi AI
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}"
}
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>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]func GetSecondaryIndexes(ctx *Context, args *GetSecondaryIndexesArgs, opts ...InvokeOption) (*GetSecondaryIndexesResult, error)
func GetSecondaryIndexesOutput(ctx *Context, args *GetSecondaryIndexesOutputArgs, opts ...InvokeOption) GetSecondaryIndexesResultOutput> 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)
}public static CompletableFuture<GetSecondaryIndexesResult> getSecondaryIndexes(GetSecondaryIndexesArgs args, InvokeOptions options)
public static Output<GetSecondaryIndexesResult> getSecondaryIndexes(GetSecondaryIndexesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:ots/getSecondaryIndexes:getSecondaryIndexes
  arguments:
    # arguments dictionaryThe following arguments are supported:
- InstanceName string
- The name of OTS instance.
- TableName string
- The name of OTS table.
- Ids List<string>
- A list of secondary index IDs.
- NameRegex 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 string
- The name of OTS instance.
- TableName string
- The name of OTS table.
- Ids []string
- A list of secondary index IDs.
- NameRegex 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 String
- The name of OTS instance.
- tableName String
- The name of OTS table.
- ids List<String>
- A list of secondary index IDs.
- nameRegex 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 string
- The name of OTS instance.
- tableName string
- The name of OTS table.
- ids string[]
- A list of secondary index IDs.
- nameRegex 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 str
- The name of OTS instance.
- table_name str
- The name of OTS table.
- ids Sequence[str]
- A list of secondary index IDs.
- name_regex 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 String
- The name of OTS instance.
- tableName String
- The name of OTS table.
- ids List<String>
- A list of secondary index IDs.
- nameRegex 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.Ali Cloud. Ots. Outputs. Get Secondary Indexes Index> 
- 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
[]GetSecondary Indexes Index 
- 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<GetSecondary Indexes Index> 
- 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
GetSecondary Indexes Index[] 
- 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[GetSecondary Indexes Index] 
- 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 List<string>
- A list of defined column for index, referenced from Table's primary keys or predefined columns.
- Id string
- The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
- IndexName string
- The index name of the OTS Table which could not be changed.
- IndexType string
- The index type of the OTS Table which could not be changed.
- InstanceName string
- The name of OTS instance.
- PrimaryKeys List<string>
- A list of primary keys for index, referenced from Table's primary keys or predefined columns.
- TableName string
- The name of OTS table.
- DefinedColumns []string
- A list of defined column for index, referenced from Table's primary keys or predefined columns.
- Id string
- The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
- IndexName string
- The index name of the OTS Table which could not be changed.
- IndexType string
- The index type of the OTS Table which could not be changed.
- InstanceName string
- The name of OTS instance.
- PrimaryKeys []string
- A list of primary keys for index, referenced from Table's primary keys or predefined columns.
- TableName string
- The name of OTS table.
- definedColumns List<String>
- A list of defined column for index, referenced from Table's primary keys or predefined columns.
- id String
- The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
- indexName String
- The index name of the OTS Table which could not be changed.
- indexType String
- The index type of the OTS Table which could not be changed.
- instanceName String
- The name of OTS instance.
- primaryKeys List<String>
- A list of primary keys for index, referenced from Table's primary keys or predefined columns.
- tableName String
- The name of OTS table.
- definedColumns string[]
- A list of defined column for index, referenced from Table's primary keys or predefined columns.
- id string
- The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
- indexName string
- The index name of the OTS Table which could not be changed.
- indexType string
- The index type of the OTS Table which could not be changed.
- instanceName string
- The name of OTS instance.
- primaryKeys string[]
- A list of primary keys for index, referenced from Table's primary keys or predefined columns.
- tableName string
- The name of OTS table.
- defined_columns Sequence[str]
- A list of defined column for index, referenced from Table's primary keys or predefined columns.
- id str
- The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
- index_name str
- The index name of the OTS Table which could not be changed.
- index_type str
- The index type of the OTS Table which could not be changed.
- instance_name str
- The name of OTS instance.
- primary_keys Sequence[str]
- A list of primary keys for index, referenced from Table's primary keys or predefined columns.
- table_name str
- The name of OTS table.
- definedColumns List<String>
- A list of defined column for index, referenced from Table's primary keys or predefined columns.
- id String
- The resource ID. The value is <instance_name>:<table_name>:<indexName>:<indexType>.
- indexName String
- The index name of the OTS Table which could not be changed.
- indexType String
- The index type of the OTS Table which could not be changed.
- instanceName String
- The name of OTS instance.
- primaryKeys List<String>
- A list of primary keys for index, referenced from Table's primary keys or predefined columns.
- tableName 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 alicloudTerraform Provider.