ALIYUN::ECS::ElasticityAssurance is used to create an elasticity assurance.
Syntax
{
"Type": "ALIYUN::ECS::ElasticityAssurance",
"Properties": {
"Description": String,
"InstanceAmount": Integer,
"PrivatePoolOptions": Map,
"ZoneId": String,
"ResourceGroupId": String,
"StartTime": String,
"Period": Integer,
"InstanceTypes": List,
"RecurrenceRules": List,
"AutoRenewPeriod": Integer,
"AutoRenew": Boolean,
"InstanceCpuCoreCount": Integer,
"Tags": List,
"PeriodUnit": String
}
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
InstanceAmount | Integer | Yes | No | The total number of instances for which you want to reserve the capacity of an instance type. | Valid values: 1 to 1000. |
ZoneId | String | Yes | No | The zone ID of the elasticity assurance. | You can use an elasticity assurance to reserve resources within only a single zone. |
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal. | Valid values:
Default value: false. |
AutoRenewPeriod | Integer | No | No | The auto-renewal period. | Unit: month. Valid values: 1, 2, 3, 6, 12, 24, and 36.
Note AutoRenewPeriod must be specified when |
Description | String | No | Yes | The description of the elasticity assurance. | The description must be 2 to 256 characters in length. The description can contain letters and cannot start with |
PeriodUnit | String | No | No | The unit of the subscription duration. | Valid values:
|
PrivatePoolOptions | Map | No | Yes | The configurations of the elasticity assurance. | For more information, see PrivatePoolOptions properties. |
Period | Integer | No | No | The subscription duration. | The unit of the subscription duration is determined by the
|
ResourceGroupId | String | No | No | The ID of the resource group to which to assign the elasticity assurance. | None. |
RecurrenceRules | List | No | No | The assurance schedules of the time-segmented elasticity assurance. | None. |
StartTime | String | No | No | The time when the elasticity assurance takes effect. | The default value is the time when the elasticity assurance is created by using ALIYUN::ECS::ElasticityAssurance. Specify the time in the ISO 8601 standard in the |
InstanceCpuCoreCount | Integer | No | No | The total number of vCPUs of the instance supported within the effective duration of the elasticity assurance. | None. |
InstanceTypes | List | Yes | No | The instance types. | You can create an elasticity assurance to reserve the capacity of only a single instance type. |
Tags | List | No | No | The tags to add to the elasticity assurance. | You can add up to 20 tags. For more information, see Tags properties. |
PrivatePoolOptions syntax
"PrivatePoolOptions": {
"MatchCriteria": String,
"Name": String
}PrivatePoolOptions properties
Property | Type | Required | Editable | Description | Constraint |
MatchCriteria | String | No | No | The type of the private pool with which you want to associate the elasticity assurance. | Valid values:
|
Name | String | No | Yes | The name of the elasticity assurance. | The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with |
RecurrenceRules syntax
"RecurrenceRules": [
{
"RecurrenceType": String,
"StartHour": Integer,
"EndHour": Integer,
"RecurrenceValue": String
}
]RecurrenceRules properties
Property | Type | Required | Editable | Description | Constraint |
EndHour | Integer | No | No | The end time of the assurance period for the capacity reservation of the time-segmented elasticity assurance. | Specify an on-the-hour point in time. |
RecurrenceType | String | No | No | The type of the assurance schedule. | Valid values:
Note You must specify both |
RecurrenceValue | String | No | No | The days of the week or month on which the capacity reservation of the time-segmented elasticity assurance takes effect or the interval, in number of days, at which the capacity reservation takes effect. |
Note You must specify both |
StartHour | Integer | No | No | The start time of the assurance period for the capacity reservation of the time-segmented elasticity assurance. | Specify an on-the-hour point in time. Note Specify both |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]Tags properties
Property | Type | Required | Editable | Description | Constraint |
Value | String | No | No | The value of the tag to add to the elasticity assurance. | The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with |
Key | String | No | No | The key of the tag to add to the elasticity assurance. | The tag key cannot be an empty string. The tag key can be up to 128 characters in length, and cannot start with |
Return values
Fn::GetAtt
PrivatePoolOptionsId: the ID of the elasticity assurance.
Examples
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
{
"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"
]
}
}
}
}