Querying Dedicated Gateways
Function
This API is used to query dedicated gateways.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/apigw/instances
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Long |
Offset from which the query starts. If the value is less than 0, it is automatically converted to 0. Default: 0 |
limit |
No |
Integer |
Number of items displayed on each page. A value less than or equal to 0 will be automatically converted to 20, and a value greater than 500 will be automatically converted to 500. Minimum: 1 Maximum: 500 Default: 20 |
instance_id |
No |
String |
Gateway ID. |
instance_name |
No |
String |
Gateway name. |
status |
No |
String |
Gateway status.
|
Request 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
Parameter |
Type |
Description |
---|---|---|
size |
Integer |
Length of the returned resource list. |
total |
Long |
Number of resources that match the query conditions. |
instances |
Array of RespInstanceBase objects |
Gateway list. |
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:
|
instance_status |
Integer |
Instance status ID:
|
type |
String |
Gateway type. The default value is apig. |
spec |
String |
Gateway edition.
|
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.
|
cbc_metadata |
String |
This parameter is not used currently. |
loadbalancer_provider |
String |
Type of the load balancer used by the gateway.
Default: lvs |
cbc_operation_locks |
Array of CbcOperationLock objects |
Cloud operations restriction lock |
Parameter |
Type |
Description |
---|---|---|
lock_scene |
String |
Restriction scenarios:
|
lock_source_id |
String |
ID of the object that initiates the restriction |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
None
Example Responses
Status code: 200
OK
{ "total" : 2, "size" : 2, "instances" : [ { "cbc_metadata" : "CS2006301043A28NF:00301-734023-0--0", "charging_mode" : 1, "create_time" : 1585302825070, "eip_address" : "xxx.xxx.xxx.xxx", "enterprise_project_id" : "0", "id" : "eddc4d25480b4cd6b512f270a1b8b341", "instance_name" : "apig-Enterprise_Project_Pay-per-Use", "instance_status" : 6, "project_id" : "73d69ae0cfcf460190522d06b60f05ad", "spec" : "PROFESSIONAL", "status" : "Running", "type" : "apig" }, { "charging_mode" : 0, "create_time" : 1594370987422, "eip_address" : "xxx.xxx.xxx.xxx", "enterprise_project_id" : "0", "id" : "2e2d613c64094a4a94ad38e7ca30adee", "instance_name" : "apig-autotest-apitest-nodelete", "instance_status" : 6, "project_id" : "73d69ae0cfcf460190522d06b60f05ad", "spec" : "PROFESSIONAL", "status" : "Running", "type" : "apig", "cbc_operation_locks" : [ { "lock_scene" : "TO_PERIOD_LOCK", "lock_source_id" : "CxxxxxxxxxxxM" } ] } ] }
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: 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 |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot