All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VPC::HaVipAssociation

Last Updated:Dec 06, 2024

ALIYUN::VPC::HaVipAssociation is used to associate high-availability virtual IP addresses (HAVIPs) with an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

Important
  • You can associate up to five HAVIPs with a single ECS instance.

  • You can associate a single HAVIP with up to two ECS instances.

Syntax

{
  "Type": "ALIYUN::VPC::HaVipAssociation",
  "Properties": {
    "HaVipId":  String,
    "InstanceId":  String,
    "InstanceType": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

HaVipId

String

Yes

No

The HAVIP ID.

None.

InstanceId

String

Yes

No

The ID of the ECS instance.

None.

InstanceType

String

No

No

The type of the instance with which you want to associate the HAVIP.

Valid values:

  • EcsInstance: ECS instance.

  • NetworkInterface: ENI. You must use this value if you associate the HAVIP with an ENI.

Return values

Fn::GetAtt

None.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description: ECS Instance ID.
    Label: InstanceId
  HaVipID:
    Type: String
    Label: HaVipID
    Description: HaVip ID.
Resources:
  HaVipAssociation:
    Type: ALIYUN::VPC::HaVipAssociation
    Properties:
      InstanceId:
        Ref: InstanceId
      HaVipId:
        Ref: HaVipID
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "ECS Instance ID.",
      "Label": "InstanceId"
    },
    "HaVipID": {
      "Type": "String",
      "Label": "HaVipID",
      "Description": "HaVip ID."
    }
  },
  "Resources": {
    "HaVipAssociation": {
      "Type": "ALIYUN::VPC::HaVipAssociation",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "HaVipId": {
          "Ref": "HaVipID"
        }
      }
    }
  }
}