调用CreateVpcGatewayEndpoint接口创建网关终端节点。
接口说明
- CreateVpcGatewayEndpoint 接口属于异步接口,即系统返回一个 EndpointId,但该网关终端节点尚未创建成功,系统后台的创建任务仍在进行。您可以调用 ListVpcGatewayEndpoints 查询网关终端节点的创建状态:
当网关终端节点处于 Creating 状态时,表示网关终端节点正在创建中。
当网关终端节点处于 Created 状态时,表示网关终端节点创建成功。
CreateVpcGatewayEndpoint 接口不支持针对同一个终端节点服务并发创建网关终端节点。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| VpcId |
string |
是 |
要创建网关终端节点的 VPC ID。 该 VPC 必须与网关终端节点在同一个地域。 |
vpc-bp1gsk7h12ew7oegk**** |
| ServiceName |
string |
是 |
终端节点服务名称。 |
com.aliyun.cn-hangzhou.oss |
| PolicyDocument |
string |
否 |
云服务的访问策略。 关于访问策略的语法和结构,请参见权限策略语法和结构。 说明
|
{ "Version" : "1", "Statement" : [ { "Effect" : "Allow", "Resource" : [ "*" ], "Action" : [ "*" ], "Principal" : [ "*" ] } ] } |
| EndpointName |
string |
否 |
网关终端节点的名称。 名称的长度在 1~128 个字符之间。 |
test |
| EndpointDescription |
string |
否 |
网关终端节点的描述信息。 描述信息的长度在 1~255 个字符之间。 |
test |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| DryRun |
boolean |
否 |
是否只预检此次请求,取值:
|
false |
| ResourceGroupId |
string |
否 |
网关终端节点所属的资源组 ID。 |
rg-acfmxazb4ph**** |
| Tag |
array<object> |
否 |
资源的标签。 |
|
|
object |
否 |
标签。 |
||
| Key |
string |
否 |
资源的标签键。最多支持输入 20 个标签键。如需传入该值,则不能输入空字符串。 一个标签键最多支持 128 个字符,不能以 |
FinanceDept |
| Value |
string |
否 |
资源的标签值。最多支持输入 20 个标签值。如需传入该值,可以输入空字符串。 最多支持 128 个字符,不能以 |
FinanceJoshua |
| RegionId |
string |
是 |
要创建的网关终端节点的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
请求 ID。 |
||
| RequestId |
string |
请求 ID。 |
62CFC815-E08A-5CF4-92D1-54273EC9E406 |
| EndpointId |
string |
网关终端节点实例 ID。 |
vpce-bp1w1dmdqjpwul0v3**** |
| ServiceName |
string |
终端节点服务名称。 |
com.aliyun.cn-hangzhou.oss |
| EndpointName |
string |
网关终端节点的名称。 |
test |
| CreationTime |
string |
网关终端节点的创建时间。按照 ISO8601 标准表示,并需要使用 UTC 时间。格式为:YYYY-MM-DDThh:mm:ssZ。 |
2021-08-27T01:58:37Z |
| ResourceGroupId |
string |
网关终端节点所属的资源组 ID。 |
rg-acfmxazb4ph**** |
示例
正常返回示例
JSON格式
{
"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****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 输入策略信息格式错误。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。