All Products
Search
Document Center

VPN Gateway:DescribeCustomerGateway

Last Updated:Feb 05, 2025

Queries details of a customer gateway.

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.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the customer gateway is deployed.

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

cn-shanghai
CustomerGatewayIdstringYes

The ID of the customer gateway.

cgw-bp1pvpl9r9adju6l5****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Asnlong

The autonomous system number (ASN) of the gateway device in the data center.

65535
RequestIdstring

The request ID.

A0457BC9-6C0F-4437-AB9D-FB2EABC1D6A2
IpAddressstring

The IP address of the gateway device in the data center.

139.32.XX.XX
Descriptionstring

The description of the customer gateway.

desctest
CustomerGatewayIdstring

The ID of the customer gateway.

cgw-bp1pvpl9r9adju6l5****
CreateTimelong

The timestamp generated when the customer gateway was created. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

1492747187000
Namestring

The name of the customer gateway.

nametest
AuthKeystring

The authentication key of the Border Gateway Protocol (BGP) routing protocol for the gateway device in the data center.

AuthKey****
Tagsarray<object>

The list of tags added to the customer gateway.

Tagobject
Keystring

The tag key.

TagKey
Valuestring

The tag value.

TagValue
ResourceGroupIdstring

The ID of the resource group to which the customer gateway belongs.

You can call the ListResourceGroups operation to query resource groups.

rg-acfmzs372yg****

Examples

Sample success responses

JSONformat

{
  "Asn": 65535,
  "RequestId": "A0457BC9-6C0F-4437-AB9D-FB2EABC1D6A2",
  "IpAddress": "139.32.XX.XX",
  "Description": "desctest",
  "CustomerGatewayId": "cgw-bp1pvpl9r9adju6l5****",
  "CreateTime": 1492747187000,
  "Name": "nametest",
  "AuthKey": "AuthKey****",
  "Tags": {
    "Tag": [
      {
        "Key": "TagKey",
        "Value": "TagValue"
      }
    ]
  },
  "ResourceGroupId": "rg-acfmzs372yg****"
}

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.SubUserUser not authorized to operate on the specified resource as your account is created by another user.The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.
403ForbiddenUser not authorized to operate on the specified resource.You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
404InvalidCustomerGatewayInstanceId.NotFoundThe specified customer gateway instance id does not exist.The specified customer gateway does not exist. Check whether the ID of the customer gateway is correct.

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

Change history

Change timeSummary of changesOperation
2023-10-19API Description Update. The Error code has changed. The response structure of the API has changedView Change Details