ALIYUN::ECS::CapacityReservation is used to create a capacity reservation.
Syntax
{
"Type": "ALIYUN::ECS::CapacityReservation",
"Properties": {
"InstanceAmount": Integer,
"Description": String,
"PrivatePoolOptions": Map,
"ZoneId": String,
"ResourceGroupId": String,
"EndTime": String,
"EndTimeType": String,
"InstanceType": String,
"Tags": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
InstanceAmount | Integer | Yes | Yes | The total number of instances for which you want to reserve the capacity of an instance type. | Valid values: 1 to 1000. |
Description | String | No | Yes | The description of the capacity reservation. | The description must be 2 to 256 characters in length. The description can contain letters and cannot start with |
PrivatePoolOptions | Map | No | Yes | The configurations of the capacity reservation. | For more information, see PrivatePoolOptions properties. |
ZoneId | String | Yes | No | The zone ID of the capacity reservation. | You can use a capacity reservation to reserve resources within only a single zone. |
ResourceGroupId | String | No | No | The ID of the resource group to which you want to assign the capacity reservation. | None. |
EndTime | String | No | Yes | The time when the capacity reservation expires. | Specify the time in the ISO 8601 standard in the |
EndTimeType | String | No | Yes | The release mode of the capacity reservation. | Valid values:
|
InstanceType | String | Yes | No | The instance type. | You can create a capacity reservation to reserve the capacity of only a single instance type. You can call the DescribeInstanceTypes operation to query the instance types provided by Elastic Compute Service (ECS). |
Tags | List | No | No | The tags to add to the capacity reservation. | 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 that is generated after the capacity reservation takes effect. | Valid values:
|
Name | String | No | Yes | The name of the capacity reservation. | The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with |
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 capacity reservation. | 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 capacity reservation. | 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 capacity reservation.