Creates a gateway endpoint in a specified VPC.
Operation description
-
CreateVpcGatewayEndpoint is an asynchronous operation. After you send a request, the system returns an EndpointId and runs the task in the background. Call ListVpcGatewayEndpoints to check the task status:
-
Creating: The gateway endpoint is being created.
-
Created: The gateway endpoint is created.
-
-
Do not call CreateVpcGatewayEndpoint repeatedly for the same endpoint service within the specified period of time.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VpcId |
string |
Yes |
The VPC ID. The VPC and gateway endpoint must be in the same region. |
vpc-bp1gsk7h12ew7oegk**** |
| ServiceName |
string |
Yes |
The name of the endpoint service. |
com.aliyun.cn-hangzhou.oss |
| PolicyDocument |
string |
No |
The access policy for the cloud service. The access policy must follow the Policy syntax and structure. |
{ "Version" : "1", "Statement" : [ { "Effect" : "Allow", "Resource" : [ "*" ], "Action" : [ "*" ], "Principal" : [ "*" ] } ] } |
| EndpointName |
string |
No |
The name of the gateway endpoint, 1 to 128 characters. |
test |
| EndpointDescription |
string |
No |
The description of the gateway endpoint, 1 to 255 characters. |
test |
| ClientToken |
string |
No |
The client token that ensures idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system uses the request ID as the client token. The request ID may differ for each request. |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| ResourceGroupId |
string |
No |
The resource group ID of the gateway endpoint. |
rg-acfmxazb4ph**** |
| Tag |
array<object> |
No |
The tags of the resource. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length. It cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain |
FinanceJoshua |
| RegionId |
string |
Yes |
The region ID of the gateway endpoint. Call DescribeRegions to query available regions. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
62CFC815-E08A-5CF4-92D1-54273EC9E406 |
| EndpointId |
string |
The ID of the gateway endpoint. |
vpce-bp1w1dmdqjpwul0v3**** |
| ServiceName |
string |
The name of the endpoint service. |
com.aliyun.cn-hangzhou.oss |
| EndpointName |
string |
The name of the gateway endpoint. |
test |
| CreationTime |
string |
The time when the gateway endpoint was created, in the YYYY-MM-DDThh:mm:ssZ format (UTC). |
2021-08-27T01:58:37Z |
| ResourceGroupId |
string |
The resource group ID of the gateway endpoint. |
rg-acfmxazb4ph**** |
Examples
Success response
JSON format
{
"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****"
}
Error codes
|
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. | The format of the policy information is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.