Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::BSS::ResourcePackage

Última atualização: Jun 27, 2026

Cria um plano de recursos.

Sintaxe

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

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Duration

Integer

Sim

Não

Período de validade.

Consulte AvailableDuration.Value em DescribeResourcePackageProduct.

PackageType

String

Sim

Não

Tipo do plano de recursos.

Consulte ResourcePackage.Code em DescribeResourcePackageProduct.

ProductCode

String

Sim

Não

Código do serviço.

Obtenha os códigos de serviço em QueryProductList.

Specification

String

Sim

Não

Especificação do plano de recursos.

Consulte Specification.Value em DescribeResourcePackageProduct.

Nota

DescribeResourcePackageProduct retorna todos os tipos de planos de recursos para o ProductCode fornecido. Associe o Code ao seu PackageType para identificar a especificação.

AutoRenewPeriod

Integer

Não

Sim

Período de renovação automática.

Unidade: mês.

Valores válidos: 1, 2, 3 e 6.

AutoRenew

Boolean

Não

Sim

Ative se a renovação automática está ativada.

Valores válidos:

  • true

  • false (padrão)

AutoRenewPeriodUnit

String

Não

Sim

Unidade do período de renovação automática.

Valores válidos:

  • Month

  • Year

EffectiveDate

String

Não

Não

Data de vigência.

Se não especificado, entra em vigor imediatamente após a criação.

Formato: yyyy-MM-ddTHH:mm:ssZ (UTC, ISO 8601).

PricingCycle

String

Não

Não

Unidade do período de validade.

Valores válidos:

  • Month (padrão)

  • Year

Valores de retorno

Fn::GetAtt

  • InstanceId: ID do plano de recursos.

  • OrderId: ID do pedido.

Exemplos

Formato 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

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