All Products
Search
Document Center

VPN Gateway:DescribeCustomerGateway

Last Updated:Mar 04, 2024

Queries details of a customer gateway.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:DescribeCustomerGatewayRead
  • CustomerGateway
    acs:vpc:{#regionId}:{#accountId}:customergateway/{#CustomerGatewayId}
    none
none

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 public 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****
Tagsobject []

The list of tags added to the customer gateway.

Keystring

The key of tag N.

TagKey
Valuestring

The value of tag N.

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 changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.