ALIYUN::CDT::ResourcePackage

ALIYUN::CDT::ResourcePackage类型用于创建资源包。

语法

{
  "Type": "ALIYUN::CDT::ResourcePackage",
  "Properties": {
    "Capacity": Integer,
    "Pack": String,
    "Region": String,
    "ISP": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Capacity

Integer

CDT资源包的容量。

取值范围:50~102400。单位:GB。

Pack

String

CDT 资源包的套餐信息。

Region

String

资源包所属地域。

取值:

  • chinese-mainland:中国内地地域。

  • asia-pacific:亚太地域。

  • europe:欧洲地域。

  • north-america:南美地域。

  • south-america:北美地域。

  • middleeast:中东地域。

  • finance-cloud:金融云地域。

ISP

String

CDT 资源包的运营商。

返回值

Fn::GetAtt

  • InstanceId:CDT资源包ID。

  • OrderId:订单ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Capacity:
    Type: Number
    Description:
      en: The capacity of the specified CDT resource package.
    Required: true
    MinValue: 50
    MaxValue: 102400
  Region:
    Type: String
    Description:
      en: The region of the specified CDT resource package.
    AllowedValues:
      - chinese-mainland
      - asia-pacific
      - europe
      - north-america
      - south-america
      - middleeast
      - finance-cloud
    Required: true
  Pack:
    Type: String
    Description:
      en: The pack of the specified CDT resource package. It can be obtained from the `components` field in the payload of the `getPrice` network request on the CDT common buy page.
    Required: true
Resources:
  ResourcePackage:
    Type: ALIYUN::CDT::ResourcePackage
    Properties:
      Capacity:
        Ref: Capacity
      Region:
        Ref: Region
      Pack:
        Ref: Pack
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
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Capacity": {
      "Type": "Number",
      "Description": {
        "en": "The capacity of the specified CDT resource package."
      },
      "Required": true,
      "MinValue": 50,
      "MaxValue": 102400
    },
    "Region": {
      "Type": "String",
      "Description": {
        "en": "The region of the specified CDT resource package."
      },
      "AllowedValues": [
        "chinese-mainland",
        "asia-pacific",
        "europe",
        "north-america",
        "south-america",
        "middleeast",
        "finance-cloud"
      ],
      "Required": true
    },
    "Pack": {
      "Type": "String",
      "Description": {
        "en": "The pack of the specified CDT resource package. It can be obtained from the `components` field in the payload of the `getPrice` network request on the CDT common buy page."
      },
      "Required": true
    }
  },
  "Resources": {
    "ResourcePackage": {
      "Type": "ALIYUN::CDT::ResourcePackage",
      "Properties": {
        "Capacity": {
          "Ref": "Capacity"
        },
        "Region": {
          "Ref": "Region"
        },
        "Pack": {
          "Ref": "Pack"
        }
      }
    }
  },
  "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"
        ]
      }
    }
  }
}