alicloud.kms.Instance
Explore with Pulumi AI
Provides a KMS Instance resource.
For information about KMS Instance and how to use it, see What is Instance.
NOTE: Available since v1.210.0.
Example Usage
Create a subscription kms instance
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as std from "@pulumi/std";
const config = new pulumi.Config();
const region = config.get("region") || "cn-hangzhou";
const name = config.get("name") || "terraform-example";
const current = alicloud.getAccount({});
const vpc_amp_instance_example = new alicloud.vpc.Network("vpc-amp-instance-example", {
cidrBlock: "172.16.0.0/12",
vpcName: name,
});
const vswitch = new alicloud.vpc.Switch("vswitch", {
vpcId: vpc_amp_instance_example.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const vswitch_j = new alicloud.vpc.Switch("vswitch-j", {
vpcId: vpc_amp_instance_example.id,
zoneId: "cn-hangzhou-j",
cidrBlock: "172.16.2.0/24",
});
const shareVPC = new alicloud.vpc.Network("shareVPC", {
cidrBlock: "172.16.0.0/12",
vpcName: std.format({
input: "%s3",
args: [name],
}).then(invoke => invoke.result),
});
const shareVswitch = new alicloud.vpc.Switch("shareVswitch", {
vpcId: shareVPC.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const share_VPC2 = new alicloud.vpc.Network("share-VPC2", {
cidrBlock: "172.16.0.0/12",
vpcName: std.format({
input: "%s5",
args: [name],
}).then(invoke => invoke.result),
});
const share_vswitch2 = new alicloud.vpc.Switch("share-vswitch2", {
vpcId: share_VPC2.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const share_VPC3 = new alicloud.vpc.Network("share-VPC3", {
cidrBlock: "172.16.0.0/12",
vpcName: std.format({
input: "%s7",
args: [name],
}).then(invoke => invoke.result),
});
const share_vsw3 = new alicloud.vpc.Switch("share-vsw3", {
vpcId: share_VPC3.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const _default = new alicloud.kms.Instance("default", {
vpcNum: 7,
keyNum: 1000,
secretNum: 0,
spec: 1000,
renewStatus: "ManualRenewal",
productVersion: "3",
renewPeriod: 3,
vpcId: vswitch.vpcId,
zoneIds: [
"cn-hangzhou-k",
"cn-hangzhou-j",
],
vswitchIds: [vswitch_j.id],
bindVpcs: [
{
vpcId: shareVswitch.vpcId,
regionId: region,
vswitchId: shareVswitch.id,
vpcOwnerId: current.then(current => current.id),
},
{
vpcId: share_vswitch2.vpcId,
regionId: region,
vswitchId: share_vswitch2.id,
vpcOwnerId: current.then(current => current.id),
},
{
vpcId: share_vsw3.vpcId,
regionId: region,
vswitchId: share_vsw3.id,
vpcOwnerId: current.then(current => current.id),
},
],
log: "0",
period: 1,
logStorage: 0,
paymentType: "Subscription",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_std as std
config = pulumi.Config()
region = config.get("region")
if region is None:
region = "cn-hangzhou"
name = config.get("name")
if name is None:
name = "terraform-example"
current = alicloud.get_account()
vpc_amp_instance_example = alicloud.vpc.Network("vpc-amp-instance-example",
cidr_block="172.16.0.0/12",
vpc_name=name)
vswitch = alicloud.vpc.Switch("vswitch",
vpc_id=vpc_amp_instance_example.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
vswitch_j = alicloud.vpc.Switch("vswitch-j",
vpc_id=vpc_amp_instance_example.id,
zone_id="cn-hangzhou-j",
cidr_block="172.16.2.0/24")
share_vpc = alicloud.vpc.Network("shareVPC",
cidr_block="172.16.0.0/12",
vpc_name=std.format(input="%s3",
args=[name]).result)
share_vswitch = alicloud.vpc.Switch("shareVswitch",
vpc_id=share_vpc.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
share__vpc2 = alicloud.vpc.Network("share-VPC2",
cidr_block="172.16.0.0/12",
vpc_name=std.format(input="%s5",
args=[name]).result)
share_vswitch2 = alicloud.vpc.Switch("share-vswitch2",
vpc_id=share__vpc2.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
share__vpc3 = alicloud.vpc.Network("share-VPC3",
cidr_block="172.16.0.0/12",
vpc_name=std.format(input="%s7",
args=[name]).result)
share_vsw3 = alicloud.vpc.Switch("share-vsw3",
vpc_id=share__vpc3.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
default = alicloud.kms.Instance("default",
vpc_num=7,
key_num=1000,
secret_num=0,
spec=1000,
renew_status="ManualRenewal",
product_version="3",
renew_period=3,
vpc_id=vswitch.vpc_id,
zone_ids=[
"cn-hangzhou-k",
"cn-hangzhou-j",
],
vswitch_ids=[vswitch_j.id],
bind_vpcs=[
{
"vpc_id": share_vswitch.vpc_id,
"region_id": region,
"vswitch_id": share_vswitch.id,
"vpc_owner_id": current.id,
},
{
"vpc_id": share_vswitch2.vpc_id,
"region_id": region,
"vswitch_id": share_vswitch2.id,
"vpc_owner_id": current.id,
},
{
"vpc_id": share_vsw3.vpc_id,
"region_id": region,
"vswitch_id": share_vsw3.id,
"vpc_owner_id": current.id,
},
],
log="0",
period=1,
log_storage=0,
payment_type="Subscription")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-std/sdk/go/std"
"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, "")
region := "cn-hangzhou"
if param := cfg.Get("region"); param != "" {
region = param
}
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
current, err := alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
vpc_amp_instance_example, err := vpc.NewNetwork(ctx, "vpc-amp-instance-example", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(name),
})
if err != nil {
return err
}
vswitch, err := vpc.NewSwitch(ctx, "vswitch", &vpc.SwitchArgs{
VpcId: vpc_amp_instance_example.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
vswitch_j, err := vpc.NewSwitch(ctx, "vswitch-j", &vpc.SwitchArgs{
VpcId: vpc_amp_instance_example.ID(),
ZoneId: pulumi.String("cn-hangzhou-j"),
CidrBlock: pulumi.String("172.16.2.0/24"),
})
if err != nil {
return err
}
invokeFormat, err := std.Format(ctx, &std.FormatArgs{
Input: "%s3",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
shareVPC, err := vpc.NewNetwork(ctx, "shareVPC", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(invokeFormat.Result),
})
if err != nil {
return err
}
shareVswitch, err := vpc.NewSwitch(ctx, "shareVswitch", &vpc.SwitchArgs{
VpcId: shareVPC.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
invokeFormat1, err := std.Format(ctx, &std.FormatArgs{
Input: "%s5",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
share_VPC2, err := vpc.NewNetwork(ctx, "share-VPC2", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(invokeFormat1.Result),
})
if err != nil {
return err
}
share_vswitch2, err := vpc.NewSwitch(ctx, "share-vswitch2", &vpc.SwitchArgs{
VpcId: share_VPC2.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
invokeFormat2, err := std.Format(ctx, &std.FormatArgs{
Input: "%s7",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
share_VPC3, err := vpc.NewNetwork(ctx, "share-VPC3", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(invokeFormat2.Result),
})
if err != nil {
return err
}
share_vsw3, err := vpc.NewSwitch(ctx, "share-vsw3", &vpc.SwitchArgs{
VpcId: share_VPC3.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
_, err = kms.NewInstance(ctx, "default", &kms.InstanceArgs{
VpcNum: pulumi.Int(7),
KeyNum: pulumi.Int(1000),
SecretNum: pulumi.Int(0),
Spec: pulumi.Int(1000),
RenewStatus: pulumi.String("ManualRenewal"),
ProductVersion: pulumi.String("3"),
RenewPeriod: pulumi.Int(3),
VpcId: vswitch.VpcId,
ZoneIds: pulumi.StringArray{
pulumi.String("cn-hangzhou-k"),
pulumi.String("cn-hangzhou-j"),
},
VswitchIds: pulumi.StringArray{
vswitch_j.ID(),
},
BindVpcs: kms.InstanceBindVpcArray{
&kms.InstanceBindVpcArgs{
VpcId: shareVswitch.VpcId,
RegionId: pulumi.String(region),
VswitchId: shareVswitch.ID(),
VpcOwnerId: pulumi.String(current.Id),
},
&kms.InstanceBindVpcArgs{
VpcId: share_vswitch2.VpcId,
RegionId: pulumi.String(region),
VswitchId: share_vswitch2.ID(),
VpcOwnerId: pulumi.String(current.Id),
},
&kms.InstanceBindVpcArgs{
VpcId: share_vsw3.VpcId,
RegionId: pulumi.String(region),
VswitchId: share_vsw3.ID(),
VpcOwnerId: pulumi.String(current.Id),
},
},
Log: pulumi.String("0"),
Period: pulumi.Int(1),
LogStorage: pulumi.Int(0),
PaymentType: pulumi.String("Subscription"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var region = config.Get("region") ?? "cn-hangzhou";
var name = config.Get("name") ?? "terraform-example";
var current = AliCloud.GetAccount.Invoke();
var vpc_amp_instance_example = new AliCloud.Vpc.Network("vpc-amp-instance-example", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = name,
});
var vswitch = new AliCloud.Vpc.Switch("vswitch", new()
{
VpcId = vpc_amp_instance_example.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var vswitch_j = new AliCloud.Vpc.Switch("vswitch-j", new()
{
VpcId = vpc_amp_instance_example.Id,
ZoneId = "cn-hangzhou-j",
CidrBlock = "172.16.2.0/24",
});
var shareVPC = new AliCloud.Vpc.Network("shareVPC", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = Std.Format.Invoke(new()
{
Input = "%s3",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
});
var shareVswitch = new AliCloud.Vpc.Switch("shareVswitch", new()
{
VpcId = shareVPC.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var share_VPC2 = new AliCloud.Vpc.Network("share-VPC2", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = Std.Format.Invoke(new()
{
Input = "%s5",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
});
var share_vswitch2 = new AliCloud.Vpc.Switch("share-vswitch2", new()
{
VpcId = share_VPC2.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var share_VPC3 = new AliCloud.Vpc.Network("share-VPC3", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = Std.Format.Invoke(new()
{
Input = "%s7",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
});
var share_vsw3 = new AliCloud.Vpc.Switch("share-vsw3", new()
{
VpcId = share_VPC3.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var @default = new AliCloud.Kms.Instance("default", new()
{
VpcNum = 7,
KeyNum = 1000,
SecretNum = 0,
Spec = 1000,
RenewStatus = "ManualRenewal",
ProductVersion = "3",
RenewPeriod = 3,
VpcId = vswitch.VpcId,
ZoneIds = new[]
{
"cn-hangzhou-k",
"cn-hangzhou-j",
},
VswitchIds = new[]
{
vswitch_j.Id,
},
BindVpcs = new[]
{
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
VpcId = shareVswitch.VpcId,
RegionId = region,
VswitchId = shareVswitch.Id,
VpcOwnerId = current.Apply(getAccountResult => getAccountResult.Id),
},
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
VpcId = share_vswitch2.VpcId,
RegionId = region,
VswitchId = share_vswitch2.Id,
VpcOwnerId = current.Apply(getAccountResult => getAccountResult.Id),
},
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
VpcId = share_vsw3.VpcId,
RegionId = region,
VswitchId = share_vsw3.Id,
VpcOwnerId = current.Apply(getAccountResult => getAccountResult.Id),
},
},
Log = "0",
Period = 1,
LogStorage = 0,
PaymentType = "Subscription",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FormatArgs;
import com.pulumi.alicloud.kms.Instance;
import com.pulumi.alicloud.kms.InstanceArgs;
import com.pulumi.alicloud.kms.inputs.InstanceBindVpcArgs;
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 region = config.get("region").orElse("cn-hangzhou");
final var name = config.get("name").orElse("terraform-example");
final var current = AlicloudFunctions.getAccount(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var vpc_amp_instance_example = new Network("vpc-amp-instance-example", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(name)
.build());
var vswitch = new Switch("vswitch", SwitchArgs.builder()
.vpcId(vpc_amp_instance_example.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var vswitch_j = new Switch("vswitch-j", SwitchArgs.builder()
.vpcId(vpc_amp_instance_example.id())
.zoneId("cn-hangzhou-j")
.cidrBlock("172.16.2.0/24")
.build());
var shareVPC = new Network("shareVPC", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(StdFunctions.format(FormatArgs.builder()
.input("%s3")
.args(name)
.build()).result())
.build());
var shareVswitch = new Switch("shareVswitch", SwitchArgs.builder()
.vpcId(shareVPC.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var share_VPC2 = new Network("share-VPC2", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(StdFunctions.format(FormatArgs.builder()
.input("%s5")
.args(name)
.build()).result())
.build());
var share_vswitch2 = new Switch("share-vswitch2", SwitchArgs.builder()
.vpcId(share_VPC2.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var share_VPC3 = new Network("share-VPC3", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(StdFunctions.format(FormatArgs.builder()
.input("%s7")
.args(name)
.build()).result())
.build());
var share_vsw3 = new Switch("share-vsw3", SwitchArgs.builder()
.vpcId(share_VPC3.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var default_ = new Instance("default", InstanceArgs.builder()
.vpcNum(7)
.keyNum(1000)
.secretNum(0)
.spec(1000)
.renewStatus("ManualRenewal")
.productVersion("3")
.renewPeriod(3)
.vpcId(vswitch.vpcId())
.zoneIds(
"cn-hangzhou-k",
"cn-hangzhou-j")
.vswitchIds(vswitch_j.id())
.bindVpcs(
InstanceBindVpcArgs.builder()
.vpcId(shareVswitch.vpcId())
.regionId(region)
.vswitchId(shareVswitch.id())
.vpcOwnerId(current.id())
.build(),
InstanceBindVpcArgs.builder()
.vpcId(share_vswitch2.vpcId())
.regionId(region)
.vswitchId(share_vswitch2.id())
.vpcOwnerId(current.id())
.build(),
InstanceBindVpcArgs.builder()
.vpcId(share_vsw3.vpcId())
.regionId(region)
.vswitchId(share_vsw3.id())
.vpcOwnerId(current.id())
.build())
.log("0")
.period(1)
.logStorage(0)
.paymentType("Subscription")
.build());
}
}
configuration:
region:
type: string
default: cn-hangzhou
name:
type: string
default: terraform-example
resources:
vpc-amp-instance-example:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName: ${name}
vswitch:
type: alicloud:vpc:Switch
properties:
vpcId: ${["vpc-amp-instance-example"].id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
vswitch-j:
type: alicloud:vpc:Switch
properties:
vpcId: ${["vpc-amp-instance-example"].id}
zoneId: cn-hangzhou-j
cidrBlock: 172.16.2.0/24
shareVPC:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName:
fn::invoke:
function: std:format
arguments:
input: '%s3'
args:
- ${name}
return: result
shareVswitch:
type: alicloud:vpc:Switch
properties:
vpcId: ${shareVPC.id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
share-VPC2:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName:
fn::invoke:
function: std:format
arguments:
input: '%s5'
args:
- ${name}
return: result
share-vswitch2:
type: alicloud:vpc:Switch
properties:
vpcId: ${["share-VPC2"].id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
share-VPC3:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName:
fn::invoke:
function: std:format
arguments:
input: '%s7'
args:
- ${name}
return: result
share-vsw3:
type: alicloud:vpc:Switch
properties:
vpcId: ${["share-VPC3"].id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
default:
type: alicloud:kms:Instance
properties:
vpcNum: '7'
keyNum: '1000'
secretNum: '0'
spec: '1000'
renewStatus: ManualRenewal
productVersion: '3'
renewPeriod: '3'
vpcId: ${vswitch.vpcId}
zoneIds:
- cn-hangzhou-k
- cn-hangzhou-j
vswitchIds:
- ${["vswitch-j"].id}
bindVpcs:
- vpcId: ${shareVswitch.vpcId}
regionId: ${region}
vswitchId: ${shareVswitch.id}
vpcOwnerId: ${current.id}
- vpcId: ${["share-vswitch2"].vpcId}
regionId: ${region}
vswitchId: ${["share-vswitch2"].id}
vpcOwnerId: ${current.id}
- vpcId: ${["share-vsw3"].vpcId}
regionId: ${region}
vswitchId: ${["share-vsw3"].id}
vpcOwnerId: ${current.id}
log: '0'
period: '1'
logStorage: '0'
paymentType: Subscription
variables:
current:
fn::invoke:
function: alicloud:getAccount
arguments: {}
Create a pay-as-you-go kms instance
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as std from "@pulumi/std";
const config = new pulumi.Config();
const region = config.get("region") || "cn-hangzhou";
const name = config.get("name") || "terraform-example";
const current = alicloud.getAccount({});
const vpc_amp_instance_example = new alicloud.vpc.Network("vpc-amp-instance-example", {
cidrBlock: "172.16.0.0/12",
vpcName: name,
});
const vswitch = new alicloud.vpc.Switch("vswitch", {
vpcId: vpc_amp_instance_example.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const vswitch_j = new alicloud.vpc.Switch("vswitch-j", {
vpcId: vpc_amp_instance_example.id,
zoneId: "cn-hangzhou-j",
cidrBlock: "172.16.2.0/24",
});
const shareVPC = new alicloud.vpc.Network("shareVPC", {
cidrBlock: "172.16.0.0/12",
vpcName: std.format({
input: "%s3",
args: [name],
}).then(invoke => invoke.result),
});
const shareVswitch = new alicloud.vpc.Switch("shareVswitch", {
vpcId: shareVPC.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const share_VPC2 = new alicloud.vpc.Network("share-VPC2", {
cidrBlock: "172.16.0.0/12",
vpcName: std.format({
input: "%s5",
args: [name],
}).then(invoke => invoke.result),
});
const share_vswitch2 = new alicloud.vpc.Switch("share-vswitch2", {
vpcId: share_VPC2.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const share_VPC3 = new alicloud.vpc.Network("share-VPC3", {
cidrBlock: "172.16.0.0/12",
vpcName: std.format({
input: "%s7",
args: [name],
}).then(invoke => invoke.result),
});
const share_vsw3 = new alicloud.vpc.Switch("share-vsw3", {
vpcId: share_VPC3.id,
zoneId: "cn-hangzhou-k",
cidrBlock: "172.16.1.0/24",
});
const _default = new alicloud.kms.Instance("default", {
paymentType: "PayAsYouGo",
productVersion: "3",
vpcId: vswitch.vpcId,
zoneIds: [
vswitch.zoneId,
vswitch_j.zoneId,
],
vswitchIds: [vswitch.id],
forceDeleteWithoutBackup: "true",
bindVpcs: [
{
vpcId: shareVswitch.vpcId,
regionId: region,
vswitchId: shareVswitch.id,
vpcOwnerId: current.then(current => current.id),
},
{
vpcId: share_vswitch2.vpcId,
regionId: region,
vswitchId: share_vswitch2.id,
vpcOwnerId: current.then(current => current.id),
},
{
vpcId: share_vsw3.vpcId,
regionId: region,
vswitchId: share_vsw3.id,
vpcOwnerId: current.then(current => current.id),
},
],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_std as std
config = pulumi.Config()
region = config.get("region")
if region is None:
region = "cn-hangzhou"
name = config.get("name")
if name is None:
name = "terraform-example"
current = alicloud.get_account()
vpc_amp_instance_example = alicloud.vpc.Network("vpc-amp-instance-example",
cidr_block="172.16.0.0/12",
vpc_name=name)
vswitch = alicloud.vpc.Switch("vswitch",
vpc_id=vpc_amp_instance_example.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
vswitch_j = alicloud.vpc.Switch("vswitch-j",
vpc_id=vpc_amp_instance_example.id,
zone_id="cn-hangzhou-j",
cidr_block="172.16.2.0/24")
share_vpc = alicloud.vpc.Network("shareVPC",
cidr_block="172.16.0.0/12",
vpc_name=std.format(input="%s3",
args=[name]).result)
share_vswitch = alicloud.vpc.Switch("shareVswitch",
vpc_id=share_vpc.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
share__vpc2 = alicloud.vpc.Network("share-VPC2",
cidr_block="172.16.0.0/12",
vpc_name=std.format(input="%s5",
args=[name]).result)
share_vswitch2 = alicloud.vpc.Switch("share-vswitch2",
vpc_id=share__vpc2.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
share__vpc3 = alicloud.vpc.Network("share-VPC3",
cidr_block="172.16.0.0/12",
vpc_name=std.format(input="%s7",
args=[name]).result)
share_vsw3 = alicloud.vpc.Switch("share-vsw3",
vpc_id=share__vpc3.id,
zone_id="cn-hangzhou-k",
cidr_block="172.16.1.0/24")
default = alicloud.kms.Instance("default",
payment_type="PayAsYouGo",
product_version="3",
vpc_id=vswitch.vpc_id,
zone_ids=[
vswitch.zone_id,
vswitch_j.zone_id,
],
vswitch_ids=[vswitch.id],
force_delete_without_backup="true",
bind_vpcs=[
{
"vpc_id": share_vswitch.vpc_id,
"region_id": region,
"vswitch_id": share_vswitch.id,
"vpc_owner_id": current.id,
},
{
"vpc_id": share_vswitch2.vpc_id,
"region_id": region,
"vswitch_id": share_vswitch2.id,
"vpc_owner_id": current.id,
},
{
"vpc_id": share_vsw3.vpc_id,
"region_id": region,
"vswitch_id": share_vsw3.id,
"vpc_owner_id": current.id,
},
])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-std/sdk/go/std"
"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, "")
region := "cn-hangzhou"
if param := cfg.Get("region"); param != "" {
region = param
}
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
current, err := alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
vpc_amp_instance_example, err := vpc.NewNetwork(ctx, "vpc-amp-instance-example", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(name),
})
if err != nil {
return err
}
vswitch, err := vpc.NewSwitch(ctx, "vswitch", &vpc.SwitchArgs{
VpcId: vpc_amp_instance_example.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
vswitch_j, err := vpc.NewSwitch(ctx, "vswitch-j", &vpc.SwitchArgs{
VpcId: vpc_amp_instance_example.ID(),
ZoneId: pulumi.String("cn-hangzhou-j"),
CidrBlock: pulumi.String("172.16.2.0/24"),
})
if err != nil {
return err
}
invokeFormat, err := std.Format(ctx, &std.FormatArgs{
Input: "%s3",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
shareVPC, err := vpc.NewNetwork(ctx, "shareVPC", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(invokeFormat.Result),
})
if err != nil {
return err
}
shareVswitch, err := vpc.NewSwitch(ctx, "shareVswitch", &vpc.SwitchArgs{
VpcId: shareVPC.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
invokeFormat1, err := std.Format(ctx, &std.FormatArgs{
Input: "%s5",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
share_VPC2, err := vpc.NewNetwork(ctx, "share-VPC2", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(invokeFormat1.Result),
})
if err != nil {
return err
}
share_vswitch2, err := vpc.NewSwitch(ctx, "share-vswitch2", &vpc.SwitchArgs{
VpcId: share_VPC2.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
invokeFormat2, err := std.Format(ctx, &std.FormatArgs{
Input: "%s7",
Args: []string{
name,
},
}, nil)
if err != nil {
return err
}
share_VPC3, err := vpc.NewNetwork(ctx, "share-VPC3", &vpc.NetworkArgs{
CidrBlock: pulumi.String("172.16.0.0/12"),
VpcName: pulumi.String(invokeFormat2.Result),
})
if err != nil {
return err
}
share_vsw3, err := vpc.NewSwitch(ctx, "share-vsw3", &vpc.SwitchArgs{
VpcId: share_VPC3.ID(),
ZoneId: pulumi.String("cn-hangzhou-k"),
CidrBlock: pulumi.String("172.16.1.0/24"),
})
if err != nil {
return err
}
_, err = kms.NewInstance(ctx, "default", &kms.InstanceArgs{
PaymentType: pulumi.String("PayAsYouGo"),
ProductVersion: pulumi.String("3"),
VpcId: vswitch.VpcId,
ZoneIds: pulumi.StringArray{
vswitch.ZoneId,
vswitch_j.ZoneId,
},
VswitchIds: pulumi.StringArray{
vswitch.ID(),
},
ForceDeleteWithoutBackup: pulumi.String("true"),
BindVpcs: kms.InstanceBindVpcArray{
&kms.InstanceBindVpcArgs{
VpcId: shareVswitch.VpcId,
RegionId: pulumi.String(region),
VswitchId: shareVswitch.ID(),
VpcOwnerId: pulumi.String(current.Id),
},
&kms.InstanceBindVpcArgs{
VpcId: share_vswitch2.VpcId,
RegionId: pulumi.String(region),
VswitchId: share_vswitch2.ID(),
VpcOwnerId: pulumi.String(current.Id),
},
&kms.InstanceBindVpcArgs{
VpcId: share_vsw3.VpcId,
RegionId: pulumi.String(region),
VswitchId: share_vsw3.ID(),
VpcOwnerId: pulumi.String(current.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var region = config.Get("region") ?? "cn-hangzhou";
var name = config.Get("name") ?? "terraform-example";
var current = AliCloud.GetAccount.Invoke();
var vpc_amp_instance_example = new AliCloud.Vpc.Network("vpc-amp-instance-example", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = name,
});
var vswitch = new AliCloud.Vpc.Switch("vswitch", new()
{
VpcId = vpc_amp_instance_example.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var vswitch_j = new AliCloud.Vpc.Switch("vswitch-j", new()
{
VpcId = vpc_amp_instance_example.Id,
ZoneId = "cn-hangzhou-j",
CidrBlock = "172.16.2.0/24",
});
var shareVPC = new AliCloud.Vpc.Network("shareVPC", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = Std.Format.Invoke(new()
{
Input = "%s3",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
});
var shareVswitch = new AliCloud.Vpc.Switch("shareVswitch", new()
{
VpcId = shareVPC.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var share_VPC2 = new AliCloud.Vpc.Network("share-VPC2", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = Std.Format.Invoke(new()
{
Input = "%s5",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
});
var share_vswitch2 = new AliCloud.Vpc.Switch("share-vswitch2", new()
{
VpcId = share_VPC2.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var share_VPC3 = new AliCloud.Vpc.Network("share-VPC3", new()
{
CidrBlock = "172.16.0.0/12",
VpcName = Std.Format.Invoke(new()
{
Input = "%s7",
Args = new[]
{
name,
},
}).Apply(invoke => invoke.Result),
});
var share_vsw3 = new AliCloud.Vpc.Switch("share-vsw3", new()
{
VpcId = share_VPC3.Id,
ZoneId = "cn-hangzhou-k",
CidrBlock = "172.16.1.0/24",
});
var @default = new AliCloud.Kms.Instance("default", new()
{
PaymentType = "PayAsYouGo",
ProductVersion = "3",
VpcId = vswitch.VpcId,
ZoneIds = new[]
{
vswitch.ZoneId,
vswitch_j.ZoneId,
},
VswitchIds = new[]
{
vswitch.Id,
},
ForceDeleteWithoutBackup = "true",
BindVpcs = new[]
{
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
VpcId = shareVswitch.VpcId,
RegionId = region,
VswitchId = shareVswitch.Id,
VpcOwnerId = current.Apply(getAccountResult => getAccountResult.Id),
},
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
VpcId = share_vswitch2.VpcId,
RegionId = region,
VswitchId = share_vswitch2.Id,
VpcOwnerId = current.Apply(getAccountResult => getAccountResult.Id),
},
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
VpcId = share_vsw3.VpcId,
RegionId = region,
VswitchId = share_vsw3.Id,
VpcOwnerId = current.Apply(getAccountResult => getAccountResult.Id),
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FormatArgs;
import com.pulumi.alicloud.kms.Instance;
import com.pulumi.alicloud.kms.InstanceArgs;
import com.pulumi.alicloud.kms.inputs.InstanceBindVpcArgs;
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 region = config.get("region").orElse("cn-hangzhou");
final var name = config.get("name").orElse("terraform-example");
final var current = AlicloudFunctions.getAccount(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var vpc_amp_instance_example = new Network("vpc-amp-instance-example", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(name)
.build());
var vswitch = new Switch("vswitch", SwitchArgs.builder()
.vpcId(vpc_amp_instance_example.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var vswitch_j = new Switch("vswitch-j", SwitchArgs.builder()
.vpcId(vpc_amp_instance_example.id())
.zoneId("cn-hangzhou-j")
.cidrBlock("172.16.2.0/24")
.build());
var shareVPC = new Network("shareVPC", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(StdFunctions.format(FormatArgs.builder()
.input("%s3")
.args(name)
.build()).result())
.build());
var shareVswitch = new Switch("shareVswitch", SwitchArgs.builder()
.vpcId(shareVPC.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var share_VPC2 = new Network("share-VPC2", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(StdFunctions.format(FormatArgs.builder()
.input("%s5")
.args(name)
.build()).result())
.build());
var share_vswitch2 = new Switch("share-vswitch2", SwitchArgs.builder()
.vpcId(share_VPC2.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var share_VPC3 = new Network("share-VPC3", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.vpcName(StdFunctions.format(FormatArgs.builder()
.input("%s7")
.args(name)
.build()).result())
.build());
var share_vsw3 = new Switch("share-vsw3", SwitchArgs.builder()
.vpcId(share_VPC3.id())
.zoneId("cn-hangzhou-k")
.cidrBlock("172.16.1.0/24")
.build());
var default_ = new Instance("default", InstanceArgs.builder()
.paymentType("PayAsYouGo")
.productVersion("3")
.vpcId(vswitch.vpcId())
.zoneIds(
vswitch.zoneId(),
vswitch_j.zoneId())
.vswitchIds(vswitch.id())
.forceDeleteWithoutBackup("true")
.bindVpcs(
InstanceBindVpcArgs.builder()
.vpcId(shareVswitch.vpcId())
.regionId(region)
.vswitchId(shareVswitch.id())
.vpcOwnerId(current.id())
.build(),
InstanceBindVpcArgs.builder()
.vpcId(share_vswitch2.vpcId())
.regionId(region)
.vswitchId(share_vswitch2.id())
.vpcOwnerId(current.id())
.build(),
InstanceBindVpcArgs.builder()
.vpcId(share_vsw3.vpcId())
.regionId(region)
.vswitchId(share_vsw3.id())
.vpcOwnerId(current.id())
.build())
.build());
}
}
configuration:
region:
type: string
default: cn-hangzhou
name:
type: string
default: terraform-example
resources:
vpc-amp-instance-example:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName: ${name}
vswitch:
type: alicloud:vpc:Switch
properties:
vpcId: ${["vpc-amp-instance-example"].id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
vswitch-j:
type: alicloud:vpc:Switch
properties:
vpcId: ${["vpc-amp-instance-example"].id}
zoneId: cn-hangzhou-j
cidrBlock: 172.16.2.0/24
shareVPC:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName:
fn::invoke:
function: std:format
arguments:
input: '%s3'
args:
- ${name}
return: result
shareVswitch:
type: alicloud:vpc:Switch
properties:
vpcId: ${shareVPC.id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
share-VPC2:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName:
fn::invoke:
function: std:format
arguments:
input: '%s5'
args:
- ${name}
return: result
share-vswitch2:
type: alicloud:vpc:Switch
properties:
vpcId: ${["share-VPC2"].id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
share-VPC3:
type: alicloud:vpc:Network
properties:
cidrBlock: 172.16.0.0/12
vpcName:
fn::invoke:
function: std:format
arguments:
input: '%s7'
args:
- ${name}
return: result
share-vsw3:
type: alicloud:vpc:Switch
properties:
vpcId: ${["share-VPC3"].id}
zoneId: cn-hangzhou-k
cidrBlock: 172.16.1.0/24
default:
type: alicloud:kms:Instance
properties:
paymentType: PayAsYouGo
productVersion: 3
vpcId: ${vswitch.vpcId}
zoneIds:
- ${vswitch.zoneId}
- ${["vswitch-j"].zoneId}
vswitchIds:
- ${vswitch.id}
forceDeleteWithoutBackup: true
bindVpcs:
- vpcId: ${shareVswitch.vpcId}
regionId: ${region}
vswitchId: ${shareVswitch.id}
vpcOwnerId: ${current.id}
- vpcId: ${["share-vswitch2"].vpcId}
regionId: ${region}
vswitchId: ${["share-vswitch2"].id}
vpcOwnerId: ${current.id}
- vpcId: ${["share-vsw3"].vpcId}
regionId: ${region}
vswitchId: ${["share-vsw3"].id}
vpcOwnerId: ${current.id}
variables:
current:
fn::invoke:
function: alicloud:getAccount
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,
vpc_id: Optional[str] = None,
zone_ids: Optional[Sequence[str]] = None,
vswitch_ids: Optional[Sequence[str]] = None,
product_version: Optional[str] = None,
renew_status: Optional[str] = None,
log_storage: Optional[int] = None,
payment_type: Optional[str] = None,
period: Optional[int] = None,
bind_vpcs: Optional[Sequence[InstanceBindVpcArgs]] = None,
renew_period: Optional[int] = None,
log: Optional[str] = None,
renewal_period_unit: Optional[str] = None,
secret_num: Optional[int] = None,
spec: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
key_num: Optional[int] = None,
vpc_num: Optional[int] = None,
instance_name: Optional[str] = None,
force_delete_without_backup: 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: alicloud:kms: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 exampleinstanceResourceResourceFromKmsinstance = new AliCloud.Kms.Instance("exampleinstanceResourceResourceFromKmsinstance", new()
{
VpcId = "string",
ZoneIds = new[]
{
"string",
},
VswitchIds = new[]
{
"string",
},
ProductVersion = "string",
RenewStatus = "string",
LogStorage = 0,
PaymentType = "string",
Period = 0,
BindVpcs = new[]
{
new AliCloud.Kms.Inputs.InstanceBindVpcArgs
{
RegionId = "string",
VpcId = "string",
VpcOwnerId = "string",
VswitchId = "string",
},
},
RenewPeriod = 0,
Log = "string",
RenewalPeriodUnit = "string",
SecretNum = 0,
Spec = 0,
Tags =
{
{ "string", "string" },
},
KeyNum = 0,
VpcNum = 0,
InstanceName = "string",
ForceDeleteWithoutBackup = "string",
});
example, err := kms.NewInstance(ctx, "exampleinstanceResourceResourceFromKmsinstance", &kms.InstanceArgs{
VpcId: pulumi.String("string"),
ZoneIds: pulumi.StringArray{
pulumi.String("string"),
},
VswitchIds: pulumi.StringArray{
pulumi.String("string"),
},
ProductVersion: pulumi.String("string"),
RenewStatus: pulumi.String("string"),
LogStorage: pulumi.Int(0),
PaymentType: pulumi.String("string"),
Period: pulumi.Int(0),
BindVpcs: kms.InstanceBindVpcArray{
&kms.InstanceBindVpcArgs{
RegionId: pulumi.String("string"),
VpcId: pulumi.String("string"),
VpcOwnerId: pulumi.String("string"),
VswitchId: pulumi.String("string"),
},
},
RenewPeriod: pulumi.Int(0),
Log: pulumi.String("string"),
RenewalPeriodUnit: pulumi.String("string"),
SecretNum: pulumi.Int(0),
Spec: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
KeyNum: pulumi.Int(0),
VpcNum: pulumi.Int(0),
InstanceName: pulumi.String("string"),
ForceDeleteWithoutBackup: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromKmsinstance = new com.pulumi.alicloud.kms.Instance("exampleinstanceResourceResourceFromKmsinstance", com.pulumi.alicloud.kms.InstanceArgs.builder()
.vpcId("string")
.zoneIds("string")
.vswitchIds("string")
.productVersion("string")
.renewStatus("string")
.logStorage(0)
.paymentType("string")
.period(0)
.bindVpcs(InstanceBindVpcArgs.builder()
.regionId("string")
.vpcId("string")
.vpcOwnerId("string")
.vswitchId("string")
.build())
.renewPeriod(0)
.log("string")
.renewalPeriodUnit("string")
.secretNum(0)
.spec(0)
.tags(Map.of("string", "string"))
.keyNum(0)
.vpcNum(0)
.instanceName("string")
.forceDeleteWithoutBackup("string")
.build());
exampleinstance_resource_resource_from_kmsinstance = alicloud.kms.Instance("exampleinstanceResourceResourceFromKmsinstance",
vpc_id="string",
zone_ids=["string"],
vswitch_ids=["string"],
product_version="string",
renew_status="string",
log_storage=0,
payment_type="string",
period=0,
bind_vpcs=[{
"region_id": "string",
"vpc_id": "string",
"vpc_owner_id": "string",
"vswitch_id": "string",
}],
renew_period=0,
log="string",
renewal_period_unit="string",
secret_num=0,
spec=0,
tags={
"string": "string",
},
key_num=0,
vpc_num=0,
instance_name="string",
force_delete_without_backup="string")
const exampleinstanceResourceResourceFromKmsinstance = new alicloud.kms.Instance("exampleinstanceResourceResourceFromKmsinstance", {
vpcId: "string",
zoneIds: ["string"],
vswitchIds: ["string"],
productVersion: "string",
renewStatus: "string",
logStorage: 0,
paymentType: "string",
period: 0,
bindVpcs: [{
regionId: "string",
vpcId: "string",
vpcOwnerId: "string",
vswitchId: "string",
}],
renewPeriod: 0,
log: "string",
renewalPeriodUnit: "string",
secretNum: 0,
spec: 0,
tags: {
string: "string",
},
keyNum: 0,
vpcNum: 0,
instanceName: "string",
forceDeleteWithoutBackup: "string",
});
type: alicloud:kms:Instance
properties:
bindVpcs:
- regionId: string
vpcId: string
vpcOwnerId: string
vswitchId: string
forceDeleteWithoutBackup: string
instanceName: string
keyNum: 0
log: string
logStorage: 0
paymentType: string
period: 0
productVersion: string
renewPeriod: 0
renewStatus: string
renewalPeriodUnit: string
secretNum: 0
spec: 0
tags:
string: string
vpcId: string
vpcNum: 0
vswitchIds:
- string
zoneIds:
- 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:
- Vpc
Id string - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- Vswitch
Ids List<string> - Instance bind vswitches
- Zone
Ids List<string> - zone id
- Bind
Vpcs List<Pulumi.Ali Cloud. Kms. Inputs. Instance Bind Vpc> - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - Force
Delete stringWithout Backup - Whether to force deletion even without backup.
- Instance
Name string - The name of the resource
- Key
Num int - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - Log string
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - Log
Storage int - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - Payment
Type string - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Product
Version string - KMS Instance commodity type (software/hardware)
- Renew
Period int - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Renew
Status string - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - Renewal
Period stringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- Secret
Num int - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Vpc
Num int - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
.
- Vpc
Id string - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- Vswitch
Ids []string - Instance bind vswitches
- Zone
Ids []string - zone id
- Bind
Vpcs []InstanceBind Vpc Args - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - Force
Delete stringWithout Backup - Whether to force deletion even without backup.
- Instance
Name string - The name of the resource
- Key
Num int - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - Log string
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - Log
Storage int - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - Payment
Type string - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Product
Version string - KMS Instance commodity type (software/hardware)
- Renew
Period int - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Renew
Status string - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - Renewal
Period stringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- Secret
Num int - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - map[string]string
- A mapping of tags to assign to the resource.
- Vpc
Num int - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
.
- vpc
Id String - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitch
Ids List<String> - Instance bind vswitches
- zone
Ids List<String> - zone id
- bind
Vpcs List<InstanceBind Vpc> - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - force
Delete StringWithout Backup - Whether to force deletion even without backup.
- instance
Name String - The name of the resource
- key
Num Integer - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log String
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log
Storage Integer - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment
Type String - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period Integer
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product
Version String - KMS Instance commodity type (software/hardware)
- renew
Period Integer - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew
Status String - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal
Period StringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret
Num Integer - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec Integer
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Map<String,String>
- A mapping of tags to assign to the resource.
- vpc
Num Integer - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
.
- vpc
Id string - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitch
Ids string[] - Instance bind vswitches
- zone
Ids string[] - zone id
- bind
Vpcs InstanceBind Vpc[] - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - force
Delete stringWithout Backup - Whether to force deletion even without backup.
- instance
Name string - The name of the resource
- key
Num number - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log string
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log
Storage number - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment
Type string - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period number
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product
Version string - KMS Instance commodity type (software/hardware)
- renew
Period number - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew
Status string - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal
Period stringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret
Num number - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec number
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- vpc
Num number - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
.
- vpc_
id str - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitch_
ids Sequence[str] - Instance bind vswitches
- zone_
ids Sequence[str] - zone id
- bind_
vpcs Sequence[InstanceBind Vpc Args] - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - force_
delete_ strwithout_ backup - Whether to force deletion even without backup.
- instance_
name str - The name of the resource
- key_
num int - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log str
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log_
storage int - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment_
type str - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period int
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product_
version str - KMS Instance commodity type (software/hardware)
- renew_
period int - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew_
status str - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal_
period_ strunit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret_
num int - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- vpc_
num int - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
.
- vpc
Id String - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitch
Ids List<String> - Instance bind vswitches
- zone
Ids List<String> - zone id
- bind
Vpcs List<Property Map> - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - force
Delete StringWithout Backup - Whether to force deletion even without backup.
- instance
Name String - The name of the resource
- key
Num Number - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log String
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log
Storage Number - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment
Type String - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period Number
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product
Version String - KMS Instance commodity type (software/hardware)
- renew
Period Number - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew
Status String - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal
Period StringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret
Num Number - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec Number
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Map<String>
- A mapping of tags to assign to the resource.
- vpc
Num Number - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Ca
Certificate stringChain Pem - KMS instance certificate chain in PEM format.
- Create
Time string - The creation time of the resource.
- End
Date string - (Available since v1.233.1) Instance expiration time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Instance status.
- Ca
Certificate stringChain Pem - KMS instance certificate chain in PEM format.
- Create
Time string - The creation time of the resource.
- End
Date string - (Available since v1.233.1) Instance expiration time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Instance status.
- ca
Certificate StringChain Pem - KMS instance certificate chain in PEM format.
- create
Time String - The creation time of the resource.
- end
Date String - (Available since v1.233.1) Instance expiration time.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Instance status.
- ca
Certificate stringChain Pem - KMS instance certificate chain in PEM format.
- create
Time string - The creation time of the resource.
- end
Date string - (Available since v1.233.1) Instance expiration time.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Instance status.
- ca_
certificate_ strchain_ pem - KMS instance certificate chain in PEM format.
- create_
time str - The creation time of the resource.
- end_
date str - (Available since v1.233.1) Instance expiration time.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Instance status.
- ca
Certificate StringChain Pem - KMS instance certificate chain in PEM format.
- create
Time String - The creation time of the resource.
- end
Date String - (Available since v1.233.1) Instance expiration time.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Instance status.
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,
bind_vpcs: Optional[Sequence[InstanceBindVpcArgs]] = None,
ca_certificate_chain_pem: Optional[str] = None,
create_time: Optional[str] = None,
end_date: Optional[str] = None,
force_delete_without_backup: Optional[str] = None,
instance_name: Optional[str] = None,
key_num: Optional[int] = None,
log: Optional[str] = None,
log_storage: Optional[int] = None,
payment_type: Optional[str] = None,
period: Optional[int] = None,
product_version: Optional[str] = None,
renew_period: Optional[int] = None,
renew_status: Optional[str] = None,
renewal_period_unit: Optional[str] = None,
secret_num: Optional[int] = None,
spec: Optional[int] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None,
vpc_num: Optional[int] = None,
vswitch_ids: Optional[Sequence[str]] = None,
zone_ids: Optional[Sequence[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)
resources: _: type: alicloud:kms:Instance get: id: ${id}
- 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.
- Bind
Vpcs List<Pulumi.Ali Cloud. Kms. Inputs. Instance Bind Vpc> - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - Ca
Certificate stringChain Pem - KMS instance certificate chain in PEM format.
- Create
Time string - The creation time of the resource.
- End
Date string - (Available since v1.233.1) Instance expiration time.
- Force
Delete stringWithout Backup - Whether to force deletion even without backup.
- Instance
Name string - The name of the resource
- Key
Num int - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - Log string
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - Log
Storage int - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - Payment
Type string - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Product
Version string - KMS Instance commodity type (software/hardware)
- Renew
Period int - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Renew
Status string - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - Renewal
Period stringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- Secret
Num int - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Status string
- Instance status.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Vpc
Id string - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- Vpc
Num int - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Vswitch
Ids List<string> - Instance bind vswitches
- Zone
Ids List<string> - zone id
- Bind
Vpcs []InstanceBind Vpc Args - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - Ca
Certificate stringChain Pem - KMS instance certificate chain in PEM format.
- Create
Time string - The creation time of the resource.
- End
Date string - (Available since v1.233.1) Instance expiration time.
- Force
Delete stringWithout Backup - Whether to force deletion even without backup.
- Instance
Name string - The name of the resource
- Key
Num int - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - Log string
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - Log
Storage int - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - Payment
Type string - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Product
Version string - KMS Instance commodity type (software/hardware)
- Renew
Period int - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - Renew
Status string - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - Renewal
Period stringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- Secret
Num int - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Status string
- Instance status.
- map[string]string
- A mapping of tags to assign to the resource.
- Vpc
Id string - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- Vpc
Num int - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - Vswitch
Ids []string - Instance bind vswitches
- Zone
Ids []string - zone id
- bind
Vpcs List<InstanceBind Vpc> - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - ca
Certificate StringChain Pem - KMS instance certificate chain in PEM format.
- create
Time String - The creation time of the resource.
- end
Date String - (Available since v1.233.1) Instance expiration time.
- force
Delete StringWithout Backup - Whether to force deletion even without backup.
- instance
Name String - The name of the resource
- key
Num Integer - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log String
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log
Storage Integer - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment
Type String - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period Integer
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product
Version String - KMS Instance commodity type (software/hardware)
- renew
Period Integer - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew
Status String - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal
Period StringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret
Num Integer - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec Integer
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - status String
- Instance status.
- Map<String,String>
- A mapping of tags to assign to the resource.
- vpc
Id String - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpc
Num Integer - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - vswitch
Ids List<String> - Instance bind vswitches
- zone
Ids List<String> - zone id
- bind
Vpcs InstanceBind Vpc[] - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - ca
Certificate stringChain Pem - KMS instance certificate chain in PEM format.
- create
Time string - The creation time of the resource.
- end
Date string - (Available since v1.233.1) Instance expiration time.
- force
Delete stringWithout Backup - Whether to force deletion even without backup.
- instance
Name string - The name of the resource
- key
Num number - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log string
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log
Storage number - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment
Type string - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period number
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product
Version string - KMS Instance commodity type (software/hardware)
- renew
Period number - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew
Status string - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal
Period stringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret
Num number - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec number
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - status string
- Instance status.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- vpc
Id string - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpc
Num number - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - vswitch
Ids string[] - Instance bind vswitches
- zone
Ids string[] - zone id
- bind_
vpcs Sequence[InstanceBind Vpc Args] - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - ca_
certificate_ strchain_ pem - KMS instance certificate chain in PEM format.
- create_
time str - The creation time of the resource.
- end_
date str - (Available since v1.233.1) Instance expiration time.
- force_
delete_ strwithout_ backup - Whether to force deletion even without backup.
- instance_
name str - The name of the resource
- key_
num int - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log str
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log_
storage int - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment_
type str - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period int
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product_
version str - KMS Instance commodity type (software/hardware)
- renew_
period int - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew_
status str - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal_
period_ strunit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret_
num int - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - status str
- Instance status.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- vpc_
id str - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpc_
num int - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - vswitch_
ids Sequence[str] - Instance bind vswitches
- zone_
ids Sequence[str] - zone id
- bind
Vpcs List<Property Map> - Aucillary VPCs used to access this KMS instance See
bind_vpcs
below. - ca
Certificate StringChain Pem - KMS instance certificate chain in PEM format.
- create
Time String - The creation time of the resource.
- end
Date String - (Available since v1.233.1) Instance expiration time.
- force
Delete StringWithout Backup - Whether to force deletion even without backup.
- instance
Name String - The name of the resource
- key
Num Number - Maximum number of stored keys. The attribute is valid when the attribute
payment_type
isSubscription
. - log String
- Instance Audit Log Switch. The attribute is valid when the attribute
payment_type
isSubscription
. - log
Storage Number - Instance log capacity. The attribute is valid when the attribute
payment_type
isSubscription
. - payment
Type String - Payment type, valid values:
Subscription
: Prepaid.PayAsYouGo
: Postpaid.
- period Number
- Purchase cycle, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - product
Version String - KMS Instance commodity type (software/hardware)
- renew
Period Number - Automatic renewal period, in months. The attribute is valid when the attribute
payment_type
isSubscription
. - renew
Status String - Renewal options. Valid values:
AutoRenewal
,ManualRenewal
. The attribute is valid when the attributepayment_type
isSubscription
. - renewal
Period StringUnit - Automatic renewal period unit, valid value:
M
: Month.Y
: Year.
- secret
Num Number - Maximum number of Secrets. The attribute is valid when the attribute
payment_type
isSubscription
. - spec Number
- The computation performance level of the KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - status String
- Instance status.
- Map<String>
- A mapping of tags to assign to the resource.
- vpc
Id String - The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpc
Num Number - The number of managed accesses. The maximum number of VPCs that can access this KMS instance. The attribute is valid when the attribute
payment_type
isSubscription
. - vswitch
Ids List<String> - Instance bind vswitches
- zone
Ids List<String> - zone id
Supporting Types
InstanceBindVpc, InstanceBindVpcArgs
- Region
Id string - region id
- Vpc
Id string - VPC ID
- Vpc
Owner stringId - VPC owner root user ID
- Vswitch
Id string - vswitch id
- Region
Id string - region id
- Vpc
Id string - VPC ID
- Vpc
Owner stringId - VPC owner root user ID
- Vswitch
Id string - vswitch id
- region
Id String - region id
- vpc
Id String - VPC ID
- vpc
Owner StringId - VPC owner root user ID
- vswitch
Id String - vswitch id
- region
Id string - region id
- vpc
Id string - VPC ID
- vpc
Owner stringId - VPC owner root user ID
- vswitch
Id string - vswitch id
- region_
id str - region id
- vpc_
id str - VPC ID
- vpc_
owner_ strid - VPC owner root user ID
- vswitch_
id str - vswitch id
- region
Id String - region id
- vpc
Id String - VPC ID
- vpc
Owner StringId - VPC owner root user ID
- vswitch
Id String - vswitch id
Import
KMS Instance can be imported using the id, e.g.
$ pulumi import alicloud:kms/instance:Instance example <id>
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.