文档

ALIYUN::ECS::ElasticityAssurance

更新时间:

ALIYUN::ECS::ElasticityAssurance类型用于创建弹性保障服务。

语法

{
  "Type": "ALIYUN::ECS::ElasticityAssurance",
  "Properties": {
    "Description": String,
    "InstanceAmount": Integer,
    "PrivatePoolOptions": Map,
    "ZoneId": String,
    "ResourceGroupId": String,
    "StartTime": String,
    "Period": Integer,
    "InstanceTypes": List,
    "Tags": List,
    "PeriodUnit": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Description

String

弹性保障服务的描述信息。

长度为2~256个英文或中文字符,不能以http://https://开头。

InstanceAmount

Integer

在一个实例规格内,需要预留的实例的总数量。

取值范围:1~1000。

PrivatePoolOptions

Map

弹性保障服务的配置。

更多信息,请参考PrivatePoolOptions属性

ZoneId

String

弹性保障服务所属地域下的可用区ID。

目前仅支持在一个可用区下创建弹性保障服务。

ResourceGroupId

String

弹性保障服务所在的企业资源组ID。

StartTime

String

弹性保障服务生效时间。

默认为调用该接口创建服务的时间。时间格式以ISO8601为标准,需要使用UTC +0时间,格式为yyyy-MM-ddTHH:mm:ssZ。更多信息,请参见时间格式

Period

Integer

购买时长。

时长单位由PeriodUnit参数确定。取值范围:

  • PeriodUnit参数值为Month时,该参数的取值:1、2、3、4、5、6、7、8、9。

  • PeriodUnit参数值为Year时,该参数的取值:1、2、3、4、5。

InstanceTypes

List

实例规格。

目前仅支持为一个实例规格设置弹性保障服务。

Tags

List

实例的标签。

最多支持20个,更多信息,请参考Tags属性

PeriodUnit

String

时长单位。

取值:

  • Month:月。

  • Year(默认值):年。

PrivatePoolOptions语法

"PrivatePoolOptions": {
  "MatchCriteria": String,
  "Name": String
}

PrivatePoolOptions属性

属性名称

类型

必须

允许更新

描述

约束

MatchCriteria

String

弹性保障服务的匹配模式。

取值:

  • Open(默认值):开放模式的弹性保障服务。

  • Target:指定模式的弹性保障服务。

Name

String

弹性保障服务的名称。

长度为2~128个英文或中文字符。必须以大小写字母或中文开头,不能以http://https://开头。可以包含数字、半角冒号(:)、下划线(_)或者连字符(-)。

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Value

String

弹性保障服务的标签值。

一旦传入该值,允许为空字符串。最多支持128个字符,不能以acs:开头,不能包含http://或者https://

Key

String

弹性保障服务的标签键。

一旦传入该值,则不允许为空字符串。最多支持128个字符,不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

PrivatePoolOptionsId:弹性保障服务ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Description:
        AssociationProperty: TextArea
        Description:
          en: 'The description of the elasticity assurance. The description must be 2
            to 256 characters in length and cannot start with http:// or https://.
    
            This parameter is empty by default.'
        Required: false
        Type: String
      InstanceAmount:
        Description:
          en: 'The total number of instances for which to reserve capacity of an instance
            type.
    
            Valid values: 1 to 1000.'
        MaxValue: 1000
        MinValue: 1
        Required: true
        Type: Number
      InstanceTypes:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            Required: false
            Type: String
        Description:
          en: Instance type. Currently, an elasticity assurance can be created to reserve
            the capacity of a single instance type.
        MaxLength: 1
        MinLength: 1
        Required: true
        Type: Json
      Period:
        AssociationProperty: PayPeriod
        Description:
          en: 'The effective duration of the elasticity assurance. The unit of the effective
            duration is determined by the PeriodUnit value. Valid values:
    
            When the PeriodUnit parameter is set to Month, the valid values are 1, 2,
            3, 4, 5, 6, 7, 8, and 9.
    
            When the PeriodUnit parameter is set to Year, the valid values are 1, 2, 3,
            4, and 5.
    
            Default value: 1.'
        Required: false
        Type: Number
      PeriodUnit:
        AllowedValues:
        - Month
        - Year
        AssociationProperty: PayPeriodUnit
        Description:
          en: 'The unit of the effective duration of the elasticity assurance. Valid values:
    
            Month
    
            Year
    
            Default value: Year.'
        Required: false
        Type: String
      PrivatePoolOptions:
        AssociationPropertyMetadata:
          Parameters:
            MatchCriteria:
              AllowedValues:
              - Open
              - Target
              Description:
                en: 'The type of the private pool with which to associate the elasticity
                  assurance. Valid values:
    
                  Open: open private pool
    
                  Target: targeted private pool
    
                  Default value: Open.'
              Required: false
              Type: String
            Name:
              Description:
                en: The name of the elasticity assurance. The description must be 2 to
                  128 characters in length. The description must start with a letter but
                  cannot start with http:// or https://. It can contain letters, digits,
                  colons (:), underscores (_), and hyphens (-).
              Required: false
              Type: String
        Required: false
        Type: Json
      ResourceGroupId:
        AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
        Description:
          en: The ID of the resource group to which to assign the elasticity assurance.
        Required: false
        Type: String
      StartTime:
        Description:
          en: The time when the elasticity assurance takes effect. The default value is
            the time when the CreateElasticityAssurance operation is called to create
            the elasticity assurance. Specify the time in the ISO 8601 standard in the
            yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. For more information,
            see ISO 8601.
        Required: false
        Type: String
      Tags:
        AssociationProperty: List[Parameters]
        AssociationPropertyMetadata:
          ListMetadata:
            Order:
            - Key
            - Value
          Parameters:
            Key:
              Description:
                en: 'The key of tag N to add to the elasticity assurance. Valid values
                  of N: 1 to 20. The tag key cannot be an empty string. The tag key must
                  be 1 to 128 characters in length and cannot contain http:// or https://.
                  The tag key cannot start with acs: or aliyun.'
              Required: false
              Type: String
            Value:
              Description:
                en: 'The value of tag N to add to the elasticity assurance. Valid values
                  of N: 1 to 20. The tag value can be an empty string. The tag value can
                  be up to 128 characters in length and cannot start with acs:. The tag
                  value cannot contain http:// or https://.'
              Required: false
              Type: String
        MaxLength: 20
        Required: false
        Type: Json
      ZoneId:
        AssociationProperty: ZoneId
        Description:
          en: The zone ID of the elasticity assurance. Currently, an elasticity assurance
            can be used to reserve resources within a single zone.
        Required: true
        Type: String
    Resources:
      ElasticityAssurance:
        Properties:
          Description:
            Ref: Description
          InstanceAmount:
            Ref: InstanceAmount
          InstanceTypes:
            Ref: InstanceTypes
          Period:
            Ref: Period
          PeriodUnit:
            Ref: PeriodUnit
          PrivatePoolOptions:
            Ref: PrivatePoolOptions
          ResourceGroupId:
            Ref: ResourceGroupId
          StartTime:
            Ref: StartTime
          Tags:
            Ref: Tags
          ZoneId:
            Ref: ZoneId
        Type: ALIYUN::ECS::ElasticityAssurance
    Outputs:
      PrivatePoolOptionsId:
        Description: The ID of the elasticity assurance.
        Value:
          Fn::GetAtt:
          - ElasticityAssurance
          - PrivatePoolOptionsId
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Description": {
          "AssociationProperty": "TextArea",
          "Type": "String",
          "Description": {
            "en": "The description of the elasticity assurance. The description must be 2 to 256 characters in length and cannot start with http:// or https://.\nThis parameter is empty by default."
          },
          "Required": false
        },
        "InstanceAmount": {
          "Type": "Number",
          "Description": {
            "en": "The total number of instances for which to reserve capacity of an instance type.\nValid values: 1 to 1000."
          },
          "Required": true,
          "MinValue": 1,
          "MaxValue": 1000
        },
        "PrivatePoolOptions": {
          "AssociationPropertyMetadata": {
            "Parameters": {
              "MatchCriteria": {
                "Type": "String",
                "Description": {
                  "en": "The type of the private pool with which to associate the elasticity assurance. Valid values:\nOpen: open private pool\nTarget: targeted private pool\nDefault value: Open."
                },
                "AllowedValues": [
                  "Open",
                  "Target"
                ],
                "Required": false
              },
              "Name": {
                "Type": "String",
                "Description": {
                  "en": "The name of the elasticity assurance. The description must be 2 to 128 characters in length. The description must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
                },
                "Required": false
              }
            }
          },
          "Type": "Json",
          "Required": false
        },
        "ZoneId": {
          "AssociationProperty": "ZoneId",
          "Type": "String",
          "Description": {
            "en": "The zone ID of the elasticity assurance. Currently, an elasticity assurance can be used to reserve resources within a single zone."
          },
          "Required": true
        },
        "ResourceGroupId": {
          "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
          "Type": "String",
          "Description": {
            "en": "The ID of the resource group to which to assign the elasticity assurance."
          },
          "Required": false
        },
        "StartTime": {
          "Type": "String",
          "Description": {
            "en": "The time when the elasticity assurance takes effect. The default value is the time when the CreateElasticityAssurance operation is called to create the elasticity assurance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. For more information, see ISO 8601."
          },
          "Required": false
        },
        "Period": {
          "AssociationProperty": "PayPeriod",
          "Type": "Number",
          "Description": {
            "en": "The effective duration of the elasticity assurance. The unit of the effective duration is determined by the PeriodUnit value. Valid values:\nWhen the PeriodUnit parameter is set to Month, the valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.\nWhen the PeriodUnit parameter is set to Year, the valid values are 1, 2, 3, 4, and 5.\nDefault value: 1."
          },
          "Required": false
        },
        "InstanceTypes": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Type": "String",
              "Required": false
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "Instance type. Currently, an elasticity assurance can be created to reserve the capacity of a single instance type."
          },
          "Required": true,
          "MinLength": 1,
          "MaxLength": 1
        },
        "Tags": {
          "AssociationPropertyMetadata": {
            "Parameters": {
              "Value": {
                "Type": "String",
                "Description": {
                  "en": "The value of tag N to add to the elasticity assurance. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with acs:. The tag value cannot contain http:// or https://."
                },
                "Required": false
              },
              "Key": {
                "Type": "String",
                "Description": {
                  "en": "The key of tag N to add to the elasticity assurance. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key must be 1 to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun."
                },
                "Required": false
              }
            },
            "ListMetadata": {
              "Order": [
                "Key",
                "Value"
              ]
            }
          },
          "AssociationProperty": "List[Parameters]",
          "Type": "Json",
          "Required": false,
          "MaxLength": 20
        },
        "PeriodUnit": {
          "AssociationProperty": "PayPeriodUnit",
          "Type": "String",
          "Description": {
            "en": "The unit of the effective duration of the elasticity assurance. Valid values:\nMonth\nYear\nDefault value: Year."
          },
          "AllowedValues": [
            "Month",
            "Year"
          ],
          "Required": false
        }
      },
      "Resources": {
        "ElasticityAssurance": {
          "Type": "ALIYUN::ECS::ElasticityAssurance",
          "Properties": {
            "Description": {
              "Ref": "Description"
            },
            "InstanceAmount": {
              "Ref": "InstanceAmount"
            },
            "PrivatePoolOptions": {
              "Ref": "PrivatePoolOptions"
            },
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "ResourceGroupId": {
              "Ref": "ResourceGroupId"
            },
            "StartTime": {
              "Ref": "StartTime"
            },
            "Period": {
              "Ref": "Period"
            },
            "InstanceTypes": {
              "Ref": "InstanceTypes"
            },
            "Tags": {
              "Ref": "Tags"
            },
            "PeriodUnit": {
              "Ref": "PeriodUnit"
            }
          }
        }
      },
      "Outputs": {
        "PrivatePoolOptionsId": {
          "Description": "The ID of the elasticity assurance.",
          "Value": {
            "Fn::GetAtt": [
              "ElasticityAssurance",
              "PrivatePoolOptionsId"
            ]
          }
        }
      }
    }
                            
  • 本页导读 (1)
文档反馈