ALIYUN::BSS::ResourcePackage is used to create a resource plan.
Syntax
{
"Type": "ALIYUN::BSS::ResourcePackage",
"Properties": {
"ProductCode": String,
"PricingCycle": String,
"PackageType": String,
"Specification": String,
"Duration": Integer,
"EffectiveDate": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Duration | Integer | Yes | No | The validity period of the resource plan. | To query the validity period, you can call the DescribeResourcePackageProduct operation and check the value of the Value parameter in AvailableDuration. |
PackageType | String | Yes | No | The type of the resource plan. | To query the resource plan type, you can call the DescribeResourcePackageProduct operation and check the value of the Code parameter in ResourcePackage. |
ProductCode | String | Yes | No | The product code. | You can call the QueryProductList operation to query the product code. |
Specification | String | Yes | No | The specification of the resource plan. | To query the specification, you can call the DescribeResourcePackageProduct operation and check the value of the Value parameter in Specification. |
EffectiveDate | String | No | No | The point in time when the resource plan takes effect. | If you do not specify this property, the resource plan takes effect when the resource plan is created. Specify the time in the ISO 8601 standard in the |
PricingCycle | String | No | No | The unit of validity period of the resource plan. | Valid values:
|
Return values
Fn::GetAtt
InstanceId: the ID of the resource plan.
OrderId: the order ID.
Examples
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ProductCode:
Type: String
Description: The code of the specified product. The value is the same as the value of ProductType returned by QueryProductList.
Default: ossbag
PricingCycle:
Type: String
Description: 'The validity of the specified resource package. Default value: Month. Valid values: Month, Year'
AllowedValues:
- Month
- Year
Default: Month
PackageType:
Type: String
Description: The type of the specified resource package. The value is the same as the value of the Code value of the ResourcePackage object returned by DescribeResourcePackageProduct.
Default: FPT_ossbag_deadlineAcc_CdnOut_china_common
Specification:
Type: String
Description: The size of the specified resource package. The value is the same as the Value of Specification returned by DescribeResourcePackageProduct.
Default: '1024'
Duration:
Type: Number
Description: The validity of the specified resource package. The value is the same as the Value of AvailableDuration returned by DescribeResourcePackageProduct.
Default: 6
EffectiveDate:
Type: String
Description: 'The effective date of the specified resource package. The resource package will take effect immediately if the effective date is unspecified. The date format follows the ISO8601 standard and uses UTC time. Format: yyyy-MM-ddTHH:mm:ssZ'
Default: '2021-12-03T12:00:00Z'
Resources:
ResourcePackage:
Type: ALIYUN::BSS::ResourcePackage
Properties:
ProductCode:
Ref: ProductCode
PricingCycle:
Ref: PricingCycle
PackageType:
Ref: PackageType
Specification:
Ref: Specification
Duration:
Ref: Duration
EffectiveDate:
Ref: EffectiveDate
Outputs:
InstanceId:
Description: The ID of the specified instance.
Value:
Fn::GetAtt:
- ResourcePackage
- InstanceId
OrderId:
Description: The ID of the specified order.
Value:
Fn::GetAtt:
- ResourcePackage
- OrderId
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ProductCode": {
"Type": "String",
"Description": "The code of the specified product. The value is the same as the value of ProductType returned by QueryProductList.",
"Default": "ossbag"
},
"PricingCycle": {
"Type": "String",
"Description": "The validity of the specified resource package. Default value: Month. Valid values: Month, Year",
"AllowedValues": [
"Month",
"Year"
],
"Default": "Month"
},
"PackageType": {
"Type": "String",
"Description": "The type of the specified resource package. The value is the same as the value of the Code value of the ResourcePackage object returned by DescribeResourcePackageProduct.",
"Default": "FPT_ossbag_deadlineAcc_CdnOut_china_common"
},
"Specification": {
"Type": "String",
"Description": "The size of the specified resource package. The value is the same as the Value of Specification returned by DescribeResourcePackageProduct.",
"Default": "1024"
},
"Duration": {
"Type": "Number",
"Description": "The validity of the specified resource package. The value is the same as the Value of AvailableDuration returned by DescribeResourcePackageProduct.",
"Default": 6
},
"EffectiveDate": {
"Type": "String",
"Description": "The effective date of the specified resource package. The resource package will take effect immediately if the effective date is unspecified. The date format follows the ISO8601 standard and uses UTC time. Format: yyyy-MM-ddTHH:mm:ssZ",
"Default": "2021-12-03T12:00:00Z"
}
},
"Resources": {
"ResourcePackage": {
"Type": "ALIYUN::BSS::ResourcePackage",
"Properties": {
"ProductCode": {
"Ref": "ProductCode"
},
"PricingCycle": {
"Ref": "PricingCycle"
},
"PackageType": {
"Ref": "PackageType"
},
"Specification": {
"Ref": "Specification"
},
"Duration": {
"Ref": "Duration"
},
"EffectiveDate": {
"Ref": "EffectiveDate"
}
}
}
},
"Outputs": {
"InstanceId": {
"Description": "The ID of the specified instance.",
"Value": {
"Fn::GetAtt": [
"ResourcePackage",
"InstanceId"
]
}
},
"OrderId": {
"Description": "The ID of the specified order.",
"Value": {
"Fn::GetAtt": [
"ResourcePackage",
"OrderId"
]
}
}
}
}