alicloud.ots.Table
Explore with Pulumi AI
Provides an OTS table resource.
NOTE: From Provider version 1.10.0, the provider field ‘ots_instance_name’ has been deprecated and you should use resource alicloud_ots_table’s new field ‘instance_name’ and ’table_name’ to re-import this resource.
NOTE: Available since v1.9.2.
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",
},
],
});
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",
},
])
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
}
_, 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
}
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",
},
},
});
});
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 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());
}
}
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
Create Table Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Table(name: string, args: TableArgs, opts?: CustomResourceOptions);
@overload
def Table(resource_name: str,
args: TableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Table(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_name: Optional[str] = None,
max_version: Optional[int] = None,
primary_keys: Optional[Sequence[TablePrimaryKeyArgs]] = None,
table_name: Optional[str] = None,
time_to_live: Optional[int] = None,
allow_update: Optional[bool] = None,
defined_columns: Optional[Sequence[TableDefinedColumnArgs]] = None,
deviation_cell_version_in_sec: Optional[str] = None,
enable_sse: Optional[bool] = None,
sse_key_id: Optional[str] = None,
sse_key_type: Optional[str] = None,
sse_role_arn: Optional[str] = None)
func NewTable(ctx *Context, name string, args TableArgs, opts ...ResourceOption) (*Table, error)
public Table(string name, TableArgs args, CustomResourceOptions? opts = null)
type: alicloud:ots:Table
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 TableArgs
- 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 TableArgs
- 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 TableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TableArgs
- 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 tableResource = new AliCloud.Ots.Table("tableResource", new()
{
InstanceName = "string",
MaxVersion = 0,
PrimaryKeys = new[]
{
new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
{
Name = "string",
Type = "string",
},
},
TableName = "string",
TimeToLive = 0,
AllowUpdate = false,
DefinedColumns = new[]
{
new AliCloud.Ots.Inputs.TableDefinedColumnArgs
{
Name = "string",
Type = "string",
},
},
DeviationCellVersionInSec = "string",
EnableSse = false,
SseKeyId = "string",
SseKeyType = "string",
SseRoleArn = "string",
});
example, err := ots.NewTable(ctx, "tableResource", &ots.TableArgs{
InstanceName: pulumi.String("string"),
MaxVersion: pulumi.Int(0),
PrimaryKeys: ots.TablePrimaryKeyArray{
&ots.TablePrimaryKeyArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
TableName: pulumi.String("string"),
TimeToLive: pulumi.Int(0),
AllowUpdate: pulumi.Bool(false),
DefinedColumns: ots.TableDefinedColumnArray{
&ots.TableDefinedColumnArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
DeviationCellVersionInSec: pulumi.String("string"),
EnableSse: pulumi.Bool(false),
SseKeyId: pulumi.String("string"),
SseKeyType: pulumi.String("string"),
SseRoleArn: pulumi.String("string"),
})
var tableResource = new Table("tableResource", TableArgs.builder()
.instanceName("string")
.maxVersion(0)
.primaryKeys(TablePrimaryKeyArgs.builder()
.name("string")
.type("string")
.build())
.tableName("string")
.timeToLive(0)
.allowUpdate(false)
.definedColumns(TableDefinedColumnArgs.builder()
.name("string")
.type("string")
.build())
.deviationCellVersionInSec("string")
.enableSse(false)
.sseKeyId("string")
.sseKeyType("string")
.sseRoleArn("string")
.build());
table_resource = alicloud.ots.Table("tableResource",
instance_name="string",
max_version=0,
primary_keys=[{
"name": "string",
"type": "string",
}],
table_name="string",
time_to_live=0,
allow_update=False,
defined_columns=[{
"name": "string",
"type": "string",
}],
deviation_cell_version_in_sec="string",
enable_sse=False,
sse_key_id="string",
sse_key_type="string",
sse_role_arn="string")
const tableResource = new alicloud.ots.Table("tableResource", {
instanceName: "string",
maxVersion: 0,
primaryKeys: [{
name: "string",
type: "string",
}],
tableName: "string",
timeToLive: 0,
allowUpdate: false,
definedColumns: [{
name: "string",
type: "string",
}],
deviationCellVersionInSec: "string",
enableSse: false,
sseKeyId: "string",
sseKeyType: "string",
sseRoleArn: "string",
});
type: alicloud:ots:Table
properties:
allowUpdate: false
definedColumns:
- name: string
type: string
deviationCellVersionInSec: string
enableSse: false
instanceName: string
maxVersion: 0
primaryKeys:
- name: string
type: string
sseKeyId: string
sseKeyType: string
sseRoleArn: string
tableName: string
timeToLive: 0
Table 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 Table resource accepts the following input properties:
- Instance
Name string - The name of the OTS instance in which table will located.
- Max
Version int - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- Primary
Keys List<Pulumi.Ali Cloud. Ots. Inputs. Table Primary Key> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - Table
Name string - The table name of the OTS instance. If changed, a new table would be created.
- Time
To intLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- Allow
Update bool - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- Defined
Columns List<Pulumi.Ali Cloud. Ots. Inputs. Table Defined Column> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - Deviation
Cell stringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- Enable
Sse bool - Whether enable OTS server side encryption. Default value is false.
- Sse
Key stringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - Sse
Key stringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - Sse
Role stringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
.
- Instance
Name string - The name of the OTS instance in which table will located.
- Max
Version int - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- Primary
Keys []TablePrimary Key Args - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - Table
Name string - The table name of the OTS instance. If changed, a new table would be created.
- Time
To intLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- Allow
Update bool - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- Defined
Columns []TableDefined Column Args - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - Deviation
Cell stringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- Enable
Sse bool - Whether enable OTS server side encryption. Default value is false.
- Sse
Key stringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - Sse
Key stringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - Sse
Role stringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
.
- instance
Name String - The name of the OTS instance in which table will located.
- max
Version Integer - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary
Keys List<TablePrimary Key> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - table
Name String - The table name of the OTS instance. If changed, a new table would be created.
- time
To IntegerLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow
Update Boolean - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined
Columns List<TableDefined Column> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation
Cell StringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable
Sse Boolean - Whether enable OTS server side encryption. Default value is false.
- sse
Key StringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse
Key StringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse
Role StringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
.
- instance
Name string - The name of the OTS instance in which table will located.
- max
Version number - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary
Keys TablePrimary Key[] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - table
Name string - The table name of the OTS instance. If changed, a new table would be created.
- time
To numberLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow
Update boolean - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined
Columns TableDefined Column[] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation
Cell stringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable
Sse boolean - Whether enable OTS server side encryption. Default value is false.
- sse
Key stringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse
Key stringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse
Role stringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
.
- instance_
name str - The name of the OTS instance in which table will located.
- max_
version int - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary_
keys Sequence[TablePrimary Key Args] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - table_
name str - The table name of the OTS instance. If changed, a new table would be created.
- time_
to_ intlive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow_
update bool - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined_
columns Sequence[TableDefined Column Args] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation_
cell_ strversion_ in_ sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable_
sse bool - Whether enable OTS server side encryption. Default value is false.
- sse_
key_ strid - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse_
key_ strtype - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse_
role_ strarn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
.
- instance
Name String - The name of the OTS instance in which table will located.
- max
Version Number - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary
Keys List<Property Map> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - table
Name String - The table name of the OTS instance. If changed, a new table would be created.
- time
To NumberLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow
Update Boolean - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined
Columns List<Property Map> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation
Cell StringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable
Sse Boolean - Whether enable OTS server side encryption. Default value is false.
- sse
Key StringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse
Key StringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse
Role StringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Table 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 Table Resource
Get an existing Table 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?: TableState, opts?: CustomResourceOptions): Table
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_update: Optional[bool] = None,
defined_columns: Optional[Sequence[TableDefinedColumnArgs]] = None,
deviation_cell_version_in_sec: Optional[str] = None,
enable_sse: Optional[bool] = None,
instance_name: Optional[str] = None,
max_version: Optional[int] = None,
primary_keys: Optional[Sequence[TablePrimaryKeyArgs]] = None,
sse_key_id: Optional[str] = None,
sse_key_type: Optional[str] = None,
sse_role_arn: Optional[str] = None,
table_name: Optional[str] = None,
time_to_live: Optional[int] = None) -> Table
func GetTable(ctx *Context, name string, id IDInput, state *TableState, opts ...ResourceOption) (*Table, error)
public static Table Get(string name, Input<string> id, TableState? state, CustomResourceOptions? opts = null)
public static Table get(String name, Output<String> id, TableState 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.
- Allow
Update bool - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- Defined
Columns List<Pulumi.Ali Cloud. Ots. Inputs. Table Defined Column> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - Deviation
Cell stringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- Enable
Sse bool - Whether enable OTS server side encryption. Default value is false.
- Instance
Name string - The name of the OTS instance in which table will located.
- Max
Version int - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- Primary
Keys List<Pulumi.Ali Cloud. Ots. Inputs. Table Primary Key> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - Sse
Key stringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - Sse
Key stringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - Sse
Role stringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
. - Table
Name string - The table name of the OTS instance. If changed, a new table would be created.
- Time
To intLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- Allow
Update bool - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- Defined
Columns []TableDefined Column Args - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - Deviation
Cell stringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- Enable
Sse bool - Whether enable OTS server side encryption. Default value is false.
- Instance
Name string - The name of the OTS instance in which table will located.
- Max
Version int - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- Primary
Keys []TablePrimary Key Args - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - Sse
Key stringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - Sse
Key stringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - Sse
Role stringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
. - Table
Name string - The table name of the OTS instance. If changed, a new table would be created.
- Time
To intLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow
Update Boolean - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined
Columns List<TableDefined Column> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation
Cell StringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable
Sse Boolean - Whether enable OTS server side encryption. Default value is false.
- instance
Name String - The name of the OTS instance in which table will located.
- max
Version Integer - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary
Keys List<TablePrimary Key> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - sse
Key StringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse
Key StringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse
Role StringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
. - table
Name String - The table name of the OTS instance. If changed, a new table would be created.
- time
To IntegerLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow
Update boolean - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined
Columns TableDefined Column[] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation
Cell stringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable
Sse boolean - Whether enable OTS server side encryption. Default value is false.
- instance
Name string - The name of the OTS instance in which table will located.
- max
Version number - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary
Keys TablePrimary Key[] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - sse
Key stringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse
Key stringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse
Role stringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
. - table
Name string - The table name of the OTS instance. If changed, a new table would be created.
- time
To numberLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow_
update bool - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined_
columns Sequence[TableDefined Column Args] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation_
cell_ strversion_ in_ sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable_
sse bool - Whether enable OTS server side encryption. Default value is false.
- instance_
name str - The name of the OTS instance in which table will located.
- max_
version int - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary_
keys Sequence[TablePrimary Key Args] - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - sse_
key_ strid - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse_
key_ strtype - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse_
role_ strarn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
. - table_
name str - The table name of the OTS instance. If changed, a new table would be created.
- time_
to_ intlive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
- allow
Update Boolean - Whether allow data update operations. Default value is true. Skipping the resource state refresh step may result in unnecessary execution plan when upgrading from an earlier version.
- defined
Columns List<Property Map> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of defined column. The number ofdefined_column
should not be more than 32. Seedefined_column
below. - deviation
Cell StringVersion In Sec - The max version offset of the table. The valid value is 1-9223372036854775807. Defaults to 86400.
- enable
Sse Boolean - Whether enable OTS server side encryption. Default value is false.
- instance
Name String - The name of the OTS instance in which table will located.
- max
Version Number - The maximum number of versions stored in this table. The valid value is 1-2147483647.
- primary
Keys List<Property Map> - The property of
TableMeta
which indicates the structure information of a table. It describes the attribute value of primary key. The number ofprimary_key
should not be less than one and not be more than four. Seeprimary_key
below. - sse
Key StringId - . The key ID of secret.
sse_key_id
is valid only whensse_key_type
is set toSSE_BYOK
. - sse
Key StringType - The key type of OTS server side encryption.
SSE_KMS_SERVICE
,SSE_BYOK
is allowed. - sse
Role StringArn - The arn of role that can access kms service.
sse_role_arn
is valid only whensse_key_type
is set toSSE_BYOK
. - table
Name String - The table name of the OTS instance. If changed, a new table would be created.
- time
To NumberLive - The retention time of data stored in this table (unit: second). The value maximum is 2147483647 and -1 means never expired.
Supporting Types
TableDefinedColumn, TableDefinedColumnArgs
TablePrimaryKey, TablePrimaryKeyArgs
Import
OTS table can be imported using id, e.g.
$ pulumi import alicloud:ots/table:Table table my-ots:ots_table
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.