1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ots
  5. SecondaryIndex
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ots.SecondaryIndex

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides an OTS secondary index resource.

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

    NOTE: Available since v1.187.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultInstance = new alicloud.ots.Instance("default", {
        name: `${name}-${_default.result}`,
        description: name,
        accessedBy: "Any",
        tags: {
            Created: "TF",
            For: "example",
        },
    });
    const defaultTable = new alicloud.ots.Table("default", {
        instanceName: defaultInstance.name,
        tableName: "tf_example",
        timeToLive: -1,
        maxVersion: 1,
        enableSse: true,
        sseKeyType: "SSE_KMS_SERVICE",
        primaryKeys: [
            {
                name: "pk1",
                type: "Integer",
            },
            {
                name: "pk2",
                type: "String",
            },
            {
                name: "pk3",
                type: "Binary",
            },
        ],
        definedColumns: [
            {
                name: "col1",
                type: "Integer",
            },
            {
                name: "col2",
                type: "String",
            },
            {
                name: "col3",
                type: "Binary",
            },
        ],
    });
    const defaultSecondaryIndex = new alicloud.ots.SecondaryIndex("default", {
        instanceName: defaultInstance.name,
        tableName: defaultTable.tableName,
        indexName: "example_index",
        indexType: "Global",
        includeBaseData: true,
        primaryKeys: [
            "pk1",
            "pk2",
            "pk3",
        ],
        definedColumns: [
            "col1",
            "col2",
            "col3",
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    default_instance = alicloud.ots.Instance("default",
        name=f"{name}-{default['result']}",
        description=name,
        accessed_by="Any",
        tags={
            "Created": "TF",
            "For": "example",
        })
    default_table = alicloud.ots.Table("default",
        instance_name=default_instance.name,
        table_name="tf_example",
        time_to_live=-1,
        max_version=1,
        enable_sse=True,
        sse_key_type="SSE_KMS_SERVICE",
        primary_keys=[
            {
                "name": "pk1",
                "type": "Integer",
            },
            {
                "name": "pk2",
                "type": "String",
            },
            {
                "name": "pk3",
                "type": "Binary",
            },
        ],
        defined_columns=[
            {
                "name": "col1",
                "type": "Integer",
            },
            {
                "name": "col2",
                "type": "String",
            },
            {
                "name": "col3",
                "type": "Binary",
            },
        ])
    default_secondary_index = alicloud.ots.SecondaryIndex("default",
        instance_name=default_instance.name,
        table_name=default_table.table_name,
        index_name="example_index",
        index_type="Global",
        include_base_data=True,
        primary_keys=[
            "pk1",
            "pk2",
            "pk3",
        ],
        defined_columns=[
            "col1",
            "col2",
            "col3",
        ])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ots.NewInstance(ctx, "default", &ots.InstanceArgs{
    			Name:        pulumi.Sprintf("%v-%v", name, _default.Result),
    			Description: pulumi.String(name),
    			AccessedBy:  pulumi.String("Any"),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultTable, err := ots.NewTable(ctx, "default", &ots.TableArgs{
    			InstanceName: defaultInstance.Name,
    			TableName:    pulumi.String("tf_example"),
    			TimeToLive:   pulumi.Int(-1),
    			MaxVersion:   pulumi.Int(1),
    			EnableSse:    pulumi.Bool(true),
    			SseKeyType:   pulumi.String("SSE_KMS_SERVICE"),
    			PrimaryKeys: ots.TablePrimaryKeyArray{
    				&ots.TablePrimaryKeyArgs{
    					Name: pulumi.String("pk1"),
    					Type: pulumi.String("Integer"),
    				},
    				&ots.TablePrimaryKeyArgs{
    					Name: pulumi.String("pk2"),
    					Type: pulumi.String("String"),
    				},
    				&ots.TablePrimaryKeyArgs{
    					Name: pulumi.String("pk3"),
    					Type: pulumi.String("Binary"),
    				},
    			},
    			DefinedColumns: ots.TableDefinedColumnArray{
    				&ots.TableDefinedColumnArgs{
    					Name: pulumi.String("col1"),
    					Type: pulumi.String("Integer"),
    				},
    				&ots.TableDefinedColumnArgs{
    					Name: pulumi.String("col2"),
    					Type: pulumi.String("String"),
    				},
    				&ots.TableDefinedColumnArgs{
    					Name: pulumi.String("col3"),
    					Type: pulumi.String("Binary"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ots.NewSecondaryIndex(ctx, "default", &ots.SecondaryIndexArgs{
    			InstanceName:    defaultInstance.Name,
    			TableName:       defaultTable.TableName,
    			IndexName:       pulumi.String("example_index"),
    			IndexType:       pulumi.String("Global"),
    			IncludeBaseData: pulumi.Bool(true),
    			PrimaryKeys: pulumi.StringArray{
    				pulumi.String("pk1"),
    				pulumi.String("pk2"),
    				pulumi.String("pk3"),
    			},
    			DefinedColumns: pulumi.StringArray{
    				pulumi.String("col1"),
    				pulumi.String("col2"),
    				pulumi.String("col3"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultInstance = new AliCloud.Ots.Instance("default", new()
        {
            Name = $"{name}-{@default.Result}",
            Description = name,
            AccessedBy = "Any",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
        });
    
        var defaultTable = new AliCloud.Ots.Table("default", new()
        {
            InstanceName = defaultInstance.Name,
            TableName = "tf_example",
            TimeToLive = -1,
            MaxVersion = 1,
            EnableSse = true,
            SseKeyType = "SSE_KMS_SERVICE",
            PrimaryKeys = new[]
            {
                new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
                {
                    Name = "pk1",
                    Type = "Integer",
                },
                new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
                {
                    Name = "pk2",
                    Type = "String",
                },
                new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
                {
                    Name = "pk3",
                    Type = "Binary",
                },
            },
            DefinedColumns = new[]
            {
                new AliCloud.Ots.Inputs.TableDefinedColumnArgs
                {
                    Name = "col1",
                    Type = "Integer",
                },
                new AliCloud.Ots.Inputs.TableDefinedColumnArgs
                {
                    Name = "col2",
                    Type = "String",
                },
                new AliCloud.Ots.Inputs.TableDefinedColumnArgs
                {
                    Name = "col3",
                    Type = "Binary",
                },
            },
        });
    
        var defaultSecondaryIndex = new AliCloud.Ots.SecondaryIndex("default", new()
        {
            InstanceName = defaultInstance.Name,
            TableName = defaultTable.TableName,
            IndexName = "example_index",
            IndexType = "Global",
            IncludeBaseData = true,
            PrimaryKeys = new[]
            {
                "pk1",
                "pk2",
                "pk3",
            },
            DefinedColumns = new[]
            {
                "col1",
                "col2",
                "col3",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.ots.Instance;
    import com.pulumi.alicloud.ots.InstanceArgs;
    import com.pulumi.alicloud.ots.Table;
    import com.pulumi.alicloud.ots.TableArgs;
    import com.pulumi.alicloud.ots.inputs.TablePrimaryKeyArgs;
    import com.pulumi.alicloud.ots.inputs.TableDefinedColumnArgs;
    import com.pulumi.alicloud.ots.SecondaryIndex;
    import com.pulumi.alicloud.ots.SecondaryIndexArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .name(String.format("%s-%s", name,default_.result()))
                .description(name)
                .accessedBy("Any")
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .build());
    
            var defaultTable = new Table("defaultTable", TableArgs.builder()
                .instanceName(defaultInstance.name())
                .tableName("tf_example")
                .timeToLive(-1)
                .maxVersion(1)
                .enableSse(true)
                .sseKeyType("SSE_KMS_SERVICE")
                .primaryKeys(            
                    TablePrimaryKeyArgs.builder()
                        .name("pk1")
                        .type("Integer")
                        .build(),
                    TablePrimaryKeyArgs.builder()
                        .name("pk2")
                        .type("String")
                        .build(),
                    TablePrimaryKeyArgs.builder()
                        .name("pk3")
                        .type("Binary")
                        .build())
                .definedColumns(            
                    TableDefinedColumnArgs.builder()
                        .name("col1")
                        .type("Integer")
                        .build(),
                    TableDefinedColumnArgs.builder()
                        .name("col2")
                        .type("String")
                        .build(),
                    TableDefinedColumnArgs.builder()
                        .name("col3")
                        .type("Binary")
                        .build())
                .build());
    
            var defaultSecondaryIndex = new SecondaryIndex("defaultSecondaryIndex", SecondaryIndexArgs.builder()
                .instanceName(defaultInstance.name())
                .tableName(defaultTable.tableName())
                .indexName("example_index")
                .indexType("Global")
                .includeBaseData(true)
                .primaryKeys(            
                    "pk1",
                    "pk2",
                    "pk3")
                .definedColumns(            
                    "col1",
                    "col2",
                    "col3")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      default:
        type: random:integer
        properties:
          min: 10000
          max: 99999
      defaultInstance:
        type: alicloud:ots:Instance
        name: default
        properties:
          name: ${name}-${default.result}
          description: ${name}
          accessedBy: Any
          tags:
            Created: TF
            For: example
      defaultTable:
        type: alicloud:ots:Table
        name: default
        properties:
          instanceName: ${defaultInstance.name}
          tableName: tf_example
          timeToLive: -1
          maxVersion: 1
          enableSse: true
          sseKeyType: SSE_KMS_SERVICE
          primaryKeys:
            - name: pk1
              type: Integer
            - name: pk2
              type: String
            - name: pk3
              type: Binary
          definedColumns:
            - name: col1
              type: Integer
            - name: col2
              type: String
            - name: col3
              type: Binary
      defaultSecondaryIndex:
        type: alicloud:ots:SecondaryIndex
        name: default
        properties:
          instanceName: ${defaultInstance.name}
          tableName: ${defaultTable.tableName}
          indexName: example_index
          indexType: Global
          includeBaseData: true
          primaryKeys:
            - pk1
            - pk2
            - pk3
          definedColumns:
            - col1
            - col2
            - col3
    

    Create SecondaryIndex Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecondaryIndex(name: string, args: SecondaryIndexArgs, opts?: CustomResourceOptions);
    @overload
    def SecondaryIndex(resource_name: str,
                       args: SecondaryIndexArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecondaryIndex(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       include_base_data: Optional[bool] = None,
                       index_name: Optional[str] = None,
                       index_type: Optional[str] = None,
                       instance_name: Optional[str] = None,
                       primary_keys: Optional[Sequence[str]] = None,
                       table_name: Optional[str] = None,
                       defined_columns: Optional[Sequence[str]] = None)
    func NewSecondaryIndex(ctx *Context, name string, args SecondaryIndexArgs, opts ...ResourceOption) (*SecondaryIndex, error)
    public SecondaryIndex(string name, SecondaryIndexArgs args, CustomResourceOptions? opts = null)
    public SecondaryIndex(String name, SecondaryIndexArgs args)
    public SecondaryIndex(String name, SecondaryIndexArgs args, CustomResourceOptions options)
    
    type: alicloud:ots:SecondaryIndex
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SecondaryIndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecondaryIndexArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecondaryIndexArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecondaryIndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecondaryIndexArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var secondaryIndexResource = new AliCloud.Ots.SecondaryIndex("secondaryIndexResource", new()
    {
        IncludeBaseData = false,
        IndexName = "string",
        IndexType = "string",
        InstanceName = "string",
        PrimaryKeys = new[]
        {
            "string",
        },
        TableName = "string",
        DefinedColumns = new[]
        {
            "string",
        },
    });
    
    example, err := ots.NewSecondaryIndex(ctx, "secondaryIndexResource", &ots.SecondaryIndexArgs{
    	IncludeBaseData: pulumi.Bool(false),
    	IndexName:       pulumi.String("string"),
    	IndexType:       pulumi.String("string"),
    	InstanceName:    pulumi.String("string"),
    	PrimaryKeys: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TableName: pulumi.String("string"),
    	DefinedColumns: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var secondaryIndexResource = new SecondaryIndex("secondaryIndexResource", SecondaryIndexArgs.builder()
        .includeBaseData(false)
        .indexName("string")
        .indexType("string")
        .instanceName("string")
        .primaryKeys("string")
        .tableName("string")
        .definedColumns("string")
        .build());
    
    secondary_index_resource = alicloud.ots.SecondaryIndex("secondaryIndexResource",
        include_base_data=False,
        index_name="string",
        index_type="string",
        instance_name="string",
        primary_keys=["string"],
        table_name="string",
        defined_columns=["string"])
    
    const secondaryIndexResource = new alicloud.ots.SecondaryIndex("secondaryIndexResource", {
        includeBaseData: false,
        indexName: "string",
        indexType: "string",
        instanceName: "string",
        primaryKeys: ["string"],
        tableName: "string",
        definedColumns: ["string"],
    });
    
    type: alicloud:ots:SecondaryIndex
    properties:
        definedColumns:
            - string
        includeBaseData: false
        indexName: string
        indexType: string
        instanceName: string
        primaryKeys:
            - string
        tableName: string
    

    SecondaryIndex Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SecondaryIndex resource accepts the following input properties:

    IncludeBaseData bool
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    IndexName string
    The index name of the OTS Table. If changed, a new index would be created.
    IndexType string
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    InstanceName string
    The name of the OTS instance in which table will located.
    PrimaryKeys List<string>
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    TableName string
    The name of the OTS table. If changed, a new table would be created.
    DefinedColumns List<string>
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    IncludeBaseData bool
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    IndexName string
    The index name of the OTS Table. If changed, a new index would be created.
    IndexType string
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    InstanceName string
    The name of the OTS instance in which table will located.
    PrimaryKeys []string
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    TableName string
    The name of the OTS table. If changed, a new table would be created.
    DefinedColumns []string
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    includeBaseData Boolean
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    indexName String
    The index name of the OTS Table. If changed, a new index would be created.
    indexType String
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instanceName String
    The name of the OTS instance in which table will located.
    primaryKeys List<String>
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    tableName String
    The name of the OTS table. If changed, a new table would be created.
    definedColumns List<String>
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    includeBaseData boolean
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    indexName string
    The index name of the OTS Table. If changed, a new index would be created.
    indexType string
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instanceName string
    The name of the OTS instance in which table will located.
    primaryKeys string[]
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    tableName string
    The name of the OTS table. If changed, a new table would be created.
    definedColumns string[]
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    include_base_data bool
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    index_name str
    The index name of the OTS Table. If changed, a new index would be created.
    index_type str
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instance_name str
    The name of the OTS instance in which table will located.
    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 the OTS table. If changed, a new table would be created.
    defined_columns Sequence[str]
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    includeBaseData Boolean
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    indexName String
    The index name of the OTS Table. If changed, a new index would be created.
    indexType String
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instanceName String
    The name of the OTS instance in which table will located.
    primaryKeys List<String>
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    tableName String
    The name of the OTS table. If changed, a new table would be created.
    definedColumns List<String>
    A list of defined column for index, referenced from Table's primary keys or predefined columns.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecondaryIndex resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecondaryIndex Resource

    Get an existing SecondaryIndex resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SecondaryIndexState, opts?: CustomResourceOptions): SecondaryIndex
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            defined_columns: Optional[Sequence[str]] = None,
            include_base_data: Optional[bool] = None,
            index_name: Optional[str] = None,
            index_type: Optional[str] = None,
            instance_name: Optional[str] = None,
            primary_keys: Optional[Sequence[str]] = None,
            table_name: Optional[str] = None) -> SecondaryIndex
    func GetSecondaryIndex(ctx *Context, name string, id IDInput, state *SecondaryIndexState, opts ...ResourceOption) (*SecondaryIndex, error)
    public static SecondaryIndex Get(string name, Input<string> id, SecondaryIndexState? state, CustomResourceOptions? opts = null)
    public static SecondaryIndex get(String name, Output<String> id, SecondaryIndexState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DefinedColumns List<string>
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    IncludeBaseData bool
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    IndexName string
    The index name of the OTS Table. If changed, a new index would be created.
    IndexType string
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    InstanceName string
    The name of the OTS instance in which table will located.
    PrimaryKeys List<string>
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    TableName string
    The name of the OTS table. If changed, a new table would be created.
    DefinedColumns []string
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    IncludeBaseData bool
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    IndexName string
    The index name of the OTS Table. If changed, a new index would be created.
    IndexType string
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    InstanceName string
    The name of the OTS instance in which table will located.
    PrimaryKeys []string
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    TableName string
    The name of the OTS table. If changed, a new table would be created.
    definedColumns List<String>
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    includeBaseData Boolean
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    indexName String
    The index name of the OTS Table. If changed, a new index would be created.
    indexType String
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instanceName String
    The name of the OTS instance in which table will located.
    primaryKeys List<String>
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    tableName String
    The name of the OTS table. If changed, a new table would be created.
    definedColumns string[]
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    includeBaseData boolean
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    indexName string
    The index name of the OTS Table. If changed, a new index would be created.
    indexType string
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instanceName string
    The name of the OTS instance in which table will located.
    primaryKeys string[]
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    tableName string
    The name of the OTS table. If changed, a new table would be created.
    defined_columns Sequence[str]
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    include_base_data bool
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    index_name str
    The index name of the OTS Table. If changed, a new index would be created.
    index_type str
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instance_name str
    The name of the OTS instance in which table will located.
    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 the OTS table. If changed, a new table would be created.
    definedColumns List<String>
    A list of defined column for index, referenced from Table's primary keys or predefined columns.
    includeBaseData Boolean
    whether the index contains data that already exists in the data table. When include_base_data is set to true, it means that stock data is included.
    indexName String
    The index name of the OTS Table. If changed, a new index would be created.
    indexType String
    The index type of the OTS Table. If changed, a new index would be created, only Global or Local is allowed.
    instanceName String
    The name of the OTS instance in which table will located.
    primaryKeys List<String>
    A list of primary keys for index, referenced from Table's primary keys or predefined columns.
    tableName String
    The name of the OTS table. If changed, a new table would be created.

    Import

    OTS secondary index can be imported using id, e.g.

    $ pulumi import alicloud:ots/secondaryIndex:SecondaryIndex index1 <instance_name>:<table_name>:<index_name>:<index_type>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi