Panggil operasi CreateVpcGatewayEndpoint untuk membuat gateway endpoint.
Deskripsi operasi
- Operasi CreateVpcGatewayEndpoint adalah operasi asinkron. Setelah sistem mengembalikan EndpointId, gateway endpoint belum dibuat. Sistem menjalankan tugas pembuatan di latar belakang. Anda dapat memanggil operasi ListVpcGatewayEndpoints untuk menanyakan status gateway endpoint:
Jika gateway endpoint berada dalam status Creating, gateway endpoint sedang dibuat.
Jika gateway endpoint berada dalam status Created, gateway endpoint telah dibuat.
Operasi CreateVpcGatewayEndpoint tidak mengizinkan Anda untuk membuat gateway endpoint secara bersamaan untuk layanan endpoint yang sama.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| VpcId |
string |
Yes |
ID VPC tempat Anda ingin membuat gateway endpoint. VPC harus berada di region yang sama dengan gateway endpoint. |
vpc-bp1gsk7h12ew7oegk**** |
| ServiceName |
string |
Yes |
Nama layanan endpoint. |
com.aliyun.cn-hangzhou.oss |
| PolicyDocument |
string |
No |
Kebijakan akses untuk layanan cloud. Untuk informasi selengkapnya tentang sintaks dan struktur kebijakan akses, lihat Sintaks dan struktur kebijakan. Catatan
|
{ "Version" : "1", "Statement" : [ { "Effect" : "Allow", "Resource" : [ "*" ], "Action" : [ "*" ], "Principal" : [ "*" ] } ] } |
| EndpointName |
string |
No |
Nama gateway endpoint. Nama harus terdiri dari 1 hingga 128 karakter. |
test |
| EndpointDescription |
string |
No |
Deskripsi gateway endpoint. Deskripsi harus terdiri dari 1 hingga 255 karakter. |
test |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai tersebut, tetapi Anda harus memastikan bahwa nilainya unik di antara permintaan yang berbeda. ClientToken hanya mendukung karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId dari setiap permintaan API berbeda. |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| DryRun |
boolean |
No |
Menentukan apakah akan melakukan dry run. Nilai yang valid:
|
false |
| ResourceGroupId |
string |
No |
ID grup sumber daya tempat gateway endpoint berada. |
rg-acfmxazb4ph**** |
| Tag |
array<object> |
No |
Tag yang akan ditambahkan ke sumber daya. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Kunci tag dapat memiliki panjang hingga 128 karakter. Tidak boleh dimulai dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag. Anda dapat menentukan hingga 20 nilai tag. Nilai tag boleh berupa string kosong. Nilai tag dapat memiliki panjang hingga 128 karakter. Tidak boleh dimulai dengan |
FinanceJoshua |
| RegionId |
string |
Yes |
ID region dari gateway endpoint yang ingin Anda buat. Anda dapat memanggil operasi DescribeRegions untuk menanyakan daftar region terbaru. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
ID permintaan. |
||
| RequestId |
string |
ID permintaan. |
62CFC815-E08A-5CF4-92D1-54273EC9E406 |
| EndpointId |
string |
ID gateway endpoint. |
vpce-bp1w1dmdqjpwul0v3**** |
| ServiceName |
string |
Nama layanan endpoint. |
com.aliyun.cn-hangzhou.oss |
| EndpointName |
string |
Nama gateway endpoint. |
test |
| CreationTime |
string |
Waktu saat gateway endpoint dibuat. Waktu ditampilkan dalam UTC dengan format YYYY-MM-DDThh:mm:ssZ. |
2021-08-27T01:58:37Z |
| ResourceGroupId |
string |
ID grup sumber daya tempat gateway endpoint berada. |
rg-acfmxazb4ph**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "62CFC815-E08A-5CF4-92D1-54273EC9E406",
"EndpointId": "vpce-bp1w1dmdqjpwul0v3****",
"ServiceName": "com.aliyun.cn-hangzhou.oss",
"EndpointName": "test",
"CreationTime": "2021-08-27T01:58:37Z",
"ResourceGroupId": "rg-acfmxazb4ph****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationFailed.ConcurrentOperation | The operation is failed because of concurrent operation. | |
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. | |
| 400 | IllegalParam.PolicyDocument | The param of PolicyDocument is illegal. | |
| 400 | IllegalParam.GatewayEndpointName | The param of GatewayEndpointName is illegal. | |
| 400 | IllegalParam.GatewayEndpointDescription | The param of GatewayEndpointDescription is illegal. | |
| 400 | ResourceAlreadyExist.GatewayEndpoint | The specified resource gateway endpoint is already exist. | |
| 400 | ResourceNotFound.ServiceName | The specified resource service name is not found. | |
| 400 | ResourceNotFound.VpcId | The specified resource vpc is not found. | |
| 400 | Forbidden.OperateShareResource | The operation is failed because of shared vpc. | |
| 400 | IncorrectStatus.Vpc | The status of vpc [%s] is incorrect. | |
| 400 | IncorrectStatus.CenStatus | The status of vpc cenStatus [%s] is incorrect. | |
| 400 | OperationFailed.VpcIpv6Disabled | The operation is failed because of VpcIpv6Disabled. | |
| 400 | UnsupportedFeature.GatewayEndpoint | The feature of gatewayEndpoint is not supported for %s. | |
| 400 | SystemBusy | System is busy, please try again later. | |
| 400 | Forbbiden | User not authorized to operate on the specified resource. | |
| 400 | OperationDenied.PolicyDocument | The gatewayEndpoint does not support policy. | |
| 400 | MissingParam.PolicyDocument | The param of PolicyDocument is missing. | |
| 400 | OperationDenied.NotAuthorized | User not authorized to operate on the specified resource. | |
| 400 | InvalidPolicy.WrongFormat | Invalid input policy format. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.