全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::BSS::ResourcePackage

更新時間:Jun 25, 2024

ALIYUN::BSS::ResourcePackage類型用於建立資源套件執行個體。

文法

{
  "Type": "ALIYUN::BSS::ResourcePackage",
  "Properties": {
    "ProductCode": String,
    "PricingCycle": String,
    "PackageType": String,
    "Specification": String,
    "Duration": Integer,
    "EffectiveDate": String
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

Duration

Integer

資源套件時間長度。

您可以調用DescribeResourcePackageProduct介面查詢資源套件時間長度(AvailableDuration中Value參數的取值)。

PackageType

String

資源套件類型。

您可以調用DescribeResourcePackageProduct介面查詢資源套件類型(ResourcePackage中Code參數的取值)。

ProductCode

String

產品代碼。

您可以調用QueryProductList介面查詢產品代碼。

Specification

String

資源套件規格。

您可以調用DescribeResourcePackageProduct介面查詢資源套件規格(Specification中Value參數的取值)。

EffectiveDate

String

資源套件生效日期。

如果不指定該參數,資源套件將立即生效。

日期採用ISO8601標準,並使用UTC時間。格式為:yyyy-MM-ddTHH:mm:ssZ

PricingCycle

String

資源套件時間長度的單位。

取值:

  • Month(預設值):月。

  • Year:年。

傳回值

Fn::GetAtt

  • InstanceId:資源套件執行個體ID。

  • OrderId:訂單ID。

樣本

YAML格式

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格式

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