tencent cloud

Feedback

DescribeAddresses

Last updated: 2024-11-25 20:05:43

    1. API Description

    Domain name for API request: vpc.intl.tencentcloudapi.com.

    This API (DescribeAddresses) is used to query the information of one or multiple Elastic IPs.

    • If the parameter is empty, a number (as specified by the Limit, the default value is 20) of EIPs will be returned.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribeAddresses.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    AddressIds.N No Array of String The list of unique IDs of EIPs in the format of eip-11112222. AddressIds and Filters.address-id cannot be specified at the same time.
    Filters.N No Array of Filter Each request can have up to 10 Filters and 100 Filter.Values. Detailed filter conditions:
  • address-id - String - Optional - Filter by unique EIP ID, such as eip-11112222.
  • address-name - String - Optional - Filter by EIP name. Fuzzy filtering is not supported.
  • address-ip - String - Optional - Filter by EIP address.
  • address-status - String - Optional - Filter by EIP status. Valid values: CREATING, BINDING, BIND, UNBINDING, UNBIND, OFFLINING, and BIND_ENI.
  • instance-id - String - Optional - Filter by the ID of the instance bound to the EIP, such as ins-11112222.
  • private-ip-address - String - Optional - Filter by the private IP address bound to the EIP.
  • network-interface-id - String - Optional - Filter by ID of the ENI bound to the EIP, such as eni-11112222.
  • is-arrears - String - Optional - Filter by the fact whether the EIP is overdue (TRUE: the EIP is overdue | FALSE: the billing status of the EIP is normal).
  • address-type - String - Optional - Filter by IP type. Valid values: WanIP, EIP, AnycastEIP, and HighQualityEIP. Default value: EIP.
  • address-isp - String - Optional - Filter by ISP type. Valid values: BGP, CMCC, CUCC, and CTCC.
  • dedicated-cluster-id - String - Optional - Filter by unique CDC ID, such as cluster-11112222.
  • tag-key - String - Optional - Filter by tag key.
  • tag-value - String - Optional - Filter by tag value.
  • tag:tag-key - String - Optional - Filter by tag key-value pair. Use a specific tag key to replace tag-key.
  • Offset No Integer The Offset. The default value is 0. For more information about Offset, see the relevant section in the API documentation.
    Limit No Integer Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit, see the relevant section in the API documentation.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of EIPs meeting the condition.
    AddressSet Array of Address List of EIPs details.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying EIP information

    This example shows you how to query EIP information.

    Input Example

    POST / HTTP/1.1
    Host: vpc.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeAddresses
    <Common request parameters>
    
    {}
    

    Output Example

    {
        "Response": {
            "TotalCount": 2,
            "AddressSet": [
                {
                    "AddressId": "eip-qhx8udkc",
                    "AddressName": "Unnamed",
                    "AddressIp": "1.14.91.34",
                    "AddressStatus": "UNBIND",
                    "AddressType": "EIP",
                    "InstanceId": "ins-wf123456",
                    "InstanceType": null,
                    "NetworkInterfaceId": "eni-12345678",
                    "PrivateAddressIp": "10.2.3.4",
                    "IsArrears": false,
                    "IsBlocked": false,
                    "IsEipDirectConnection": false,
                    "EipAlgType": {
                        "Ftp": true,
                        "Sip": true
                    },
                    "LocalBgp": false,
                    "CascadeRelease": false,
                    "CreatedTime": "2022-08-11T03:57:05Z",
                    "TagSet": [],
                    "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                    "Bandwidth": 1,
                    "DeadlineDate": null,
                    "InternetServiceProvider": "BGP"
                },
                {
                    "AddressId": "eip-qygpzm9y",
                    "AddressName": "Unnamed",
                    "AddressIp": "1.14.90.212",
                    "AddressStatus": "UNBIND",
                    "AddressType": "EIP",
                    "InstanceId": "ins-12345678",
                    "InstanceType": null,
                    "NetworkInterfaceId": "eni-12345678",
                    "PrivateAddressIp": "10.3.4.5.6",
                    "IsArrears": false,
                    "IsBlocked": false,
                    "IsEipDirectConnection": false,
                    "EipAlgType": {
                        "Ftp": true,
                        "Sip": true
                    },
                    "LocalBgp": false,
                    "CascadeRelease": false,
                    "CreatedTime": "2022-08-11T03:47:03Z",
                    "TagSet": [],
                    "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                    "Bandwidth": 1,
                    "DeadlineDate": null,
                    "InternetServiceProvider": "BGP"
                }
            ],
            "RequestId": "4ead34c4-3112-40fe-bbde-2295eee9d664"
        }
    }
    

    Example2 Querying public IPs

    This example shows you how to query public IPs.

    Input Example

    https://vpc.intl.tencentcloudapi.com/?Action=DescribeAddresses
    &Filters.0.Name=address-type
    &Filters.0.Values.0=WanIP
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "TotalCount": 0,
            "AddressSet": [
                {
                    "AddressId": "eip-12345678",
                    "AddressName": "abc",
                    "AddressStatus": "UNBIND",
                    "AddressIp": "34.3.4.5.6",
                    "InstanceId": "ins-12345678",
                    "CreatedTime": "2020-09-22T00:00:00+00:00",
                    "NetworkInterfaceId": "eni-12345678",
                    "PrivateAddressIp": "192.2.3.4",
                    "IsArrears": true,
                    "IsBlocked": true,
                    "IsEipDirectConnection": true,
                    "AddressType": "WanIp",
                    "CascadeRelease": true,
                    "EipAlgType": {
                        "Ftp": true,
                        "Sip": true
                    },
                    "InternetServiceProvider": "abc",
                    "LocalBgp": true,
                    "Bandwidth": 1,
                    "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                    "TagSet": [
                        {
                            "Key": "abc",
                            "Value": "abc"
                        }
                    ],
                    "DeadlineDate": "2020-09-22",
                    "InstanceType": "abc"
                }
            ],
            "RequestId": "abc"
        }
    }
    

    Example3 Querying EIPs

    This example shows you how to query EIPs.

    Input Example

    https://vpc.intl.tencentcloudapi.com/?Action=DescribeAddresses
    &AddressIds.0=eip-hxlqja90
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "TotalCount": 0,
            "AddressSet": [
                {
                    "AddressId": "eip-12345678",
                    "AddressName": "abc",
                    "AddressStatus": "UNBIND",
                    "AddressIp": "34.3.4.5.6",
                    "InstanceId": "ins-12345678",
                    "CreatedTime": "2020-09-22T00:00:00+00:00",
                    "NetworkInterfaceId": "eni-12345678",
                    "PrivateAddressIp": "10.2.3.4",
                    "IsArrears": true,
                    "IsBlocked": true,
                    "IsEipDirectConnection": true,
                    "AddressType": "WanIp",
                    "CascadeRelease": true,
                    "EipAlgType": {
                        "Ftp": true,
                        "Sip": true
                    },
                    "InternetServiceProvider": "BGP",
                    "LocalBgp": true,
                    "Bandwidth": 1,
                    "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                    "TagSet": [
                        {
                            "Key": "abc",
                            "Value": "abc"
                        }
                    ],
                    "DeadlineDate": "2020-09-22",
                    "InstanceType": "abc"
                }
            ],
            "RequestId": "abc"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidParameter A parameter error occurred.
    InvalidParameter.InvalidFilter The filter rule is invalid.
    InvalidParameterValue.AddressIdMalformed This IP address ID is invalid.
    InvalidParameterValue.InvalidDedicatedClusterId Invalid DedicatedClusterId.
    InvalidParameterValue.LimitExceeded The parameter value exceeds the limit.
    InvalidParameterValue.NetworkInterfaceIdMalformed Incorrect network interface ID.
    InvalidParameterValue.ResourceIdMalformed The resource ID is incorrect.
    LimitExceeded.NumberOfFilters Exceeded the character limit of a filter name.
    UnsupportedOperation Unsupported operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support