All Products
Search
Document Center

Microservices Engine:GetGateway

Last Updated:Aug 12, 2024

Obtains the basic information about a gateway, such as the virtual private cloud (VPC) and vSwitch to which the gateway belongs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
mse:GetGatewayget
  • Gateway
    acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GatewayUniqueIdstringYes

The unique ID of the gateway.

gw-685f661467b54f48b7b7a76605ce****
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

9C96CDF8-9E6C-5AB6-B83C-8F87A10117E6
HttpStatusCodeinteger

The HTTP status code returned.

200
Messagestring

The message returned.

The request is successfully processed.
Codeinteger

The status code returned. A value of 200 indicates that the request is successful.

200
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
Dataobject

The information about the gateway.

Idlong

The ID of the gateway.

12
Namestring

The name of the gateway.

DEFAULT
GatewayUniqueIdstring

The unique ID of the gateway.

gw-7ea3da97b96543e19f6c597cd4a9****
Regionstring

The region ID.

cn-hangzhou
PrimaryUserstring

The Alibaba Cloud account ID of the user who created the gateway.

1231254
Statusinteger

The status of the gateway. Valid values:

  • 0: The gateway is being created.
  • 1: The gateway fails to be created.
  • 2: The gateway is running.
  • 3: The gateway is changing.
  • 4: The gateway is scaling in.
  • 6: The gateway is scaling out.
  • 8: The gateway is being deleted.
  • 10: The gateway is restarting.
  • 11: The gateway is being rebuilt.
  • 12: The gateway is updating.
  • 13: The gateway fails to be updated.
0
Vpcstring

The ID of the VPC.

vpc-bp1328cm01m6uel42b5zb
Vswitchstring

The ID of the vSwitch.

vsw-bp18zeqxx6mpuq843z4n5
SecurityGroupstring

The ID of the security group.

sg-bp11ufzqn6mmb8dtzz82
Specstring

The specifications of the gateway.

MSE_GTW_16_32_200_c
Replicainteger

The number of gateway replicas.

2
GmtCreatestring

The time when the gateway was created. The time is displayed in GMT. The time is the local time of the region in which the gateway resides.

2022-01-07T10:07:57.000+0000
GmtModifiedstring

The time when the gateway was last modified.

2022-01-07T10:07:57.000+0000
XtraceDetailsobject

The details of Tracing Analysis.

Sampleinteger

The sampling rate of Tracing Analysis.

10
TraceOnboolean

Indicates whether sampling by using Tracing Analysis is enabled.

true
Vswitch2string

The ID of the secondary vSwitch.

vpc-bp1j6ivhav15ve7q54kq2
InstanceIdstring

The ID of the instance.

mse-cn-st21ri2****
ChargeTypestring

The billing method, such as subscription or pay-as-you-go.

POSTPAY
EndDatestring

The time when the gateway expires.

2021-08-01 00:00:00
StatusDescstring

The description of the status.

Restarting
LogConfigDetailsobject

The log configuration.

LogEnabledboolean

Indicates whether Log Service is activated.

true
ProjectNamestring

The name of the project.

k8s-log-c173117256e934a96b7fefdf2ef8a8057
LogStoreNamestring

The name of the Logstore.

mse_access_log
MseTagstring

The tag of the resource.

{"TagKey":"TagValue"}
ResourceGroupIdstring

The ID of the resource group.

rg-acfm34x43l*****
TotalReplicainteger

The total number of replicas, including the number of replicas that are automatically scaled out.

3
Elasticboolean

Indicates whether auto scale-out is enabled.

true
ElasticReplicainteger

The number of replicas that are automatically scaled out.

1
ElasticTypestring

The type of auto scale-out. Valid value:

  • CronHPA: scale-out by time
CronHPA
ElasticPolicyobject

The auto scale-out policy.

MaxReplicainteger

The maximum number of instances that are automatically scaled out. This parameter is used for horizontal scale-out.

5
ElasticTypestring

The type of auto scale-out. Valid value:

  • CronHPA: scale-out by time
CronHPA
TimePolicyListarray<object>

The policy of scale-out by time.

object
DesiredReplicainteger

The number of expected replicas.

2
StartTimestring

The start time of auto scale-out.

16:00
EndTimestring

The end time of auto scale-out.

18:00

Examples

Sample success responses

JSONformat

{
  "RequestId": "9C96CDF8-9E6C-5AB6-B83C-8F87A10117E6",
  "HttpStatusCode": 200,
  "Message": "The request is successfully processed.\n",
  "Code": 200,
  "Success": true,
  "Data": {
    "Id": 12,
    "Name": "DEFAULT",
    "GatewayUniqueId": "gw-7ea3da97b96543e19f6c597cd4a9****",
    "Region": "cn-hangzhou",
    "PrimaryUser": "1231254",
    "Status": 0,
    "Vpc": "vpc-bp1328cm01m6uel42b5zb",
    "Vswitch": "vsw-bp18zeqxx6mpuq843z4n5",
    "SecurityGroup": "sg-bp11ufzqn6mmb8dtzz82",
    "Spec": "MSE_GTW_16_32_200_c",
    "Replica": 2,
    "GmtCreate": "2022-01-07T10:07:57.000+0000",
    "GmtModified": "2022-01-07T10:07:57.000+0000",
    "XtraceDetails": {
      "Sample": 10,
      "TraceOn": true
    },
    "Vswitch2": "vpc-bp1j6ivhav15ve7q54kq2",
    "InstanceId": "mse-cn-st21ri2****",
    "ChargeType": "POSTPAY",
    "EndDate": "2021-08-01 00:00:00",
    "StatusDesc": "Restarting\n",
    "LogConfigDetails": {
      "LogEnabled": true,
      "ProjectName": "k8s-log-c173117256e934a96b7fefdf2ef8a8057",
      "LogStoreName": "mse_access_log"
    },
    "MseTag": "{\"TagKey\":\"TagValue\"}",
    "ResourceGroupId": "rg-acfm34x43l*****",
    "TotalReplica": 3,
    "Elastic": true,
    "ElasticReplica": 1,
    "ElasticType": "CronHPA",
    "ElasticPolicy": {
      "MaxReplica": 5,
      "ElasticType": "CronHPA",
      "TimePolicyList": [
        {
          "DesiredReplica": 2,
          "StartTime": "16:00",
          "EndTime": "18:00"
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalRequestInvalid request:%sInvalid request: %s
400InvalidParameterParameter error:%sRequest parameter error: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404NotFoundNot found:%sThe resource does not exist:%s
500InternalErrorConsole error. Try again later:%sConsole error. Try again later: %s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-09The response structure of the API has changedView Change Details