文档

ALIYUN::KMS::Instance

更新时间:

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

实例类型。

取值:

  • software:软件类型密钥。

  • hardware:硬件类型密钥。

  • software-small:软件基础型密钥。

  • hardware-small:硬件基础型密钥。

Connection

Map

密钥实例的网络连接配置。

更多信息,请参见Connection属性

InstanceChargeType

String

实例的付费类型。

取值:

  • PayAsYouGo:后付费(按量付费)。

  • Subscription(默认值):预付费(包年包月)。

KeyNum

Integer

实例支持创建的密钥数量。

取值范围:

100~100000。

说明

当InstanceChargeType配置为Subscription时,此参数必填。

Log

Boolean

是否启用日志分析。

取值:

  • true:启用。

  • false:不启用。

LogStorage

Integer

绑定的日志库的数量。

取值范围:

1000~500000。

Period

Integer

付费周期。

取值:

  • 当PeriodUnit取值为Year时:1~3。

  • 当PeriodUnit取值为Month时:1,2,3,6,12,24,36。

PeriodUnit

String

付费时长单位。

取值:

  • Month:月。

  • Year:年。

RenewPeriod

Integer

自动续费周期。

当设置RenewStatus为AutoRenewal时,必须指定该参数。

单位:月。

RenewStatus

String

自动续费状态。

取值:

  • AutoRenewal:自动续费。

  • ManualRenewal(默认值):手动续费。

SecretNum

Integer

实例支持创建的凭据数量。

取值范围:

0~100000。

说明

当InstanceChargeType配置为Subscription时,此参数必填。

Spec

Integer

实例的计算性能。

取值:

  • 200

  • 1000

  • 2000

  • 4000

单位: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:
      InstanceChargeType: PayAsYouGo
      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": {
        "InstanceChargeType": "PayAsYouGo",
        "ProductVersion": {
          "Ref": "ProductVersion"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "The ID of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    }
  }
}