All Products
Search
Document Center

Virtual Private Cloud:DescribeHaVips

Last Updated:Dec 01, 2023

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

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeHaVipsList
  • HaVip
    acs:vpc:{#regionId}:{#accountId}:havip/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region to which the HAVIP belongs.

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

cn-hangzhou
PageNumberintegerNo

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

1
PageSizeintegerNo

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

10
Filterobject []No
KeystringNo

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: 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.

HaVipId
ValuearrayNo
stringNo

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.

Active
ResourceGroupIdstringNo

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

rg-bp67acfmxazb4ph****
Tagsobject []No
KeystringNo

The tag key. You can specify at most 20 tag keys. It cannot be an empty string.

The key cannot exceed 64 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with aliyun or acs:. The key cannot contain http:// or https://.

FinanceDept
ValuestringNo

The tag value. You can specify at most 20 tag values. It can be an empty string.

The tag value cannot exceed 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

33E480C5-B46F-4CA5-B6FD-D77C746E86AB
PageNumberinteger

The number of the returned page.

1
TotalCountinteger

The total number of entries returned.

1
HaVipsobject []

The details about the HAVIP.

VpcIdstring

The ID of the VPC to which the HAVIP belongs.

vpc-bp1kcm36tevkpms97****
Statusstring

The status of the HAVIP. Valid values:

  • Creating
  • Available
  • Deleting
Available
HaVipIdstring

The ID of the HAVIP.

havip-bp149uyvut73dpld****
AssociatedInstanceTypestring

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

  • EcsInstance: an ECS instance
  • NetworkInterface: an ENI
EcsInstance
CreateTimestring

The time when the HAVIP was created.

2021-07-03T14:25:26Z
ChargeTypestring

The parameter is invalid. No value is returned.

none
RegionIdstring

The ID of the region to which the HAVIP belongs.

cn-hangzhou
VSwitchIdstring

The ID of the vSwitch to which the HAVIP belongs.

vsw-bp1pkt1fba8e824ez****
IpAddressstring

The private IP address of the HAVIP.

192.168.24.5
Descriptionstring

The description of the HAVIP.

My HaVip
MasterInstanceIdstring

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

i-bp145q7glnuzdvz****
Namestring

The name of the HAVIP.

test
AssociatedEipAddressesarray

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

string
121.12.XX.XX
AssociatedInstancesarray

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

string
i-bp145q7glnuzdvzu21****
ResourceGroupIdstring

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

rg-bp67acfmxazb4ph****
Tagsobject []

The list of tags.

Keystring

The tag key.

FinanceDept
Valuestring

The tag value.

FinanceJoshua

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "33E480C5-B46F-4CA5-B6FD-D77C746E86AB",
  "PageNumber": 1,
  "TotalCount": 1,
  "HaVips": {
    "HaVip": [
      {
        "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": {
          "associatedEipAddresse": [
            "121.12.XX.XX"
          ]
        },
        "AssociatedInstances": {
          "associatedInstance": [
            "i-bp145q7glnuzdvzu21****"
          ]
        },
        "ResourceGroupId": "rg-bp67acfmxazb4ph****",
        "Tags": {
          "Tag": [
            {
              "Key": "FinanceDept",
              "Value": "FinanceJoshua"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Forbidden.HaVipNo 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 acquire the permissions.
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId parameter is set to an invalid value. Specify a valid value and try again.
404InvalidFilterKey.ValueNotSupportedSpecified filter key is not supported: Filter.X.keyFilter.X.key is not supported.

For a list of error codes, visit the Service error codes.