ALIYUN::ECS::AssignIpv6Addresses类型用于为弹性网卡分配一个或多个IPv6地址。

语法

{
  "Type": "ALIYUN::ECS::AssignIpv6Addresses",
  "Properties": {
    "Ipv6Addresses": List,
    "Ipv6AddressCount": Integer,
    "NetworkInterfaceId": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
Ipv6Addresses List 为弹性网卡指定的一个或多个IPv6地址。 示例:["2001:db8:1234:1a00::***"]。目前仅支持指定一个IPv6地址。不能同时指定参数Ipv6Addresses和Ipv6AddressCount。
Ipv6AddressCount Integer 为弹性网卡指定的随机生成的IPv6地址数量。 不能同时指定参数Ipv6Addresses和Ipv6AddressCount。
NetworkInterfaceId String 弹性网卡ID。 无。

返回值

Fn::GetAtt

  • Ipv6Addresses:IPv6地址。
  • NetworkInterfaceId:弹性网卡ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "AssignIpv6Addresses": {
      "Type": "ALIYUN::ECS::AssignIpv6Addresses",
      "Properties": {
        "Ipv6Addresses": {
          "Fn::Split": [
            ",",
            {
              "Ref": "Ipv6Addresses"
            }
          ]
        },
        "Ipv6AddressCount": {
          "Ref": "Ipv6AddressCount"
        },
        "NetworkInterfaceId": {
          "Ref": "NetworkInterfaceId"
        }
      }
    }
  },
  "Parameters": {
    "Ipv6Addresses": {
      "Type": "CommaDelimitedList",
      "Description": "Specify one or more IPv6 addresses for the elastic NIC. Currently, the maximum list size is 1. Example value: 2001:db8:1234:1a00::*** .\nNote You cannot specify the parameters Ipv6Addresses and Ipv6AddressCount at the same time.",
      "MaxLength": 1
    },
    "Ipv6AddressCount": {
      "Type": "Number",
      "Description": "IPv6 addresses specified number of randomly generated interfaces elasticity.\nNote You cannot specify the parameters Ipv6Addresses and Ipv6AddressCount at the same time.",
      "MinValue": 0
    },
    "NetworkInterfaceId": {
      "Type": "String",
      "Description": "Elastic network interface ID."
    }
  },
  "Outputs": {
    "Ipv6Addresses": {
      "Description": "Assigned IPv6 addresses.",
      "Value": {
        "Fn::GetAtt": [
          "AssignIpv6Addresses",
          "Ipv6Addresses"
        ]
      }
    },
    "NetworkInterfaceId": {
      "Description": "Elastic network interface ID.",
      "Value": {
        "Fn::GetAtt": [
          "AssignIpv6Addresses",
          "NetworkInterfaceId"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  AssignIpv6Addresses:
    Type: ALIYUN::ECS::AssignIpv6Addresses
    Properties:
      Ipv6Addresses:
        Fn::Split:
        - ","
        - Ref: Ipv6Addresses
      Ipv6AddressCount:
        Ref: Ipv6AddressCount
      NetworkInterfaceId:
        Ref: NetworkInterfaceId
Parameters:
  Ipv6Addresses:
    Type: CommaDelimitedList
    Description: |-
      Specify one or more IPv6 addresses for the elastic NIC. Currently, the maximum list size is 1. Example value: 2001:db8:1234:1a00::*** .
      Note You cannot specify the parameters Ipv6Addresses and Ipv6AddressCount at the same time.
    MaxLength: 1
  Ipv6AddressCount:
    Type: Number
    Description: |-
      IPv6 addresses specified number of randomly generated interfaces elasticity.
      Note You cannot specify the parameters Ipv6Addresses and Ipv6AddressCount at the same time.
    MinValue: 0
  NetworkInterfaceId:
    Type: String
    Description: Elastic network interface ID.
Outputs:
  Ipv6Addresses:
    Description: Assigned IPv6 addresses.
    Value:
      Fn::GetAtt:
      - AssignIpv6Addresses
      - Ipv6Addresses
  NetworkInterfaceId:
    Description: Elastic network interface ID.
    Value:
      Fn::GetAtt:
      - AssignIpv6Addresses
      - NetworkInterfaceId