Updated on 2025-08-18 GMT+08:00

Updating a Customer Gateway

Function

This API is used to update a customer gateway with a specified gateway ID. Only the gateway name can be updated. To modify other parameters, you need to create another customer gateway.

Calling Method

For details, see Calling APIs.

URI

PUT /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
    Table 2 Request parameters

    Parameter

    Type

    Mandatory

    Description

    customer_gateway

    UpdateCgwRequestBodyContent object

    Yes

    Specifies the customer gateway object.

    Table 3 UpdateCgwRequestBodyContent

    Parameter

    Type

    Mandatory

    Description

    name

    String

    No

    • Specifies a gateway name.
    • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), hyphens (-), and periods (.).
  • Example request
    PUT https://{Endpoint}/v5/{project_id}/customer-gateways/{customer_gateway_id}
    
    {
        "customer_gateway": {
            "name": "cgw-f846",
        }
    }

Response

  • Response parameters

    Returned status code 200: successful update

    Table 4 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 5 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 (_), and hyphens (-).

    id_type

    String

    • Specifies the identifier type of a customer gateway.
    • The value is ip.

    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.

    created_at

    String

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

    updated_at

    String

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

    tags

    Array of VpnResourceTag objects

    Specifies a tag list.

    Table 6 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-f846",
            "id_type": "ip",
            "id_value": "10.***.***.21",
            "bgp_asn": 65533,
            "created_at": "2021-12-21T16:49:28.108Z",
            "updated_at": "2021-12-21T16:49:28.108Z"
        },
        "request_id": "96718f4a-f57a-4e1f-8d05-7d5e903c8d90"
    }

Status Codes

For details, see Status Codes.