Updated on 2024-10-09 GMT+08:00

Querying Dedicated Gateway Details

Function

This API is used to query the details of a dedicated gateway.

Calling Method

For details, see Calling APIs.

URI

GET /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 it, see Obtaining a Project ID.

instance_id

Yes

String

Gateway ID, which can be obtained from the gateway information on the APIG console.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It 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 a token.

Response Parameters

Status code: 200

Table 3 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

Instance status:

  • Creating: The instance is being created.
  • CreateSuccess: The instance is created successfully.
  • CreateFail: The instance fails to be created.
  • Initing: The instance is being initialized.
  • Registering: The instance is being registered.
  • Running: The instance is running.
  • InitingFailed: The instance fails to be initialized.
  • RegisterFailed: The instance fails to be registered.
  • Installing: The instance is being installed.
  • InstallFailed: The instance fails to be installed.
  • Updating: The instance is being upgraded.
  • UpdateFailed: The instance fails to be upgraded.
  • Rollbacking: The instance is being rolled back.
  • RollbackSuccess: The instance is rolled back successfully.
  • RollbackFailed: The instance fails to be rolled back.
  • Deleting: The instance is being deleted.
  • DeleteFailed: The instance fails to be deleted.
  • Unregistering: The instance is being deregistered.
  • UnRegisterFailed: The instance fails to be deregistered.
  • CreateTimeout: Creation of the instance times out.
  • InitTimeout: Initialization of the instance times out.
  • RegisterTimeout: Registration of the instance times out.
  • InstallTimeout: Installation of the instance times out.
  • UpdateTimeout: Upgrading of the instance times out.
  • RollbackTimeout: Rollback of the instance times out.
  • DeleteTimeout: Deletion of the instance times out.
  • UnregisterTimeout: Deregistration of the instance times out.
  • Starting: The instance is being started.
  • Freezing: The instance is being frozen.
  • Frozen: The instance is frozen.
  • Restarting: The instance is being restarted.
  • RestartFail: The instance fails to be restarted.
  • Unhealthy: The instance is abnormal.
  • RestartTimeout: Restart of the instance times out.
  • Resizing: The instance specification is changing.
  • ResizeFailed: The instance specification fails to be changed.
  • ResizeTimeout: The instance specification change 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
  • Resizing
  • ResizeFailed
  • ResizeTimeout

instance_status

Integer

Instance status ID:

  • 1: Creating
  • 2: Created successfully
  • 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 timed out
  • 28: Initialization timed out
  • 29: Registration timed out
  • 30: Installation timed out
  • 31: Upgrade timed out
  • 32: Rollback timed out
  • 33: Deletion timed out
  • 34: Deregistration timed out
  • 35: Starting
  • 36: Freezing
  • 37: Frozen
  • 38: Restarting
  • 39: Restart failed
  • 40: Abnormal
  • 41: Restart timed out
  • 42: Changing specification
  • 43: Specification change failed
  • 44: Specification change timed out

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
  • 42
  • 43
  • 44

type

String

Gateway type.

The default value is apig.

spec

String

Gateway edition.

  • BASIC
  • PROFESSIONAL
  • ENTERPRISE
  • PLATINUM

Enumeration values:

  • BASIC
  • PROFESSIONAL
  • ENTERPRISE
  • PLATINUM

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 for an enterprise account.

eip_address

String

EIP bound to the gateway.

charging_mode

Integer

Billing mode of the gateway.

  • 0: pay-per-use
  • 1: This parameter is not used currently.

Enumeration values:

  • 0
  • 1

cbc_metadata

String

This parameter is not used currently.

loadbalancer_provider

String

Type of the load balancer used by the gateway.

  • LVS
  • ELB (available only in certain regions)

Default: lvs

Enumeration values:

  • lvs
  • elb

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. It must be 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. It must be 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.

ingress_ip_v6

String

VPC access address (IPv6), This parameter is not used currently.

user_id

String

ID of the account to which the gateway belongs.

nat_eip_ipv6_cidr

String

Public egress address (IPv6), This parameter is not used currently.

eip_ipv6_address

String

EIP (IPv6), This parameter is not used currently.

nat_eip_address

String

IP address for public outbound access.

bandwidth_size

Integer

Outbound access bandwidth.

bandwidth_charging_mode

String

Billing mode of the public outbound access bandwidth.

available_zone_ids

String

AZ.

instance_version

String

Gateway version.

virsubnet_id

String

Subnet network ID.

Currently, this parameter is not supported.

roma_eip_address

String

ROMA EIP.

Currently, this parameter is not supported.

listeners

Object

Listener information.

Currently, this parameter is not supported.

supported_features

Array of strings

Supported features.

endpoint_service

EndpointService object

VPC endpoint service details.

This parameter will be deprecated. Use endpoint_services instead.

endpoint_services

Array of EndpointService objects

VPC endpoint services.

node_ips

NodeIps object

VPC endpoint ID.

node_ipv6_ips

NodeIps object

IPv6 address of the service node, This parameter is not used currently.

public_ipv6_ips

Array of strings

IPV6 address for public outbound access, This parameter is not used currently.

publicips

Array of IpDetails objects

Public inbound access addresses.

privateips

Array of IpDetails objects

Private inbound access addresses.

unreliable_ips

Array of strings

List of unreliable gateway inbound access IP addresses, to which the subdomain name of the group is not CNAMEd. The DEFAULT group cannot be accessed directly using the IP address in this list.

enable_fullstack_ipv6

Boolean

Whether the gateway supports full-format IPv6, This parameter is not used currently.

  • true: The gateway supports IPv6 for both inbound and outbound access.
  • false: Not supported. The gateway supports IPv6 only for inbound access.

is_releasable

Boolean

Whether the gateway can be released.

  • true: The gateway can be released.
  • false: The gateway cannot be released.

ingress_bandwidth_charging_mode

String

Billing mode of the public inbound access bandwidth.

Table 4 EndpointService

Parameter

Type

Description

service_name

String

VPC endpoint service name.

created_at

String

Creation time.

Table 5 NodeIps

Parameter

Type

Description

livedata

Array of strings

LiveData node IP addresses.

shubao

Array of strings

Shubao node IP addresses.

Table 6 IpDetails

Parameter

Type

Description

ip_address

String

IP address.

ipv6_address

String

IPv6 address, This parameter is not used currently.

bandwidth_size

Integer

Bandwidth.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

None

Example Responses

Status code: 200

OK

{
  "id" : "8dfxxxxxxxxxxxxxxxxxxxxxxxxxx00p",
  "spec" : "BASIC",
  "project_id" : "78xxxxxxxxxxxxxxxxxxxxxxxxxxxxoi",
  "instance_name" : "apig-demo",
  "status" : "Running",
  "instance_status" : 6,
  "eip_address" : null,
  "type" : null,
  "create_time" : 1635890506328,
  "charging_mode" : 0,
  "enterprise_project_id" : "0",
  "loadbalancer_provider" : "elb",
  "description" : "test create instance",
  "instance_version" : "acc6d368a3cb4d47840380bf62b0ab32",
  "available_zone_ids" : "[xx-xxx-7a, xx-xxx-7b]",
  "user_id" : "e966ff7227ef4df49df7d57aaf00f8ed",
  "vpc_id" : "0402ea19-5457-4032-9d1b-eb48b98f6c66",
  "subnet_id" : "a3bd29e4-d5bc-414c-a79a-1f35ee4ead88",
  "virsubnet_id" : "a3bd29e4-d5bc-414c-a79a-1f35ee4ead88",
  "security_group_id" : "4b95a790-5cfc-463d-8de5-42199e55371c",
  "maintain_begin" : "22:00:00",
  "maintain_end" : "02:00:00",
  "ingress_ip" : "192.168.0.152",
  "ingress_ip_v6" : null,
  "nat_eip_address" : "xxx.xxx.xxx.xxx",
  "roma_eip_address" : null,
  "bandwidth_size" : 5,
  "bandwidth_charging_mode" : "traffic",
  "nat_eip_ipv6_cidr" : null,
  "eip_ipv6_address" : null,
  "supported_features" : [ "lts", "gateway_responses", "ratelimit", "request_body_size", "backend_timeout", "app_token", "app_basic", "app_secret", "multi_auth", "route", "sign_basic", "app_route", "backend_client_certificate", "ssl_ciphers", "cors", "app_quota", "app_acl", "real_ip_from_xff", "set_resp_headers", "vpc_backup", "throttle_strategy", "watch_instance", "sign_aes", "mock_status_code_and_header", "backend_retry_count", "custom_log", "real_ip_header_getter", "policy_sys_param", "vpc_name_modifiable", "breaker", "default_group_host_trustlist" ],
  "node_ips" : {
    "livedata" : [ ],
    "shubao" : [ "192.168.0.123", "192.168.0.114" ]
  },
  "endpoint_service" : null,
  "endpoint_services" : [ {
    "service_name" : "xx-xxx-7a.apig.20bc4a91-1542-43s2-a278-b1e49c0hh6f9",
    "created_at" : "2021-8-03 06:04:43"
  } ],
  "publicips" : [ {
    "ip_address" : "xxx.xxx.xxx.xxx",
    "ipv6_address" : "xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:2b8",
    "bandwidth_size" : 5
  } ],
  "privateips" : [ {
    "ip_address" : "xxx.xxx.xxx.xxx",
    "ipv6_address" : "xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:2b8",
    "bandwidth_size" : 5
  } ],
  "ingress_bandwidth_charging_mode" : "traffic",
  "cbc_operation_locks" : [ {
    "lock_scene" : "TO_PERIOD_LOCK",
    "lock_source_id" : "CxxxxxxxxxxxM"
  } ],
  "public_ipv6_ips" : [ "xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:2b83", "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:6fee" ],
  "node_ipv6_ips" : {
    "livedata" : [ ],
    "shubao" : [ "xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:2b81", "xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:2b84" ]
  },
  "enable_fullstack_ipv6" : true,
  "unreliable_ips" : [ "192.xx.xxx.xxx" ]
}

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

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.