alicloud.kms.Instance
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:
- VpcId string
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- VswitchIds List<string>
- Instance bind vswitches
- ZoneIds List<string>
- zone id
- BindVpcs List<Pulumi.Ali Cloud. Kms. Inputs. Instance Bind Vpc> 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- ForceDelete stringWithout Backup 
- Whether to force deletion even without backup.
- InstanceName string
- The name of the resource
- KeyNum int
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- Log string
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- LogStorage int
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- PaymentType string
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- ProductVersion string
- KMS Instance commodity type (software/hardware)
- RenewPeriod int
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- RenewStatus string
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- RenewalPeriod stringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- SecretNum int
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VpcNum 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_typeisSubscription.
- VpcId string
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- VswitchIds []string
- Instance bind vswitches
- ZoneIds []string
- zone id
- BindVpcs []InstanceBind Vpc Args 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- ForceDelete stringWithout Backup 
- Whether to force deletion even without backup.
- InstanceName string
- The name of the resource
- KeyNum int
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- Log string
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- LogStorage int
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- PaymentType string
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- ProductVersion string
- KMS Instance commodity type (software/hardware)
- RenewPeriod int
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- RenewStatus string
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- RenewalPeriod stringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- SecretNum int
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- map[string]string
- A mapping of tags to assign to the resource.
- VpcNum 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_typeisSubscription.
- vpcId String
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitchIds List<String>
- Instance bind vswitches
- zoneIds List<String>
- zone id
- bindVpcs List<InstanceBind Vpc> 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- forceDelete StringWithout Backup 
- Whether to force deletion even without backup.
- instanceName String
- The name of the resource
- keyNum Integer
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- log String
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- logStorage Integer
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- paymentType String
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- period Integer
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- productVersion String
- KMS Instance commodity type (software/hardware)
- renewPeriod Integer
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- renewStatus String
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- renewalPeriod StringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- secretNum Integer
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- spec Integer
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- Map<String,String>
- A mapping of tags to assign to the resource.
- vpcNum 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_typeisSubscription.
- vpcId string
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitchIds string[]
- Instance bind vswitches
- zoneIds string[]
- zone id
- bindVpcs InstanceBind Vpc[] 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- forceDelete stringWithout Backup 
- Whether to force deletion even without backup.
- instanceName string
- The name of the resource
- keyNum number
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- log string
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- logStorage number
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- paymentType string
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- period number
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- productVersion string
- KMS Instance commodity type (software/hardware)
- renewPeriod number
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- renewStatus string
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- renewalPeriod stringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- secretNum number
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- spec number
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- vpcNum 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_typeisSubscription.
- 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_vpcsbelow.
- 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_typeisSubscription.
- log str
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- log_storage int
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- 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_typeisSubscription.
- 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_typeisSubscription.
- renew_status str
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- 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_typeisSubscription.
- spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- 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_typeisSubscription.
- vpcId String
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vswitchIds List<String>
- Instance bind vswitches
- zoneIds List<String>
- zone id
- bindVpcs List<Property Map>
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- forceDelete StringWithout Backup 
- Whether to force deletion even without backup.
- instanceName String
- The name of the resource
- keyNum Number
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- log String
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- logStorage Number
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- paymentType String
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- period Number
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- productVersion String
- KMS Instance commodity type (software/hardware)
- renewPeriod Number
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- renewStatus String
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- renewalPeriod StringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- secretNum Number
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- spec Number
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- Map<String>
- A mapping of tags to assign to the resource.
- vpcNum 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_typeisSubscription.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- CaCertificate stringChain Pem 
- KMS instance certificate chain in PEM format.
- CreateTime string
- The creation time of the resource.
- EndDate string
- (Available since v1.233.1) Instance expiration time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Instance status.
- CaCertificate stringChain Pem 
- KMS instance certificate chain in PEM format.
- CreateTime string
- The creation time of the resource.
- EndDate string
- (Available since v1.233.1) Instance expiration time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Instance status.
- caCertificate StringChain Pem 
- KMS instance certificate chain in PEM format.
- createTime String
- The creation time of the resource.
- endDate String
- (Available since v1.233.1) Instance expiration time.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Instance status.
- caCertificate stringChain Pem 
- KMS instance certificate chain in PEM format.
- createTime string
- The creation time of the resource.
- endDate 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.
- caCertificate StringChain Pem 
- KMS instance certificate chain in PEM format.
- createTime String
- The creation time of the resource.
- endDate 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) -> Instancefunc 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.
- BindVpcs List<Pulumi.Ali Cloud. Kms. Inputs. Instance Bind Vpc> 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- CaCertificate stringChain Pem 
- KMS instance certificate chain in PEM format.
- CreateTime string
- The creation time of the resource.
- EndDate string
- (Available since v1.233.1) Instance expiration time.
- ForceDelete stringWithout Backup 
- Whether to force deletion even without backup.
- InstanceName string
- The name of the resource
- KeyNum int
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- Log string
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- LogStorage int
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- PaymentType string
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- ProductVersion string
- KMS Instance commodity type (software/hardware)
- RenewPeriod int
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- RenewStatus string
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- RenewalPeriod stringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- SecretNum int
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- Status string
- Instance status.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VpcId string
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- VpcNum 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_typeisSubscription.
- VswitchIds List<string>
- Instance bind vswitches
- ZoneIds List<string>
- zone id
- BindVpcs []InstanceBind Vpc Args 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- CaCertificate stringChain Pem 
- KMS instance certificate chain in PEM format.
- CreateTime string
- The creation time of the resource.
- EndDate string
- (Available since v1.233.1) Instance expiration time.
- ForceDelete stringWithout Backup 
- Whether to force deletion even without backup.
- InstanceName string
- The name of the resource
- KeyNum int
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- Log string
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- LogStorage int
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- PaymentType string
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- Period int
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- ProductVersion string
- KMS Instance commodity type (software/hardware)
- RenewPeriod int
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- RenewStatus string
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- RenewalPeriod stringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- SecretNum int
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- Spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- Status string
- Instance status.
- map[string]string
- A mapping of tags to assign to the resource.
- VpcId string
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- VpcNum 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_typeisSubscription.
- VswitchIds []string
- Instance bind vswitches
- ZoneIds []string
- zone id
- bindVpcs List<InstanceBind Vpc> 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- caCertificate StringChain Pem 
- KMS instance certificate chain in PEM format.
- createTime String
- The creation time of the resource.
- endDate String
- (Available since v1.233.1) Instance expiration time.
- forceDelete StringWithout Backup 
- Whether to force deletion even without backup.
- instanceName String
- The name of the resource
- keyNum Integer
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- log String
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- logStorage Integer
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- paymentType String
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- period Integer
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- productVersion String
- KMS Instance commodity type (software/hardware)
- renewPeriod Integer
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- renewStatus String
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- renewalPeriod StringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- secretNum Integer
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- spec Integer
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- status String
- Instance status.
- Map<String,String>
- A mapping of tags to assign to the resource.
- vpcId String
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpcNum 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_typeisSubscription.
- vswitchIds List<String>
- Instance bind vswitches
- zoneIds List<String>
- zone id
- bindVpcs InstanceBind Vpc[] 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- caCertificate stringChain Pem 
- KMS instance certificate chain in PEM format.
- createTime string
- The creation time of the resource.
- endDate string
- (Available since v1.233.1) Instance expiration time.
- forceDelete stringWithout Backup 
- Whether to force deletion even without backup.
- instanceName string
- The name of the resource
- keyNum number
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- log string
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- logStorage number
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- paymentType string
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- period number
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- productVersion string
- KMS Instance commodity type (software/hardware)
- renewPeriod number
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- renewStatus string
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- renewalPeriod stringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- secretNum number
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- spec number
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- status string
- Instance status.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- vpcId string
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpcNum 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_typeisSubscription.
- vswitchIds string[]
- Instance bind vswitches
- zoneIds string[]
- zone id
- bind_vpcs Sequence[InstanceBind Vpc Args] 
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- 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_typeisSubscription.
- log str
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- log_storage int
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- 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_typeisSubscription.
- 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_typeisSubscription.
- renew_status str
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- 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_typeisSubscription.
- spec int
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- 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_typeisSubscription.
- vswitch_ids Sequence[str]
- Instance bind vswitches
- zone_ids Sequence[str]
- zone id
- bindVpcs List<Property Map>
- Aucillary VPCs used to access this KMS instance See bind_vpcsbelow.
- caCertificate StringChain Pem 
- KMS instance certificate chain in PEM format.
- createTime String
- The creation time of the resource.
- endDate String
- (Available since v1.233.1) Instance expiration time.
- forceDelete StringWithout Backup 
- Whether to force deletion even without backup.
- instanceName String
- The name of the resource
- keyNum Number
- Maximum number of stored keys. The attribute is valid when the attribute payment_typeisSubscription.
- log String
- Instance Audit Log Switch. The attribute is valid when the attribute payment_typeisSubscription.
- logStorage Number
- Instance log capacity. The attribute is valid when the attribute payment_typeisSubscription.
- paymentType String
- Payment type, valid values:- Subscription: Prepaid.
- PayAsYouGo: Postpaid.
 
- period Number
- Purchase cycle, in months. The attribute is valid when the attribute payment_typeisSubscription.
- productVersion String
- KMS Instance commodity type (software/hardware)
- renewPeriod Number
- Automatic renewal period, in months. The attribute is valid when the attribute payment_typeisSubscription.
- renewStatus String
- Renewal options. Valid values: AutoRenewal,ManualRenewal. The attribute is valid when the attributepayment_typeisSubscription.
- renewalPeriod StringUnit 
- Automatic renewal period unit, valid value:- M: Month.
- Y: Year.
 
- secretNum Number
- Maximum number of Secrets. The attribute is valid when the attribute payment_typeisSubscription.
- spec Number
- The computation performance level of the KMS instance. The attribute is valid when the attribute payment_typeisSubscription.
- status String
- Instance status.
- Map<String>
- A mapping of tags to assign to the resource.
- vpcId String
- The ID of the virtual private cloud (VPC) that is associated with the KMS instance.
- vpcNum 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_typeisSubscription.
- vswitchIds List<String>
- Instance bind vswitches
- zoneIds List<String>
- zone id
Supporting Types
InstanceBindVpc, InstanceBindVpcArgs      
- RegionId string
- region id
- VpcId string
- VPC ID
- VpcOwner stringId 
- VPC owner root user ID
- VswitchId string
- vswitch id
- RegionId string
- region id
- VpcId string
- VPC ID
- VpcOwner stringId 
- VPC owner root user ID
- VswitchId string
- vswitch id
- regionId String
- region id
- vpcId String
- VPC ID
- vpcOwner StringId 
- VPC owner root user ID
- vswitchId String
- vswitch id
- regionId string
- region id
- vpcId string
- VPC ID
- vpcOwner stringId 
- VPC owner root user ID
- vswitchId 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
- regionId String
- region id
- vpcId String
- VPC ID
- vpcOwner StringId 
- VPC owner root user ID
- vswitchId 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 alicloudTerraform Provider.
