ALIYUN::BSS::ResourcePackage is used to create an instance that uses 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
ProductCode String Yes No The code of the service to which the instance belongs. You can call the QueryProductList operation to query the service code.
PricingCycle String No No The unit of validity period of the resource plan. Default value: Month. Valid values:
  • Month
  • Year
PackageType String Yes No The type of the resource plan. You can call the DescribeResourcePackageProduct operation to query the type. The value of the PackageType property is the same as the value of Code in the ResourcePackage parameter that is returned when the DescribeResourcePackageProduct operation is called.
Specification String Yes No The specification of the resource plan. You can call the DescribeResourcePackageProduct operation to query the specification. The value of the Specification property is the same as the value of Value in the Specification parameter that is returned when the DescribeResourcePackageProduct operation is called.
Duration Integer Yes No The validity period of the resource plan. You can call the DescribeResourcePackageProduct operation to query the validity period. The value of the Duration property is the same as the value of Value in the AvailableDuration parameter that is returned when the DescribeResourcePackageProduct operation is called.
EffectiveDate String No No The point in time when the resource plan takes effect. If you do not specify this property, the resource plan immediately takes effect after you create the resource plan.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Return values

Fn::GetAtt

  • InstanceId: the ID of the instance.
  • OrderId: the order ID.

Examples

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"
        ]
      }
    }
  }
}