All Products
Search
Document Center

Microservices Engine:GetGateway

Last Updated:Jun 10, 2026

Memperoleh informasi dasar tentang gerbang, seperti virtual private cloud (VPC) dan vSwitch tempat gerbang berada.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mse:GetGateway

get

*Gateway

acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

GatewayUniqueId

string

No

ID unik gerbang.

gw-685f661467b54f48b7b7a76605ce****

AcceptLanguage

string

No

Bahasa tanggapan. Nilai valid:

  • zh: Bahasa Mandarin

  • en: Bahasa Inggris.

zh

Elemen respons

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

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

HttpStatusCode

integer

The HTTP status code returned.

200

Message

string

The message returned.

The request is successfully processed.

Code

integer

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

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Data

object

The information about the gateway.

Id

integer

The ID of the gateway.

12

Name

string

The name of the gateway.

DEFAULT

GatewayUniqueId

string

The unique ID of the gateway.

gw-7ea3da97b96543e19f6c597cd4a9****

Region

string

The region ID.

cn-hangzhou

PrimaryUser

string

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

1231254

Status

integer

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

Vpc

string

The ID of the VPC.

vpc-bp1328cm01m6uel42b5zb

Vswitch

string

The ID of the vSwitch.

vsw-bp18zeqxx6mpuq843z4n5

SecurityGroup

string

The ID of the security group.

sg-bp11ufzqn6mmb8dtzz82

Spec

string

The specifications of the gateway.

MSE_GTW_16_32_200_c

Replica

integer

The number of gateway replicas.

2

GmtCreate

string

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

GmtModified

string

The time when the gateway was last modified.

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

XtraceDetails

object

The details of Tracing Analysis.

Sample

integer

The sampling rate of Tracing Analysis.

10

TraceOn

boolean

Indicates whether sampling by using Tracing Analysis is enabled.

true

Vswitch2

string

The ID of the secondary vSwitch.

vpc-bp1j6ivhav15ve7q54kq2

InstanceId

string

The ID of the instance.

mse-cn-st21ri2****

ChargeType

string

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

POSTPAY

EndDate

string

The time when the gateway expires.

2021-08-01 00:00:00

StatusDesc

string

The description of the status.

Restarting

LogConfigDetails

object

The log configuration.

LogEnabled

boolean

Indicates whether Log Service is activated.

true

ProjectName

string

The name of the project.

k8s-log-c173117256e934a96b7fefdf2ef8a8057

LogStoreName

string

The name of the Logstore.

mse_access_log

MseTag

string

The tag of the resource.

{"TagKey":"TagValue"}

ResourceGroupId

string

The ID of the resource group.

rg-acfm34x43l*****

TotalReplica

integer

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

3

Elastic

boolean

Indicates whether auto scale-out is enabled.

true

ElasticReplica

integer

The number of replicas that are automatically scaled out.

1

ElasticType

string

The type of auto scale-out. Valid value:

  • CronHPA: scale-out by time

CronHPA

ElasticPolicy

object

The auto scale-out policy.

MaxReplica

integer

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

5

ElasticType

string

The type of auto scale-out. Valid value:

  • CronHPA: scale-out by time

CronHPA

TimePolicyList

array<object>

The policy of scale-out by time.

object

DesiredReplica

integer

The number of expected replicas.

2

StartTime

string

The start time of auto scale-out.

16:00

EndTime

string

The end time of auto scale-out.

18:00

Contoh

Respons sukses

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"
        }
      ]
    }
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalRequest Invalid request:%s Invalid request: %s
400 InvalidParameter Parameter error:%s Request parameter error: %s
500 InternalError Console error. Try again later:%s Console error. Try again later: %s
403 NoPermission You are not authorized to perform this operation:%s You do not have the permission to use this interface:%s
404 NotFound Not found:%s The resource does not exist:%s

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.