All Products
Search
Document Center

:DescribeHaVips

最終更新日:Aug 21, 2023

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 to which the HAVIP belongs.

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

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

The following filter keys are supported:

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

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

The logical operator among multiple filter keys is AND. HAVIPs can be queried only if all filter keys are matched.

Filter.N.Value.N String No Active

The filter values for filter keys. You can specify multiple filter values for one key. The logical operator between filter values is OR. If one filter value is matched, the filter key is matched.

ResourceGroupId String No rg-bp67acfmxazb4ph****

The ID of the resource group to which the HAVIP belongs.

Tags.N.Key String No FinanceDept

The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be at most 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Tags.N.Value String No FinanceJoshua

The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with acs: or aliyun. The tag value cannot contain http:// or https://.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries per page.

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

The request ID.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The number of entries returned.

HaVips Array of HaVip

The details about the HAVIP.

HaVip
VpcId String vpc-bp1kcm36tevkpms97****

The ID of the VPC to which the HAVIP belongs.

Status String Available

The status of the HAVIP. Valid values:

  • Creating
  • Available
  • Deleting
HaVipId String havip-bp149uyvut73dpld****

The ID of the HAVIP.

AssociatedInstanceType String EcsInstance

The type of the instance with which the HAVIP is associated. Valid values:

  • EcsInstance: Elastic Compute Service (ECS) instance
  • NetworkInterface: elastic network interface (ENI)
CreateTime String 2021-07-03T14:25:26Z

The time when the HAVIP was created.

ChargeType String none

The parameter is invalid. No value is returned.

RegionId String cn-hangzhou

The ID of the region to which the HAVIP belongs.

VSwitchId String vsw-bp1pkt1fba8e824ez****

The ID of the vSwitch to which the HAVIP belongs.

IpAddress String 192.168.24.5

The private IP address of the HAVIP.

Description String My HaVip

The description 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.

AssociatedEipAddresses Array of String 121.12.XX.XX

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

AssociatedInstances Array of String i-bp145q7glnuzdvzu21****

The ID of the instance with which the HAVIP is associated.

ResourceGroupId String rg-bp67acfmxazb4ph****

The ID of the resource group to which the HAVIP belongs.

Tags Array of Tag

The list of tags.

Tag
Key String FinanceDept

The key of tag N.

Value String FinanceJoshua

The value of tag N.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeHaVips
&RegionId=cn-hangzhou
&PageNumber=1
&PageSize=10
&Filter=[{"Key":"HaVipId","Value":["Active"]}]
&ResourceGroupId=rg-bp67acfmxazb4ph****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "33E480C5-B46F-4CA5-B6FD-D77C746E86AB",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "HaVips" : [ {
    "VpcId" : "vpc-bp1kcm36tevkpms97****",
    "Status" : "Available",
    "HaVipId" : "havip-bp149uyvut73dpld****",
    "AssociatedInstanceType" : "EcsInstance",
    "CreateTime" : "2021-07-03T14:25:26Z",
    "ChargeType" : "none",
    "RegionId" : "cn-hangzhou",
    "VSwitchId" : "vsw-bp1pkt1fba8e824ez****",
    "IpAddress" : "192.168.24.5",
    "Description" : "My HaVip",
    "MasterInstanceId" : "i-bp145q7glnuzdvz****",
    "Name" : "test",
    "AssociatedEipAddresses" : [ "121.12.XX.XX" ],
    "AssociatedInstances" : [ "i-bp145q7glnuzdvzu21****" ],
    "ResourceGroupId" : "rg-bp67acfmxazb4ph****",
    "Tags" : [ {
      "Key" : "FinanceDept",
      "Value" : "FinanceJoshua"
    } ]
  } ]
}

Error codes

HttpCode Error code Error message Description
400 Forbidden.HaVip No permissions to perform operations on HAVIPs. Please apply for privilege--vpc_privilege_allow_buy_havip_instance. The error message returned because you do not have the permissions to manage the HAVIP. Go to the Quota Center page to apply for the permissions.
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, see Service error codes.