CreateIpv6EgressOnlyRule - 为IPv6地址添加仅主动出规则

更新时间:
复制 MD 格式

您可以通过创建仅主动出规则,使开通了IPv6网段的VPC中的ECS可以主动访问客户端的IPv6终端,但不允许客户端的IPv6终端通过互联网访问VPC网络中的ECS实例,调用CreateIpv6EgressOnlyRuleIPv6地址添加仅主动出规则。

接口说明

  • CreateIpv6EgressOnlyRule 接口属于异步接口,即系统返回一个实例 ID,但该 IPv6 地址的仅主动出规则尚未创建成功,系统后台的创建任务仍在进行。您可以调用 DescribeIpv6EgressOnlyRules 查询 IPv6 地址的仅主动出规则的创建状态:
    • 当 IPv6 地址的仅主动出规则处于 Creating 状态时,表示 IPv6 地址仅主动出规则正在创建中。

    • 当 IPv6 地址的仅主动出规则处于 Created 状态时,表示 IPv6 地址仅主动出规则创建完成。

  • CreateIpv6EgressOnlyRule 接口不支持为同一个 IPv6 地址并发添加仅主动出规则。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

vpc:CreateIpv6EgressOnlyRule

create

*Ipv6EgressRule

acs:vpc:{#regionId}:{#accountId}:ipv6gateway/{#Ipv6GatewayId}

请求参数

名称

类型

必填

描述

示例值

RegionId

string

IPv6 网关的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-huhehaote

Ipv6GatewayId

string

IPv6 网关实例 ID。

ipv6gw-hp3c2paq0ywauasza****

InstanceId

string

需要设置仅主动出规则的 IPv6 地址 ID。

ipv6-hp3nxjkfxn5pnhgl5****

InstanceType

string

需要设置仅主动出规则的实例类型。

仅取值:Ipv6Address(默认值),表示为 IPv6 地址类型。

Ipv6Address

Name

string

仅主动出规则的名称。

长度为 0-128 个字符,不能以http://https://开头。

rulename

Description

string

仅主动出规则的描述。

长度为 0-256 个字符,不能以http://https://开头。

ruledescription

ClientToken

string

客户端 Token,用于保证请求的幂等性。

由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符。

说明

若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。

0c593ea1-3bea-11e9-b96b-88e9fe637760

DryRun

boolean

参数预检,不实际运行

返回参数

名称

类型

描述

示例值

object

Ipv6EgressRuleId

string

仅主动出规则的 ID。

ipv6py-hp3w98rmlbqp01245****

RequestId

string

请求 ID。

9DFEDBEE-E5AB-49E8-A2DC-CC114C67AF75

示例

正常返回示例

JSON格式

{
  "Ipv6EgressRuleId": "ipv6py-hp3w98rmlbqp01245****",
  "RequestId": "9DFEDBEE-E5AB-49E8-A2DC-CC114C67AF75"
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidIpv6Gateway.NotFound The specified IPv6 gateway was not found. 指定的IPv6网关未找到。
400 IllegalParam.Name The param of Name [%s] is illegal. 参数 Name 不合法,请根据请求参数规定重新输入。
400 IllegalParam.Description The parameter of Description is illegal. 参数Description非法。
400 IllegalParam.InstanceType The parameter of InstanceType is illegal. 参数InstanceType非法。
400 OperationFailed.FinancialLocked The operation is forbidden because of financialLocked. 操作失败,已欠费。
400 OperationUnsupported.EgressRuleVSwitch The specified VSwitch is not supported to create egress-only rule. 指定地域尚未支持交换粒度的仅主动出规则。
400 InvalidIpv6Instance.NotFound The specified resource of InvalidIpv6Instance is not found. 未找到指定的Ipv6Instance资源。
400 OperationFailed.NoInternetBandwidth Operation failed because the ipv6 instance has no internet bandwidth. 该操作不受支持,因为IPv6实例没有公网带宽。
400 OperationFailed.Ipv6EgressRuleExisted An egress-only rule already exists for the IPv6 address. ipv6实例已存在仅主动出规则。
400 OperationFailed.InternetBandwidthUnstable The operation is forbidden because of InternetBandwidthUnstable. 由于带宽实例处于非稳态,该操作被禁止。
400 IncorrectStatus.Ipv6InternetBandwidth The status of the IPv6InternetBandwidth is incorrect. IPv6公网带宽当前状态不支持创建IPv6仅出规则。
400 OperationUnsupported.EgressRuleInDefaultSpec Egress-only rule is not supported. Please update the spec of IPv6 Gateway to Medium or Large. 免费版IPv6网关不支持创建仅主动出规则,请将IPv6网关升级为企业版或企业增强版。
400 QuotaExceeded.Ipv6EgressRules %s quota exceeded. Ipv6EgressRules数量配额超限
400 Mismatch.Ipv6AddressAndIpv6Gateway The %s and %s are mismatched. 指定的Ipv6AddressIpv6Gateway不在同一VPC
400 OperationUnsupported.EgressOnlyRuleOnFreeIpv6Instance Creating ipv6 egress only rule on ipv6 instance that not associated with any resource is unsupported. 不支持在未绑定资源的IPv6实例上创建仅主动出规则
400 MissingParam.InstanceId The parameter InstanceId is mandatory. 物理专线实例ID必须填写。
400 OperationUnsupported.ULA %s is unsupported. 当前操作不支持ULA地址
400 OperationUnsupported.PrivateGUA This operation does not support private GUA addresses. 当前操作不支持私网GUA地址。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情