ALIYUN::KMS::Instance类型用于创建一个KMS实例。
语法
{
  "Type": "ALIYUN::KMS::Instance",
  "Properties": {
    "ProductVersion": String,
    "Connection": Map,
    "InstanceChargeType": String,
    "KeyNum": Integer,
    "Log": Boolean,
    "LogStorage": Integer,
    "Period": Integer,
    "PeriodUnit": String,
    "RenewPeriod": Integer,
    "RenewStatus": String,
    "SecretNum": Integer,
    "Spec": Integer,
    "VpcNum": Integer
  }
}属性
属性名称  | 类型  | 必须  | 允许更新  | 描述  | 约束  | 
ProductVersion  | String  | 是  | 否  | 实例类型。  | 取值: 
  | 
Connection  | Map  | 否  | 否  | 密钥实例的网络连接配置。  | 更多信息,请参见Connection属性。  | 
InstanceChargeType  | String  | 否  | 否  | 实例的付费类型。  | 取值: 
  | 
KeyNum  | Integer  | 否  | 是  | 实例支持创建的密钥数量。  | 取值范围: 100~100000。 说明  当InstanceChargeType配置为Subscription时,此参数必填。  | 
Log  | Boolean  | 否  | 是  | 是否启用日志分析。  | 取值: 
  | 
LogStorage  | Integer  | 否  | 是  | 绑定的日志库的数量。  | 取值范围: 1000~500000。  | 
Period  | Integer  | 否  | 否  | 付费周期。  | 取值: 
  | 
PeriodUnit  | String  | 否  | 否  | 付费时长单位。  | 取值: 
  | 
RenewPeriod  | Integer  | 否  | 否  | 自动续费周期。  | 当设置RenewStatus为AutoRenewal时,必须指定该参数。 单位:月。  | 
RenewStatus  | String  | 否  | 否  | 自动续费状态。  | 取值: 
  | 
SecretNum  | Integer  | 否  | 是  | 实例支持创建的凭据数量。  | 取值范围: 0~100000。 说明  当InstanceChargeType配置为Subscription时,此参数必填。  | 
Spec  | Integer  | 否  | 是  | 实例的计算性能。  | 取值: 
 单位:QPS。  | 
VpcNum  | Integer  | 否  | 是  | 实例的访问管理总量。  | 取值范围: 1~1000 说明  当InstanceChargeType配置为Subscription时,此参数必填。  | 
Connection语法
"Connection": {
  "VpcId": String,
  "VSwitchIds": List,
  "ZoneIds": List
}Connection属性
属性名称  | 类型  | 必须  | 允许更新  | 描述  | 约束  | 
VpcId  | String  | 是  | 否  | 绑定KMS实例的VPC ID。  | 无  | 
VSwitchIds  | List  | 是  | 否  | 实例绑定的交换机列表。  | 数量限制:最大为1。  | 
ZoneIds  | List  | 是  | 否  | 实例绑定的可用区列表。  | 数量限制:最大为2。  | 
返回值
Fn::GetAtt
InstanceId:KMS实例的ID。
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ProductVersion:
    Type: String
    Description:
      en: KMS Instance commodity type (software/software-small/hardware/hardware-small).
    AllowedValues:
      - software
      - software-small
      - hardware
      - hardware-small
    Required: true
Resources:
  Instance:
    Type: ALIYUN::KMS::Instance
    Properties:
      ProductVersion:
        Ref: ProductVersion
Outputs:
  InstanceId:
    Description: The ID of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
                        JSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ProductVersion": {
      "Type": "String",
      "Description": {
        "en": "KMS Instance commodity type (software/software-small/hardware/hardware-small)."
      },
      "AllowedValues": [
        "software",
        "software-small",
        "hardware",
        "hardware-small"
      ],
      "Required": true
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::KMS::Instance",
      "Properties": {
        "ProductVersion": {
          "Ref": "ProductVersion"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "The ID of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    }
  }
}