ALIYUN::VPC::HaVip is used to create a high-availability virtual IP address (HAVIP).
Each virtual private cloud (VPC) can have up to five HAVIPs.
Syntax
{
"Type": "ALIYUN::VPC::HaVip",
"Properties": {
"VSwitchId": String,
"IpAddress": String,
"Description": String,
"Tags": List,
"Name": String,
"ResourceGroupId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
VSwitchId | String | Yes | No | The vSwitch ID. | None. |
IpAddress | String | No | No | The IP address of the HAVIP. If you leave this property empty, the system assigns an IP address from the specified vSwitch at random. | None. |
Description | String | No | Yes | The description. | The description can be up to 256 characters in length. It cannot start with |
Name | String | No | Yes | The name of the HAVIP. | The name must be 1 to 128 characters in length and cannot start with |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the HAVIP belongs. | None. |
Tags | List | No | Yes | The custom tags. | For more information, see the "Tags properties" section of this topic. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 128 characters in length and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length and cannot contain |
Return values
Fn::GetAtt
HaVipId: the HAVIP ID.
IpAddress: the IP address of the HAVIP.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ZoneId:
Type: String
Description: Create an Availability Zone for an instance to ensure that the Availability Zone supports the creation of Memcache resource specifications.
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Label: Zone ID
VSwitch:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
Type: String
Description: Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches
Label: Existing VSwitch ID
AssociationPropertyMetadata:
ZoneId: ZoneId
Resources:
HaVip:
Type: ALIYUN::VPC::HaVip
Properties:
VSwitchId:
Ref: VSwitch
Outputs:
HaVipId:
Value:
Fn::GetAtt:
- HaVip
- HaVipId
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ZoneId": {
"Type": "String",
"Description": "Create an Availability Zone for an instance to ensure that the Availability Zone supports the creation of Memcache resource specifications.",
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
"Label": "Zone ID"
},
"VSwitch": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"Type": "String",
"Description": "Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual Private Cloud-VSwitches",
"Label": "Existing VSwitch ID",
"AssociationPropertyMetadata": {
"ZoneId": "ZoneId"
}
}
},
"Resources": {
"HaVip": {
"Type": "ALIYUN::VPC::HaVip",
"Properties": {
"VSwitchId": {
"Ref": "VSwitch"
}
}
}
},
"Outputs": {
"HaVipId": {
"Value": {
"Fn::GetAtt": [
"HaVip",
"HaVipId"
]
}
}
}
}