volcengine.kafka.Instance
Explore with Pulumi AI
Import
KafkaInstance can be imported using the id, e.g.
$ pulumi import volcengine:kafka/instance:Instance default kafka-insbjwbbwb
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Kafka.Instance("fooInstance", new()
{
InstanceName = "acc-test-kafka",
InstanceDescription = "tf-test",
Version = "2.2.2",
ComputeSpec = "kafka.20xrate.hw",
SubnetId = fooSubnet.Id,
UserName = "tf-user",
UserPassword = "tf-pass!@q1",
ChargeType = "PostPaid",
StorageSpace = 300,
PartitionNumber = 350,
ProjectName = "default",
Tags = new[]
{
new Volcengine.Kafka.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
},
Parameters = new[]
{
new Volcengine.Kafka.Inputs.InstanceParameterArgs
{
ParameterName = "MessageMaxByte",
ParameterValue = "12",
},
new Volcengine.Kafka.Inputs.InstanceParameterArgs
{
ParameterName = "LogRetentionHours",
ParameterValue = "70",
},
new Volcengine.Kafka.Inputs.InstanceParameterArgs
{
ParameterName = "MessageTimestampType",
ParameterValue = "CreateTime",
},
new Volcengine.Kafka.Inputs.InstanceParameterArgs
{
ParameterName = "OffsetRetentionMinutes",
ParameterValue = "10080",
},
new Volcengine.Kafka.Inputs.InstanceParameterArgs
{
ParameterName = "AutoDeleteGroup",
ParameterValue = "false",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/kafka"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
_, err = kafka.NewInstance(ctx, "fooInstance", &kafka.InstanceArgs{
InstanceName: pulumi.String("acc-test-kafka"),
InstanceDescription: pulumi.String("tf-test"),
Version: pulumi.String("2.2.2"),
ComputeSpec: pulumi.String("kafka.20xrate.hw"),
SubnetId: fooSubnet.ID(),
UserName: pulumi.String("tf-user"),
UserPassword: pulumi.String("tf-pass!@q1"),
ChargeType: pulumi.String("PostPaid"),
StorageSpace: pulumi.Int(300),
PartitionNumber: pulumi.Int(350),
ProjectName: pulumi.String("default"),
Tags: kafka.InstanceTagArray{
&kafka.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
Parameters: kafka.InstanceParameterArray{
&kafka.InstanceParameterArgs{
ParameterName: pulumi.String("MessageMaxByte"),
ParameterValue: pulumi.String("12"),
},
&kafka.InstanceParameterArgs{
ParameterName: pulumi.String("LogRetentionHours"),
ParameterValue: pulumi.String("70"),
},
&kafka.InstanceParameterArgs{
ParameterName: pulumi.String("MessageTimestampType"),
ParameterValue: pulumi.String("CreateTime"),
},
&kafka.InstanceParameterArgs{
ParameterName: pulumi.String("OffsetRetentionMinutes"),
ParameterValue: pulumi.String("10080"),
},
&kafka.InstanceParameterArgs{
ParameterName: pulumi.String("AutoDeleteGroup"),
ParameterValue: pulumi.String("false"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.kafka.Instance;
import com.pulumi.volcengine.kafka.InstanceArgs;
import com.pulumi.volcengine.kafka.inputs.InstanceTagArgs;
import com.pulumi.volcengine.kafka.inputs.InstanceParameterArgs;
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 fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.instanceName("acc-test-kafka")
.instanceDescription("tf-test")
.version("2.2.2")
.computeSpec("kafka.20xrate.hw")
.subnetId(fooSubnet.id())
.userName("tf-user")
.userPassword("tf-pass!@q1")
.chargeType("PostPaid")
.storageSpace(300)
.partitionNumber(350)
.projectName("default")
.tags(InstanceTagArgs.builder()
.key("k1")
.value("v1")
.build())
.parameters(
InstanceParameterArgs.builder()
.parameterName("MessageMaxByte")
.parameterValue("12")
.build(),
InstanceParameterArgs.builder()
.parameterName("LogRetentionHours")
.parameterValue("70")
.build(),
InstanceParameterArgs.builder()
.parameterName("MessageTimestampType")
.parameterValue("CreateTime")
.build(),
InstanceParameterArgs.builder()
.parameterName("OffsetRetentionMinutes")
.parameterValue("10080")
.build(),
InstanceParameterArgs.builder()
.parameterName("AutoDeleteGroup")
.parameterValue("false")
.build())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.kafka.Instance("fooInstance",
instance_name="acc-test-kafka",
instance_description="tf-test",
version="2.2.2",
compute_spec="kafka.20xrate.hw",
subnet_id=foo_subnet.id,
user_name="tf-user",
user_password="tf-pass!@q1",
charge_type="PostPaid",
storage_space=300,
partition_number=350,
project_name="default",
tags=[volcengine.kafka.InstanceTagArgs(
key="k1",
value="v1",
)],
parameters=[
volcengine.kafka.InstanceParameterArgs(
parameter_name="MessageMaxByte",
parameter_value="12",
),
volcengine.kafka.InstanceParameterArgs(
parameter_name="LogRetentionHours",
parameter_value="70",
),
volcengine.kafka.InstanceParameterArgs(
parameter_name="MessageTimestampType",
parameter_value="CreateTime",
),
volcengine.kafka.InstanceParameterArgs(
parameter_name="OffsetRetentionMinutes",
parameter_value="10080",
),
volcengine.kafka.InstanceParameterArgs(
parameter_name="AutoDeleteGroup",
parameter_value="false",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.kafka.Instance("fooInstance", {
instanceName: "acc-test-kafka",
instanceDescription: "tf-test",
version: "2.2.2",
computeSpec: "kafka.20xrate.hw",
subnetId: fooSubnet.id,
userName: "tf-user",
userPassword: "tf-pass!@q1",
chargeType: "PostPaid",
storageSpace: 300,
partitionNumber: 350,
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
parameters: [
{
parameterName: "MessageMaxByte",
parameterValue: "12",
},
{
parameterName: "LogRetentionHours",
parameterValue: "70",
},
{
parameterName: "MessageTimestampType",
parameterValue: "CreateTime",
},
{
parameterName: "OffsetRetentionMinutes",
parameterValue: "10080",
},
{
parameterName: "AutoDeleteGroup",
parameterValue: "false",
},
],
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:kafka:Instance
properties:
instanceName: acc-test-kafka
instanceDescription: tf-test
version: 2.2.2
computeSpec: kafka.20xrate.hw
subnetId: ${fooSubnet.id}
userName: tf-user
userPassword: tf-pass!@q1
chargeType: PostPaid
storageSpace: 300
partitionNumber: 350
projectName: default
tags:
- key: k1
value: v1
parameters:
- parameterName: MessageMaxByte
parameterValue: '12'
- parameterName: LogRetentionHours
parameterValue: '70'
- parameterName: MessageTimestampType
parameterValue: CreateTime
- parameterName: OffsetRetentionMinutes
parameterValue: '10080'
- parameterName: AutoDeleteGroup
parameterValue: 'false'
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
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: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
subnet_id: Optional[str] = None,
charge_type: Optional[str] = None,
compute_spec: Optional[str] = None,
version: Optional[str] = None,
user_password: Optional[str] = None,
user_name: Optional[str] = None,
period: Optional[int] = None,
partition_number: Optional[int] = None,
auto_renew: Optional[bool] = None,
project_name: Optional[str] = None,
rebalance_time: Optional[str] = None,
storage_space: Optional[int] = None,
storage_type: Optional[str] = None,
parameters: Optional[Sequence[InstanceParameterArgs]] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
need_rebalance: Optional[bool] = None,
instance_name: Optional[str] = None,
instance_description: Optional[str] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: volcengine:kafka: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 exampleinstanceResourceResourceFromKafkainstance = new Volcengine.Kafka.Instance("exampleinstanceResourceResourceFromKafkainstance", new()
{
SubnetId = "string",
ChargeType = "string",
ComputeSpec = "string",
Version = "string",
UserPassword = "string",
UserName = "string",
Period = 0,
PartitionNumber = 0,
AutoRenew = false,
ProjectName = "string",
RebalanceTime = "string",
StorageSpace = 0,
StorageType = "string",
Parameters = new[]
{
new Volcengine.Kafka.Inputs.InstanceParameterArgs
{
ParameterName = "string",
ParameterValue = "string",
},
},
Tags = new[]
{
new Volcengine.Kafka.Inputs.InstanceTagArgs
{
Key = "string",
Value = "string",
},
},
NeedRebalance = false,
InstanceName = "string",
InstanceDescription = "string",
});
example, err := kafka.NewInstance(ctx, "exampleinstanceResourceResourceFromKafkainstance", &kafka.InstanceArgs{
SubnetId: pulumi.String("string"),
ChargeType: pulumi.String("string"),
ComputeSpec: pulumi.String("string"),
Version: pulumi.String("string"),
UserPassword: pulumi.String("string"),
UserName: pulumi.String("string"),
Period: pulumi.Int(0),
PartitionNumber: pulumi.Int(0),
AutoRenew: pulumi.Bool(false),
ProjectName: pulumi.String("string"),
RebalanceTime: pulumi.String("string"),
StorageSpace: pulumi.Int(0),
StorageType: pulumi.String("string"),
Parameters: kafka.InstanceParameterArray{
&kafka.InstanceParameterArgs{
ParameterName: pulumi.String("string"),
ParameterValue: pulumi.String("string"),
},
},
Tags: kafka.InstanceTagArray{
&kafka.InstanceTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
NeedRebalance: pulumi.Bool(false),
InstanceName: pulumi.String("string"),
InstanceDescription: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromKafkainstance = new Instance("exampleinstanceResourceResourceFromKafkainstance", InstanceArgs.builder()
.subnetId("string")
.chargeType("string")
.computeSpec("string")
.version("string")
.userPassword("string")
.userName("string")
.period(0)
.partitionNumber(0)
.autoRenew(false)
.projectName("string")
.rebalanceTime("string")
.storageSpace(0)
.storageType("string")
.parameters(InstanceParameterArgs.builder()
.parameterName("string")
.parameterValue("string")
.build())
.tags(InstanceTagArgs.builder()
.key("string")
.value("string")
.build())
.needRebalance(false)
.instanceName("string")
.instanceDescription("string")
.build());
exampleinstance_resource_resource_from_kafkainstance = volcengine.kafka.Instance("exampleinstanceResourceResourceFromKafkainstance",
subnet_id="string",
charge_type="string",
compute_spec="string",
version="string",
user_password="string",
user_name="string",
period=0,
partition_number=0,
auto_renew=False,
project_name="string",
rebalance_time="string",
storage_space=0,
storage_type="string",
parameters=[{
"parameter_name": "string",
"parameter_value": "string",
}],
tags=[{
"key": "string",
"value": "string",
}],
need_rebalance=False,
instance_name="string",
instance_description="string")
const exampleinstanceResourceResourceFromKafkainstance = new volcengine.kafka.Instance("exampleinstanceResourceResourceFromKafkainstance", {
subnetId: "string",
chargeType: "string",
computeSpec: "string",
version: "string",
userPassword: "string",
userName: "string",
period: 0,
partitionNumber: 0,
autoRenew: false,
projectName: "string",
rebalanceTime: "string",
storageSpace: 0,
storageType: "string",
parameters: [{
parameterName: "string",
parameterValue: "string",
}],
tags: [{
key: "string",
value: "string",
}],
needRebalance: false,
instanceName: "string",
instanceDescription: "string",
});
type: volcengine:kafka:Instance
properties:
autoRenew: false
chargeType: string
computeSpec: string
instanceDescription: string
instanceName: string
needRebalance: false
parameters:
- parameterName: string
parameterValue: string
partitionNumber: 0
period: 0
projectName: string
rebalanceTime: string
storageSpace: 0
storageType: string
subnetId: string
tags:
- key: string
value: string
userName: string
userPassword: string
version: 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:
- Charge
Type string - The charge type of instance, the value can be
PrePaid
orPostPaid
. - Compute
Spec string - The compute spec of instance.
- Subnet
Id string - The subnet id of instance.
- User
Name string - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- User
Password string - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Version string
- The version of instance, the value can be
2.2.2
or2.8.2
. - Auto
Renew bool - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- Instance
Description string - The description of instance.
- Instance
Name string - The name of instance.
- Need
Rebalance bool - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- Parameters
List<Instance
Parameter> - Parameter of the instance.
- Partition
Number int - The partition number of instance.
- Period int
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- Project
Name string - The project name of instance.
- Rebalance
Time string - The rebalance time.
- Storage
Space int - The storage space of instance.
- Storage
Type string - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- List<Instance
Tag> - The tags of instance.
- Charge
Type string - The charge type of instance, the value can be
PrePaid
orPostPaid
. - Compute
Spec string - The compute spec of instance.
- Subnet
Id string - The subnet id of instance.
- User
Name string - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- User
Password string - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Version string
- The version of instance, the value can be
2.2.2
or2.8.2
. - Auto
Renew bool - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- Instance
Description string - The description of instance.
- Instance
Name string - The name of instance.
- Need
Rebalance bool - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- Parameters
[]Instance
Parameter Args - Parameter of the instance.
- Partition
Number int - The partition number of instance.
- Period int
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- Project
Name string - The project name of instance.
- Rebalance
Time string - The rebalance time.
- Storage
Space int - The storage space of instance.
- Storage
Type string - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- []Instance
Tag Args - The tags of instance.
- charge
Type String - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute
Spec String - The compute spec of instance.
- subnet
Id String - The subnet id of instance.
- user
Name String - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user
Password String - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version String
- The version of instance, the value can be
2.2.2
or2.8.2
. - auto
Renew Boolean - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- instance
Description String - The description of instance.
- instance
Name String - The name of instance.
- need
Rebalance Boolean - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters
List<Instance
Parameter> - Parameter of the instance.
- partition
Number Integer - The partition number of instance.
- period Integer
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project
Name String - The project name of instance.
- rebalance
Time String - The rebalance time.
- storage
Space Integer - The storage space of instance.
- storage
Type String - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- List<Instance
Tag> - The tags of instance.
- charge
Type string - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute
Spec string - The compute spec of instance.
- subnet
Id string - The subnet id of instance.
- user
Name string - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user
Password string - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version string
- The version of instance, the value can be
2.2.2
or2.8.2
. - auto
Renew boolean - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- instance
Description string - The description of instance.
- instance
Name string - The name of instance.
- need
Rebalance boolean - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters
Instance
Parameter[] - Parameter of the instance.
- partition
Number number - The partition number of instance.
- period number
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project
Name string - The project name of instance.
- rebalance
Time string - The rebalance time.
- storage
Space number - The storage space of instance.
- storage
Type string - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- Instance
Tag[] - The tags of instance.
- charge_
type str - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute_
spec str - The compute spec of instance.
- subnet_
id str - The subnet id of instance.
- user_
name str - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user_
password str - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version str
- The version of instance, the value can be
2.2.2
or2.8.2
. - auto_
renew bool - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- instance_
description str - The description of instance.
- instance_
name str - The name of instance.
- need_
rebalance bool - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters
Sequence[Instance
Parameter Args] - Parameter of the instance.
- partition_
number int - The partition number of instance.
- period int
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project_
name str - The project name of instance.
- rebalance_
time str - The rebalance time.
- storage_
space int - The storage space of instance.
- storage_
type str - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- Sequence[Instance
Tag Args] - The tags of instance.
- charge
Type String - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute
Spec String - The compute spec of instance.
- subnet
Id String - The subnet id of instance.
- user
Name String - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user
Password String - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version String
- The version of instance, the value can be
2.2.2
or2.8.2
. - auto
Renew Boolean - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- instance
Description String - The description of instance.
- instance
Name String - The name of instance.
- need
Rebalance Boolean - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters List<Property Map>
- Parameter of the instance.
- partition
Number Number - The partition number of instance.
- period Number
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project
Name String - The project name of instance.
- rebalance
Time String - The rebalance time.
- storage
Space Number - The storage space of instance.
- storage
Type String - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- List<Property Map>
- The tags of 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,
auto_renew: Optional[bool] = None,
charge_type: Optional[str] = None,
compute_spec: Optional[str] = None,
instance_description: Optional[str] = None,
instance_name: Optional[str] = None,
need_rebalance: Optional[bool] = None,
parameters: Optional[Sequence[InstanceParameterArgs]] = None,
partition_number: Optional[int] = None,
period: Optional[int] = None,
project_name: Optional[str] = None,
rebalance_time: Optional[str] = None,
storage_space: Optional[int] = None,
storage_type: Optional[str] = None,
subnet_id: Optional[str] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
user_name: Optional[str] = None,
user_password: Optional[str] = None,
version: Optional[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.
- Auto
Renew bool - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- Charge
Type string - The charge type of instance, the value can be
PrePaid
orPostPaid
. - Compute
Spec string - The compute spec of instance.
- Instance
Description string - The description of instance.
- Instance
Name string - The name of instance.
- Need
Rebalance bool - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- Parameters
List<Instance
Parameter> - Parameter of the instance.
- Partition
Number int - The partition number of instance.
- Period int
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- Project
Name string - The project name of instance.
- Rebalance
Time string - The rebalance time.
- Storage
Space int - The storage space of instance.
- Storage
Type string - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- Subnet
Id string - The subnet id of instance.
- List<Instance
Tag> - The tags of instance.
- User
Name string - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- User
Password string - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Version string
- The version of instance, the value can be
2.2.2
or2.8.2
.
- Auto
Renew bool - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- Charge
Type string - The charge type of instance, the value can be
PrePaid
orPostPaid
. - Compute
Spec string - The compute spec of instance.
- Instance
Description string - The description of instance.
- Instance
Name string - The name of instance.
- Need
Rebalance bool - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- Parameters
[]Instance
Parameter Args - Parameter of the instance.
- Partition
Number int - The partition number of instance.
- Period int
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- Project
Name string - The project name of instance.
- Rebalance
Time string - The rebalance time.
- Storage
Space int - The storage space of instance.
- Storage
Type string - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- Subnet
Id string - The subnet id of instance.
- []Instance
Tag Args - The tags of instance.
- User
Name string - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- User
Password string - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Version string
- The version of instance, the value can be
2.2.2
or2.8.2
.
- auto
Renew Boolean - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- charge
Type String - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute
Spec String - The compute spec of instance.
- instance
Description String - The description of instance.
- instance
Name String - The name of instance.
- need
Rebalance Boolean - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters
List<Instance
Parameter> - Parameter of the instance.
- partition
Number Integer - The partition number of instance.
- period Integer
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project
Name String - The project name of instance.
- rebalance
Time String - The rebalance time.
- storage
Space Integer - The storage space of instance.
- storage
Type String - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- subnet
Id String - The subnet id of instance.
- List<Instance
Tag> - The tags of instance.
- user
Name String - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user
Password String - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version String
- The version of instance, the value can be
2.2.2
or2.8.2
.
- auto
Renew boolean - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- charge
Type string - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute
Spec string - The compute spec of instance.
- instance
Description string - The description of instance.
- instance
Name string - The name of instance.
- need
Rebalance boolean - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters
Instance
Parameter[] - Parameter of the instance.
- partition
Number number - The partition number of instance.
- period number
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project
Name string - The project name of instance.
- rebalance
Time string - The rebalance time.
- storage
Space number - The storage space of instance.
- storage
Type string - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- subnet
Id string - The subnet id of instance.
- Instance
Tag[] - The tags of instance.
- user
Name string - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user
Password string - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version string
- The version of instance, the value can be
2.2.2
or2.8.2
.
- auto_
renew bool - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- charge_
type str - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute_
spec str - The compute spec of instance.
- instance_
description str - The description of instance.
- instance_
name str - The name of instance.
- need_
rebalance bool - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters
Sequence[Instance
Parameter Args] - Parameter of the instance.
- partition_
number int - The partition number of instance.
- period int
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project_
name str - The project name of instance.
- rebalance_
time str - The rebalance time.
- storage_
space int - The storage space of instance.
- storage_
type str - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- subnet_
id str - The subnet id of instance.
- Sequence[Instance
Tag Args] - The tags of instance.
- user_
name str - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user_
password str - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version str
- The version of instance, the value can be
2.2.2
or2.8.2
.
- auto
Renew Boolean - The auto renew flag of instance. Only effective when instance_charge_type is PrePaid. Default is false.
- charge
Type String - The charge type of instance, the value can be
PrePaid
orPostPaid
. - compute
Spec String - The compute spec of instance.
- instance
Description String - The description of instance.
- instance
Name String - The name of instance.
- need
Rebalance Boolean - Whether enable rebalance. Only effected in modify when compute_spec field is changed.
- parameters List<Property Map>
- Parameter of the instance.
- partition
Number Number - The partition number of instance.
- period Number
- The period of instance. Only effective when instance_charge_type is PrePaid. Unit is Month.
- project
Name String - The project name of instance.
- rebalance
Time String - The rebalance time.
- storage
Space Number - The storage space of instance.
- storage
Type String - The storage type of instance. The value can be ESSD_FlexPL or ESSD_PL0.
- subnet
Id String - The subnet id of instance.
- List<Property Map>
- The tags of instance.
- user
Name String - The user name of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- user
Password String - The user password of instance. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- version String
- The version of instance, the value can be
2.2.2
or2.8.2
.
Supporting Types
InstanceParameter, InstanceParameterArgs
- Parameter
Name string - Parameter name.
- Parameter
Value string - Parameter value.
- Parameter
Name string - Parameter name.
- Parameter
Value string - Parameter value.
- parameter
Name String - Parameter name.
- parameter
Value String - Parameter value.
- parameter
Name string - Parameter name.
- parameter
Value string - Parameter value.
- parameter_
name str - Parameter name.
- parameter_
value str - Parameter value.
- parameter
Name String - Parameter name.
- parameter
Value String - Parameter value.
InstanceTag, InstanceTagArgs
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.