ALIYUN::VPC::HaVip is used to apply for a high-availability virtual IP address (HAVIP).
Each VPC supports 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 not specified, the system randomly assigns an IP address from the specified vSwitch. |
None. |
|
Description |
String |
No |
Yes |
The HAVIP description. |
Up to 256 characters. Cannot start with |
|
Name |
String |
No |
Yes |
The HAVIP name. |
1 to 128 characters. Cannot start with |
|
ResourceGroupId |
String |
No |
Yes |
The resource group ID. |
None. |
|
Tags |
List |
No |
Yes |
The tags to add to the HAVIP. |
See the "Tags properties" section. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Key |
String |
Yes |
No |
The tag key. |
1 to 128 characters. Cannot contain |
|
Value |
String |
No |
No |
The tag value. |
Up to 128 characters. Cannot contain |
Return values
Fn::GetAtt
-
HaVipId: the ID of the HAVIP.
-
IpAddress: the IP address of the HAVIP.
-
Arn: the Alibaba Cloud Resource Name (ARN).
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"
]
}
}
}
}