Updated on 2024-11-15 GMT+08:00

Querying a Specified Customer Gateway

Function

This API is used to query a customer gateway with a specified gateway ID.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/customer-gateways/{customer_gateway_id}

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

customer_gateway_id

String

Yes

Specifies a customer gateway ID.

Request

  • Request parameters

    None

  • Example request
    GET https://{Endpoint}/v5/{project_id}/customer-gateways/{customer_gateway_id}

Response

  • Response parameters

    Returned status code 200: successful query

    Table 2 Parameters in the response body

    Parameter

    Type

    Description

    customer_gateway

    ResponseCustomerGateway object

    Specifies the customer gateway object.

    request_id

    String

    Specifies a request ID.

    Table 3 ResponseCustomerGateway

    Parameter

    Type

    Description

    id

    String

    • Specifies the ID of a customer gateway.
    • The value is a UUID containing 36 characters.

    name

    String

    • Specifies the name of a customer gateway.
    • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), hyphens (-), and periods (.).

    id_type

    String

    • Specifies the identifier type of a customer gateway.
    • Value range:
      • ip
      • fqdn

    id_value

    String

    Specifies the identifier of a customer gateway.

    bgp_asn

    Long

    Specifies the BGP AS number of the customer gateway. This parameter is available only when id_type is set to ip.

    ca_certificate

    CaCertificate object

    Specifies the CA certificate information of the customer gateway. This parameter is available only when the customer gateway has a CA certificate bound.

    created_at

    String

    • Specifies the time when the customer gateway is created.
    • The UTC time format is yyyy-MM-ddTHH:mm:ssZ.

    updated_at

    String

    • Specifies the last update time.
    • The UTC time format is yyyy-MM-ddTHH:mm:ssZ.

    tags

    Array of VpnResourceTag objects

    Specifies a tag list.

    Table 4 CaCertificate

    Parameter

    Type

    Description

    id

    String

    Specifies a certificate ID.

    serial_number

    String

    Specifies the serial number of the certificate.

    signature_algorithm

    String

    Specifies the signature algorithm.

    issuer

    String

    Specifies the certificate issuer.

    subject

    String

    Specifies the certificate subject.

    expire_time

    String

    Specifies the time when the certificate expires.

    is_updatable

    boolean

    Indicates whether the certificate content can be updated.

    Table 5 VpnResourceTag

    Parameter

    Type

    Description

    key

    String

    • Specifies a tag key.
    • The value is a string of 1 to 128 characters that can contain digits, letters, Spanish characters, Portuguese characters, spaces, and special characters (_ . : = + - @).

    value

    String

    • Specifies a tag value.
    • The value is a string of 0 to 255 characters that can contain digits, letters, Spanish characters, Portuguese characters, spaces, and special characters (_ . : = + - @).
  • Example response
    {
        "customer_gateway": {
            "id": "03c0aa3d-demo-a8df-va86-9d82473765d4",
            "name": "cgw-ba08",
            "id_type": "ip",
            "id_value": "10.***.***.21",
            "bgp_asn": 65000,
            "ca_certificate": {
                "serial_number": "14257156674311863338",
                "signature_algorithm": "SM3WITHSM2",
                "issuer": "C=CN,O=a0002,CN=XXX",
                "subject": "C=CN,O=a0002,CN=XXX",
                "expire_time": "2024-05-22T07:34:22Z",
                "is_updatable": true
            },
            "created_at": "2021-12-21T16:49:28.108+08:00",
            "updated_at": "2021-12-21T16:49:28.108+08:00"
        },
        "request_id": "8111d315-5024-45c9-8ee3-5ef676edb0d1"
    }

Status Codes

For details, see Status Codes.