alicloud.ots.Instance
Explore with Pulumi AI
This resource will help you to manager a Table Store Instance. It is foundation of creating data table.
NOTE: Available since v1.10.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: "Vpc",
tags: {
Created: "TF",
For: "Building table",
},
});
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="Vpc",
tags={
"Created": "TF",
"For": "Building table",
})
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
}
_, err = ots.NewInstance(ctx, "default", &ots.InstanceArgs{
Name: pulumi.Sprintf("%v-%v", name, _default.Result),
Description: pulumi.String(name),
AccessedBy: pulumi.String("Vpc"),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("Building table"),
},
})
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 = "Vpc",
Tags =
{
{ "Created", "TF" },
{ "For", "Building table" },
},
});
});
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 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("Vpc")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "Building table")
))
.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: Vpc
tags:
Created: TF
For: Building table
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args?: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: Optional[InstanceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
accessed_by: Optional[str] = None,
description: Optional[str] = None,
instance_type: Optional[str] = None,
name: Optional[str] = None,
network_source_acls: Optional[Sequence[str]] = None,
network_type_acls: Optional[Sequence[str]] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewInstance(ctx *Context, name string, args *InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs? args = null, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: alicloud:ots:Instance
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 InstanceArgs
- 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 InstanceArgs
- 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 InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- 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 exampleinstanceResourceResourceFromOtsinstance = new AliCloud.Ots.Instance("exampleinstanceResourceResourceFromOtsinstance", new()
{
AccessedBy = "string",
Description = "string",
InstanceType = "string",
Name = "string",
NetworkSourceAcls = new[]
{
"string",
},
NetworkTypeAcls = new[]
{
"string",
},
ResourceGroupId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ots.NewInstance(ctx, "exampleinstanceResourceResourceFromOtsinstance", &ots.InstanceArgs{
AccessedBy: pulumi.String("string"),
Description: pulumi.String("string"),
InstanceType: pulumi.String("string"),
Name: pulumi.String("string"),
NetworkSourceAcls: pulumi.StringArray{
pulumi.String("string"),
},
NetworkTypeAcls: pulumi.StringArray{
pulumi.String("string"),
},
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var exampleinstanceResourceResourceFromOtsinstance = new Instance("exampleinstanceResourceResourceFromOtsinstance", InstanceArgs.builder()
.accessedBy("string")
.description("string")
.instanceType("string")
.name("string")
.networkSourceAcls("string")
.networkTypeAcls("string")
.resourceGroupId("string")
.tags(Map.of("string", "string"))
.build());
exampleinstance_resource_resource_from_otsinstance = alicloud.ots.Instance("exampleinstanceResourceResourceFromOtsinstance",
accessed_by="string",
description="string",
instance_type="string",
name="string",
network_source_acls=["string"],
network_type_acls=["string"],
resource_group_id="string",
tags={
"string": "string",
})
const exampleinstanceResourceResourceFromOtsinstance = new alicloud.ots.Instance("exampleinstanceResourceResourceFromOtsinstance", {
accessedBy: "string",
description: "string",
instanceType: "string",
name: "string",
networkSourceAcls: ["string"],
networkTypeAcls: ["string"],
resourceGroupId: "string",
tags: {
string: "string",
},
});
type: alicloud:ots:Instance
properties:
accessedBy: string
description: string
instanceType: string
name: string
networkSourceAcls:
- string
networkTypeAcls:
- string
resourceGroupId: string
tags:
string: string
Instance 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 Instance resource accepts the following input properties:
- Accessed
By string The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- Description string
- The description of the instance. Currently, it does not support modifying.
- Instance
Type string - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- Name string
- The name of the instance.
- Network
Source List<string>Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- Network
Type List<string>Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- Resource
Group stringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Dictionary<string, string>
- A mapping of tags to assign to the instance.
- Accessed
By string The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- Description string
- The description of the instance. Currently, it does not support modifying.
- Instance
Type string - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- Name string
- The name of the instance.
- Network
Source []stringAcls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- Network
Type []stringAcls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- Resource
Group stringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- map[string]string
- A mapping of tags to assign to the instance.
- accessed
By String The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description String
- The description of the instance. Currently, it does not support modifying.
- instance
Type String - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name String
- The name of the instance.
- network
Source List<String>Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network
Type List<String>Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource
Group StringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Map<String,String>
- A mapping of tags to assign to the instance.
- accessed
By string The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description string
- The description of the instance. Currently, it does not support modifying.
- instance
Type string - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name string
- The name of the instance.
- network
Source string[]Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network
Type string[]Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource
Group stringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- {[key: string]: string}
- A mapping of tags to assign to the instance.
- accessed_
by str The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description str
- The description of the instance. Currently, it does not support modifying.
- instance_
type str - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name str
- The name of the instance.
- network_
source_ Sequence[str]acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network_
type_ Sequence[str]acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource_
group_ strid - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Mapping[str, str]
- A mapping of tags to assign to the instance.
- accessed
By String The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description String
- The description of the instance. Currently, it does not support modifying.
- instance
Type String - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name String
- The name of the instance.
- network
Source List<String>Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network
Type List<String>Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource
Group StringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Map<String>
- A mapping of tags to assign to the instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance 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 Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
accessed_by: Optional[str] = None,
description: Optional[str] = None,
instance_type: Optional[str] = None,
name: Optional[str] = None,
network_source_acls: Optional[Sequence[str]] = None,
network_type_acls: Optional[Sequence[str]] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState 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.
- Accessed
By string The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- Description string
- The description of the instance. Currently, it does not support modifying.
- Instance
Type string - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- Name string
- The name of the instance.
- Network
Source List<string>Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- Network
Type List<string>Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- Resource
Group stringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Dictionary<string, string>
- A mapping of tags to assign to the instance.
- Accessed
By string The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- Description string
- The description of the instance. Currently, it does not support modifying.
- Instance
Type string - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- Name string
- The name of the instance.
- Network
Source []stringAcls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- Network
Type []stringAcls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- Resource
Group stringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- map[string]string
- A mapping of tags to assign to the instance.
- accessed
By String The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description String
- The description of the instance. Currently, it does not support modifying.
- instance
Type String - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name String
- The name of the instance.
- network
Source List<String>Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network
Type List<String>Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource
Group StringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Map<String,String>
- A mapping of tags to assign to the instance.
- accessed
By string The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description string
- The description of the instance. Currently, it does not support modifying.
- instance
Type string - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name string
- The name of the instance.
- network
Source string[]Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network
Type string[]Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource
Group stringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- {[key: string]: string}
- A mapping of tags to assign to the instance.
- accessed_
by str The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description str
- The description of the instance. Currently, it does not support modifying.
- instance_
type str - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name str
- The name of the instance.
- network_
source_ Sequence[str]acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network_
type_ Sequence[str]acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource_
group_ strid - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Mapping[str, str]
- A mapping of tags to assign to the instance.
- accessed
By String The network limitation of accessing instance. Valid values:
Any
- Allow all network to access the instance.Vpc
- Only can the attached VPC allow to access the instance.ConsoleOrVpc
- Allow web console or the attached VPC to access the instance.
Default to "Any".
- description String
- The description of the instance. Currently, it does not support modifying.
- instance
Type String - The type of instance. Valid values are "Capacity" and "HighPerformance". Default to "HighPerformance".
- name String
- The name of the instance.
- network
Source List<String>Acls The set of request sources that are allowed access. Valid optional values:
TRUST_PROXY
- Trusted proxy, usually the Alibaba Cloud console.
Default to ["TRUST_PROXY"].
- network
Type List<String>Acls The set of network types that are allowed access. Valid optional values:
CLASSIC
- Classic network.VPC
- VPC network.INTERNET
- Public internet.
Default to ["VPC", "CLASSIC", "INTERNET"].
- resource
Group StringId - The resource group the instance belongs to. Default to Alibaba Cloud default resource group.
- Map<String>
- A mapping of tags to assign to the instance.
Import
OTS instance can be imported using instance id or name, e.g.
$ pulumi import alicloud:ots/instance:Instance foo "my-ots-instance"
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.