Updating a Dedicated Gateway

Function

This API is used to update a dedicated gateway.

Debugging

You can use API Explorer to debug this API.

URI

PUT /v2/{project_id}/apigw/instances/{instance_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see "Appendix" > "Obtaining a Project ID" in this document.

instance_id

Yes

String

Gateway ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

description

No

String

Description about the gateway.

maintain_begin

No

String

Start time of the maintenance time window in the format "xx:00:00". The value of xx can be 02, 06, 10, 14, 18, or 22.

During the maintenance time period, the O&M personnel can perform maintenance operations on the gateway. During maintenance, services can still be used, but occasionally there may be temporary service interruptions. Scheduled maintenance occurs infrequently (typically once every several months).

maintain_end

No

String

End time of the maintenance time window in the format "xx:00:00". There is a 4-hour difference between the start time and end time.

During the maintenance time period, the O&M personnel can perform maintenance operations on the gateway. During maintenance, services can still be used, but occasionally there may be temporary service interruptions. Scheduled maintenance occurs infrequently (typically once every several months).

instance_name

No

String

Gateway name.

Minimum: 3

Maximum: 64

security_group_id

No

String

ID of the security group to which the gateway belongs.

You can obtain it in either of the following ways:

  • Method 1: Log in to the VPC console. Choose Access Control > Security Groups in the navigation pane. On the Security Groups page, click the target security group. Then view the security group ID on the displayed page.

  • Method 2: Call the corresponding VPC API. For details, see section "Querying Security Groups" in the VPC API Reference.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

Gateway ID.

project_id

String

ID of the tenant to which the gateway belongs.

instance_name

String

Gateway name.

status

String

Gateway status.

  • Creating: The gateway is being created.

  • CreateSuccess: The gateway is created successfully.

  • CreateFail: The gateway fails to be created.

  • Initing: The gateway is being initialized.

  • Registering: The gateway is being registered.

  • Running: The gateway is running.

  • InitingFailed: The gateway fails to be initialized.

  • RegisterFailed: The gateway fails to be registered.

  • Installing: The gateway is being installed.

  • InstallFailed: The gateway fails to be installed.

  • Updating: The gateway is being upgraded.

  • UpdateFailed: The gateway fails to be upgraded.

  • Rollbacking: The gateway is being rolled back.

  • RollbackSuccess: The gateway is rolled back successfully.

  • RollbackFailed: The gateway fails to be rolled back.

  • Deleting: The gateway is being deleted.

  • DeleteFailed: The gateway fails to be deleted.

  • Unregistering: The gateway is being deregistered.

  • UnRegisterFailed: The gateway fails to be deregistered.

  • CreateTimeout: Creation of the gateway times out.

  • InitTimeout: Initialization of the gateway times out.

  • RegisterTimeout: Registration of the gateway times out.

  • InstallTimeout: Installation of the gateway times out.

  • UpdateTimeout: Upgrading of the gateway times out.

  • RollbackTimeout: Rollback of the gateway times out.

  • DeleteTimeout: Deletion of the gateway times out.

  • UnregisterTimeout: Deregistration of the gateway times out.

  • Starting: The gateway is being started.

  • Freezing: The gateway is being frozen.

  • Frozen: The gateway is frozen.

  • Restarting: The gateway is being restarted.

  • RestartFail: The gateway fails to be restarted.

  • Unhealthy: The gateway is abnormal.

  • RestartTimeout: Restart of the gateway times out.

Enumeration values:

  • Creating

  • CreateSuccess

  • CreateFail

  • Initing

  • Registering

  • Running

  • InitingFailed

  • RegisterFailed

  • Installing

  • InstallFailed

  • Updating

  • UpdateFailed

  • Rollbacking

  • RollbackSuccess

  • RollbackFailed

  • Deleting

  • DeleteFailed

  • Unregistering

  • UnRegisterFailed

  • CreateTimeout

  • InitTimeout

  • RegisterTimeout

  • InstallTimeout

  • UpdateTimeout

  • RollbackTimeout

  • DeleteTimeout

  • UnregisterTimeout

  • Starting

  • Freezing

  • Frozen

  • Restarting

  • RestartFail

  • Unhealthy

  • RestartTimeout

instance_status

Integer

Gateway status ID.

  • 1: Creating

  • 2: Created

  • 3: Creation failed

  • 4: Initializing

  • 5: Registering

  • 6: Running

  • 7: Initialization failed

  • 8: Registration failed

  • 10: Installing

  • 11: Installation failed

  • 12: Upgrading

  • 13: Upgrade failed

  • 20: Rolling back

  • 21: Rolled back

  • 22: Rollback failed

  • 23: Deleting

  • 24: Deletion failed

  • 25: Deregistering

  • 26: Deregistration failed

  • 27: Creation timeout

  • 28: Initialization timeout

  • 29: Registration timeout

  • 30: Installation timeout

  • 31: Upgrade timeout

  • 32: Rollback timeout

  • 33: Deletion timeout

  • 34: Deregistration timeout

  • 35: Starting

  • 36: Freezing

  • 37: Frozen

  • 38: Restarting

  • 39: Restarting failed

  • 40: Abnormal

  • 41: Restarting timeout

Enumeration values:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 10

  • 11

  • 12

  • 13

  • 20

  • 21

  • 22

  • 23

  • 24

  • 25

  • 26

  • 27

  • 28

  • 29

  • 30

  • 31

  • 32

  • 33

  • 34

  • 35

  • 36

  • 37

  • 38

  • 39

  • 40

  • 41

type

String

Gateway type.

The default value is apig.

spec

String

Gateway edition.

  • BASIC

  • PROFESSIONAL

  • ENTERPRISE

  • PLATINUM

  • BASIC_IPV6

  • PROFESSIONAL_IPV6

  • ENTERPRISE_IPV6

  • PLATINUM_IPV6

Enumeration values:

  • BASIC

  • PROFESSIONAL

  • ENTERPRISE

  • PLATINUM

  • BASIC_IPV6

  • PROFESSIONAL_IPV6

  • ENTERPRISE_IPV6

  • PLATINUM_IPV6

create_time

Long

Time when the gateway is created. The time is in the Unix timestamp format.

enterprise_project_id

String

Enterprise project ID. This parameter is required if you are using an enterprise account.

eip_address

String

EIP bound to the gateway.

charging_mode

Integer

Billing mode of the gateway.

  • 0: Pay per use

  • 1: Yearly/Monthly

Enumeration values:

  • 0

  • 1

cbc_metadata

String

Yearly/Monthly subscription order ID.

description

String

Description about the gateway.

vpc_id

String

VPC ID.

You can obtain it in either of the following ways:

  • Method 1: Log in to the VPC console, and click the name of a VPC to view the VPC ID on the displayed details page.

  • Method 2: Call the corresponding VPC API. For details, see section "Querying VPCs" in the VPC API Reference.

subnet_id

String

Subnet network ID.

You can obtain it in either of the following ways:

  • Method 1: Log in to the VPC console and click the target subnet on the Subnets page. You can view the network ID on the displayed page.

  • Method 2: Call the corresponding VPC API. For details, see section "Querying Subnets" in the VPC API Reference.

security_group_id

String

ID of the security group to which the gateway belongs.

You can obtain it in either of the following ways:

  • Method 1: Log in to the VPC console. Choose Access Control > Security Groups in the navigation pane. On the Security Groups page, click the target security group. Then view the security group ID on the displayed page.

  • Method 2: Call the corresponding VPC API. For details, see section "Querying Security Groups" in the VPC API Reference.

maintain_begin

String

Start time of the maintenance time window in the format "xx:00:00". The value of xx can be 02, 06, 10, 14, 18, or 22.

During the maintenance time period, the O&M personnel can perform maintenance operations on the gateway. During maintenance, services can still be used, but occasionally there may be temporary service interruptions. Scheduled maintenance occurs infrequently (typically once every several months).

maintain_end

String

End time of the maintenance time window in the format "xx:00:00". There is a 4-hour difference between the start time and end time.

During the maintenance time period, the O&M personnel can perform maintenance operations on the gateway. During maintenance, services can still be used, but occasionally there may be temporary service interruptions. Scheduled maintenance occurs infrequently (typically once every several months).

ingress_ip

String

VPC ingress address.

user_id

String

ID of the account to which the gateway belongs.

nat_eip_ipv6_cidr

String

Public egress address (IPv6).

Currently, IPv6 addresses are supported only in certain regions.

eip_ipv6_address

String

EIP (IPv6).

Currently, IPv6 addresses are supported only in certain regions.

nat_eip_address

String

IP address for public outbound access.

bandwidth_size

Integer

Outbound access bandwidth.

available_zone_ids

String

AZ.

instance_version

String

Gateway version.

virsubnet_id

String

Subnet network ID.

This parameter is currently not supported.

roma_eip_address

String

ROMA EIP.

This parameter is currently not supported.

listeners

Object

Listener information.

This parameter is currently not supported.

supported_features

Array of strings

Supported features.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

{
  "description" : "test create instance",
  "instance_name" : "apig-demo"
}

Example Responses

Status code: 200

OK

{
  "available_zone_ids" : "[xx-xxx-7a, xx-xxx-7b]",
  "bandwidth_size" : 5,
  "description" : "test create instance",
  "eip_id" : "41f961ab-2bdd-4ca7-9b59-cfc4fcef10c9",
  "enterprise_project_id" : "0",
  "instance_name" : "apig-demo",
  "maintain_begin" : "22:00:00",
  "maintain_end" : "02:00:00",
  "security_group_id" : "36d0ec18-bd10-4da7-86f3-ad7a5ddc55d7",
  "spec_id" : "PROFESSIONAL",
  "subnet_id" : "a938121c-11c4-4c91-b983-bc9acd347bb5",
  "vpc_id" : "0957108c-257c-4ce0-9e93-527d279ce763"
}

Status code: 400

Bad Request

{
  "error_code" : "APIC.7211",
  "error_msg" : "Parameter value does not match the rules, parameter name[maintainBegin]"
}

Status code: 401

Unauthorized

{
  "error_code" : "APIC.7102",
  "error_msg" : "Incorrect token or token resolution failed"
}

Status code: 403

Forbidden

{
  "error_code" : "APIC.7106",
  "error_msg" : "No permissions to request for the method"
}

Status code: 404

Not Found

{
  "error_code" : "APIC.7302",
  "error_msg" : "Instance not found"
}

Status code: 500

Internal Server Error

{
  "error_code" : "APIC.9000",
  "error_msg" : "Failed to request internal service"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.