Creates a gateway endpoint.
Operation description
-
CreateVpcGatewayEndpoint is an asynchronous operation. After a request is sent, the system returns an EndpointId and runs the task in the background. You can call the ListVpcGatewayEndpoints operation to query the status of the task.
- If the gateway endpoint is in the Creating state, the gateway endpoint is being created.
- If the gateway endpoint is in the Created state, the gateway endpoint is created.
-
You cannot repeatedly call the CreateVpcGatewayEndpoint operation for the same endpoint service within the specified period of time.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
VpcId | string | Yes | The ID of the virtual private cloud (VPC) where you want to create the gateway endpoint. The VPC and gateway endpoint must be deployed 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. For more information about the syntax and structure of the access policy, see Policy syntax and structure. | { "Version" : "1", "Statement" : [ { "Effect" : "Allow", "Resource" : [ "*" ], "Action" : [ "*" ], "Principal" : [ "*" ] } ] } |
EndpointName | string | No | The name of the gateway endpoint. The name must be 1 to 128 characters in length. | test |
EndpointDescription | string | No | The description of the gateway endpoint. The description must be 1 to 255 characters in length. | test |
ClientToken | string | No | The client token that is used to ensure the 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 automatically uses the request ID as the client token. The request ID may be different for each request. | 5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
ResourceGroupId | string | No | The ID of the resource group to which the gateway endpoint belongs. | rg-acfmxazb4ph**** |
Tag | array<object> | No | The tags of the resource. | |
object | No | |||
Key | string | No | The key of tag N to add to the resource. 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 value of tag N to add to the resource. 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. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Response parameters
Examples
Sample success responses
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. | 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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-07-05 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-05-29 | The Error code has changed | View Change Details |
2023-03-23 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |