Queries high-availability virtual IP addresses (HAVIPs) in a specified region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeHaVips

The operation that you want to perform. Set the value to DescribeHaVips.

RegionId String Yes cn-hangzhou

The ID of the region that you want to query.

You can call the DescribeRegions operation to query the most recent region list.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Maximum value: 50. Default value: 10.

Filter.N.Key String No HaVipId

Specifies filter keys. You can specify at most five filter keys. Valid values of N: 1 to 5.

The following filter keys are available:

  • VpcId: virtual private cloud (VPC) ID
  • VSwitchId: vSwitch ID
  • Status: HAVIP status
  • HaVipId: HAVIP ID
  • HaVipAddress: HAVIP IP address

You can specify multiple values for each filter key. The logical relation among multiple values is OR. If one value is matched, the filter key is matched.

The logical relation among multiple filter keys is AND, which indicates that all filter keys must be matched.

Filter.N.Value.N RepeatList No havip-bp19o63nequs01i8d****

Specifies the values of a filter key. Valid values of N: 1 to 5.

Response parameters

Parameter Type Example Description
HaVips Array of HaVip

The details about the HAVIP.

HaVip
AssociatedEipAddresses List 121.12.XX.XX

The elastic IP address (EIP) associated with the HAVIP.

AssociatedInstanceType String EcsInstance

The type of the instance that is associated with the HAVIP.

AssociatedInstances List i-bp145q7glnuzdvzu21****

The Elastic Compute Service (ECS) instance that is associated with the HAVIP.

ChargeType String none

The parameter is invalid. No value is returned.

CreateTime String 2021-07-03T14:25:26Z

The time when the HAVIP was created.

Description String My HaVip

The description of the HAVIP.

HaVipId String havip-bp149uyvut73dpld****

The ID of the HAVIP.

IpAddress String 192.27.XX.XX

The private IP address of the HAVIP.

MasterInstanceId String i-bp145q7glnuzdvz****

The ID of the active instance that is associated with the HAVIP.

Name String test

The name of the HAVIP.

RegionId String cn-hangzhou

The ID of the region to which the HAVIP belongs.

Status String Available

The status of the HAVIP. Valid values:

  • Creating: The HAVIP is being created.
  • Available: The HAVIP is available.
  • Deleting: The HAVIP is being deleted.
VSwitchId String vsw-bp1pkt1fba8e824ez****

The ID of the vSwitch to which the HAVIP belongs.

VpcId String vpc-bp1kcm36tevkpms97****

The ID of the VPC to which the HAVIP belongs.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned on each page.

RequestId String 33E480C5-B46F-4CA5-B6FD-D77C746E86AB

The ID of the request.

TotalCount Integer 1

The number of returned entries.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeHaVips 
&RegionId=cn-hangzhou 
&Filter=HaVipId.havip-bp149uyvut73dplduo****
&<Common request parameters>

Sample success responses

XML format

<DescribeHaVipsResponse>
  <TotalCount>1</TotalCount>
  <HaVips>
        <HaVip>
              <Status>Available</Status>
              <Description>My HaVip</Description>
              <VpcId>vpc-bp1kcm36tevkpms97****</VpcId>
              <MasterInstanceId>i-bp145q7glnuzdvz****</MasterInstanceId>
              <ChargeType>none</ChargeType>
              <CreateTime>2018-07-03T14:25:26Z</CreateTime>
              <VSwitchId>vsw-bp1pkt1fba8e824ez****</VSwitchId>
              <IpAddress>192.27.XX.XX</IpAddress>
              <RegionId>cn-hangzhou</RegionId>
              <HaVipId>havip-bp149uyvut73dpld****</HaVipId>
              <AssociatedInstanceType>EcsInstance</AssociatedInstanceType>
              <Name>test</Name>
              <AssociatedInstances>
                    <associatedInstance>i-bp145q7glnuzdvzu21****</associatedInstance>
              </AssociatedInstances>
              <AssociatedEipAddresses>
                    <associatedEipAddresse>121.12.XX.XX</associatedEipAddresse>
              </AssociatedEipAddresses>
        </HaVip>
  </HaVips>
  <PageSize>10</PageSize>
  <RequestId>33E480C5-B46F-4CA5-B6FD-D77C746E86AB</RequestId>
  <PageNumber>1</PageNumber>
</DescribeHaVipsResponse>

JSON format

{
    "DescribeHaVipsResponse": {
        "TotalCount": 1,
        "HaVips": {
            "HaVip": {
                "Status": "Available",
                "Description": "My HaVip",
                "VpcId": "vpc-bp1kcm36tevkpms97****",
                "MasterInstanceId": "i-bp145q7glnuzdvz****",
                "ChargeType": "none",
                "CreateTime": "2018-07-03T14:25:26Z",
                "VSwitchId": "vsw-bp1pkt1fba8e824ez****",
                "IpAddress": "192.27.XX.XX",
                "RegionId": "cn-hangzhou",
                "HaVipId": "havip-bp149uyvut73dpld****",
                "AssociatedInstanceType": "EcsInstance",
                "Name": "test",
                "AssociatedInstances": {
                    "associatedInstance": "i-bp145q7glnuzdvzu21****"
                },
                "AssociatedEipAddresses": {
                    "associatedEipAddresse": "121.12.XX.XX"
                }
            }
        },
        "PageSize": 10,
        "RequestId": "33E480C5-B46F-4CA5-B6FD-D77C746E86AB",
        "PageNumber": 1
    }
}

Error codes

HttpCode Error code Error message Description
404 InvalidFilterKey.ValueNotSupported Specified filter key is not supported: Filter.X.key The error message returned because Filter.X.key is not supported.

For a list of error codes, visit the API Error Center.