ALIYUN::CEN::CenBandwidthPackage类型用于在使用云企业网连接不同地域的网络实例前,根据网络实例所属地域购买带宽包。

语法

{
  "Type": "ALIYUN::CEN::CenBandwidthPackage",
  "Properties": {
    "Description": String,
    "BandwidthPackageChargeType": String,
    "GeographicRegionBId": String,
    "GeographicRegionAId": String,
    "PricingCycle": String,
    "AutoRenew": "Boolean",
    "Bandwidth": Integer,
    "Period": Integer,
    "AutoPay": "Boolean",
    "AutoRenewDuration": Integer,
    "Name": String
  }
} 

属性

属性名称 类型 必须 允许更新 描述 约束
GeographicRegionAId String 网络实例所属地域 取值:
  • China
  • North-America
  • Asia-Pacific
  • Europe
  • Australia
Description String 带宽包的描述 长度为2~256个字符,必须以中文字符或英文字符开头,不能以http://https://开头。

可包含中文字符、英文字符、数字、短划线(-)、英文句点(.)和下划线(_)。

AutoPay Boolean 是否自动支付账单

取值:

  • true
  • false (默认值)
Period Integer 带宽包的购买时长 默认值:1。
GeographicRegionBId String 网络实例所属的地域 取值:
  • China
  • North-America
  • Asia-Pacific
  • Europe
  • Australiat
Bandwidth Integer 带宽包的带宽峰值 单位:Mbps。

最小值:2。

PricingCycle String 带宽包的计费周期 取值:
  • Month(默认值)
  • Year
BandwidthPackageChargeType String 带宽包的付费类型 取值:
  • POSTPAY
  • PREPAY
Name String 带宽包的名称

长度为2~128个字符,必须以英文字符或中文字符开头,不能以http://https://开头。

可包含英文字符、中文字符、数字、英文句点(.)、下划线(_)和短划线(-)。

AutoRenew Boolean 是否开启自动续费 取值:
  • true
  • false(默认值)
AutoRenewDuration Integer 自动续费时长

当AutoRenew取值为true时生效。

取值:
  • 1
  • 2
  • 3
单位:月。

返回值

Fn::GetAtt

CenBandwidthPackageId:新建带宽包的ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Description": {
      "Type": "String",
      "Description": "The description of the bandwidth package.\nThe description can contain [2,256] characters, numbers, underscores, and hyphens, and the name must start with English letters, but cannot start with http:// or https://."
    },
    "BandwidthPackageChargeType": {
      "Type": "String",
      "Description": "The billing method. Valid value: PREPAY, POSTPAY (Default)",
      "AllowedValues": [
        "PREPAY",
        "POSTPAY"
      ]
    },
    "GeographicRegionBId": {
      "Type": "String",
      "Description": "The other area B to connect.\nValid value: China | North-America | Asia-Pacific | Europe | Australia",
      "AllowedValues": [
        "China",
        "North-America",
        "Asia-Pacific",
        "Europe",
        "Australia"
      ]
    },
    "GeographicRegionAId": {
      "Type": "String",
      "Description": "The other area A to connect.\nValid value: China | North-America | Asia-Pacific | Europe | Australia",
      "AllowedValues": [
        "China",
        "North-America",
        "Asia-Pacific",
        "Europe",
        "Australia"
      ]
    },
    "PricingCycle": {
      "Type": "String",
      "Description": "The pricing cycle.",
      "AllowedValues": [
        "Month",
        "Year"
      ],
      "Default": "Month"
    },
    "AutoRenew": {
      "Type": "Boolean",
      "Description": "Indicates whether automatic renewal is enabled. Valid values:true: Automatic renewal is enabled.false: Automatic renewal is not enabled. You must renew the instance manually.Default value: false.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Bandwidth": {
      "Type": "Number",
      "Description": "The bandwidth in Mbps of the bandwidth package. The bandwidth cannot be less than 2 Mbps.",
      "MinValue": 2
    },
    "Period": {
      "Type": "Number",
      "Description": "The purchase period. The default value is 1.",
      "Default": 1
    },
    "AutoPay": {
      "Type": "Boolean",
      "Description": "Whether to automatically pay the bill. Valid value:\ntrue\nfalse (Default)",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ],
      "Default": false
    },
    "AutoRenewDuration": {
      "Type": "Number",
      "Description": "Duration of each automatic renewals. It takes effect when AutoRenew is true.",
      "AllowedValues": [
        1,
        2,
        3,
        6
      ]
    },
    "Name": {
      "Type": "String",
      "Description": "The name of the bandwidth package.\nThe name can contain 2-128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. It must start with English letters, but cannot start with http:// or https://."
    }
  },
  "Resources": {
    "CenBandwidthPackage": {
      "Type": "ALIYUN::CEN::CenBandwidthPackage",
      "Properties": {
        "Description": {
          "Ref": "Description"
        },
        "BandwidthPackageChargeType": {
          "Ref": "BandwidthPackageChargeType"
        },
        "GeographicRegionBId": {
          "Ref": "GeographicRegionBId"
        },
        "GeographicRegionAId": {
          "Ref": "GeographicRegionAId"
        },
        "PricingCycle": {
          "Ref": "PricingCycle"
        },
        "AutoRenew": {
          "Ref": "AutoRenew"
        },
        "Bandwidth": {
          "Ref": "Bandwidth"
        },
        "Period": {
          "Ref": "Period"
        },
        "AutoPay": {
          "Ref": "AutoPay"
        },
        "AutoRenewDuration": {
          "Ref": "AutoRenewDuration"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "CenBandwidthPackageId": {
      "Description": "The ID of the bandwidth package.",
      "Value": {
        "Fn::GetAtt": [
          "CenBandwidthPackage",
          "CenBandwidthPackageId"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Description:
    Type: String
    Description: >-
      The description of the bandwidth package.

      The description can contain [2,256] characters, numbers, underscores, and
      hyphens, and the name must start with English letters, but cannot start
      with http:// or https://.
  BandwidthPackageChargeType:
    Type: String
    Description: 'The billing method. Valid value: PREPAY, POSTPAY (Default)'
    AllowedValues:
      - PREPAY
      - POSTPAY
  GeographicRegionBId:
    Type: String
    Description: |-
      The other area B to connect.
      Valid value: China | North-America | Asia-Pacific | Europe | Australia
    AllowedValues:
      - China
      - North-America
      - Asia-Pacific
      - Europe
      - Australia
  GeographicRegionAId:
    Type: String
    Description: |-
      The other area A to connect.
      Valid value: China | North-America | Asia-Pacific | Europe | Australia
    AllowedValues:
      - China
      - North-America
      - Asia-Pacific
      - Europe
      - Australia
  PricingCycle:
    Type: String
    Description: The pricing cycle.
    AllowedValues:
      - Month
      - Year
    Default: Month
  AutoRenew:
    Type: Boolean
    Description: >-
      Indicates whether automatic renewal is enabled. Valid values:true:
      Automatic renewal is enabled.false: Automatic renewal is not enabled. You
      must renew the instance manually.Default value: false.
    AllowedValues:
      - 'True'
      - 'true'
      - 'False'
      - 'false'
  Bandwidth:
    Type: Number
    Description: >-
      The bandwidth in Mbps of the bandwidth package. The bandwidth cannot be
      less than 2 Mbps.
    MinValue: 2
  Period:
    Type: Number
    Description: The purchase period. The default value is 1.
    Default: 1
  AutoPay:
    Type: Boolean
    Description: |-
      Whether to automatically pay the bill. Valid value:
      true
      false (Default)
    AllowedValues:
      - 'True'
      - 'true'
      - 'False'
      - 'false'
    Default: false
  AutoRenewDuration:
    Type: Number
    Description: >-
      Duration of each automatic renewals. It takes effect when AutoRenew is
      true.
    AllowedValues:
      - 1
      - 2
      - 3
      - 6
  Name:
    Type: String
    Description: >-
      The name of the bandwidth package.

      The name can contain 2-128 characters including a-z, A-Z, 0-9, periods,
      underlines, and hyphens. It must start with English letters, but cannot
      start with http:// or https://.
Resources:
  CenBandwidthPackage:
    Type: 'ALIYUN::CEN::CenBandwidthPackage'
    Properties:
      Description:
        Ref: Description
      BandwidthPackageChargeType:
        Ref: BandwidthPackageChargeType
      GeographicRegionBId:
        Ref: GeographicRegionBId
      GeographicRegionAId:
        Ref: GeographicRegionAId
      PricingCycle:
        Ref: PricingCycle
      AutoRenew:
        Ref: AutoRenew
      Bandwidth:
        Ref: Bandwidth
      Period:
        Ref: Period
      AutoPay:
        Ref: AutoPay
      AutoRenewDuration:
        Ref: AutoRenewDuration
      Name:
        Ref: Name
Outputs:
  CenBandwidthPackageId:
    Description: The ID of the bandwidth package.
    Value:
      'Fn::GetAtt':
        - CenBandwidthPackage
        - CenBandwidthPackageId