Creates an egress-only rule for an IPv6 address.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateIpv6EgressOnlyRule

The operation that you want to perform. Set the value to CreateIpv6EgressOnlyRule.

InstanceId String Yes ipv6-hp3nxjkfxn5pnhgl5****

The ID of the IPv6 address to which you want to apply the egress-only rule.

Ipv6GatewayId String Yes ipv6gw-hp3c2paq0ywauasza****

The ID of the IPv6 gateway.

RegionId String Yes cn-huhehaote

The ID of the region where the IPv6 gateway is deployed. You can call the DescribeRegions operation to query the most recent region list.

InstanceType String No IPv6Address

The type of instance to which you want to apply the egress-only rule. Set the value to:

Ipv6Address (default): an IPv6 address.

Name String No rulename

The name of the egress-only rule.

The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Description String No ruledescription

The description of the egress-only rule.

The description must be 2 to 256 characters in length. It cannot start with http:// or https://.

ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe637760

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The ID of each request is unique.

Response parameters

Parameter Type Example Description
Ipv6EgressRuleId String ipv6py-hp3w98rmlbqp01245****

The ID of the egress-only rule.

RequestId String 9DFEDBEE-E5AB-49E8-A2DC-CC114C67AF75

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateIpv6EgressOnlyRule
&InstanceId=ipv6-hp3nxjkfxn5pnhgl5****
&Ipv6GatewayId=ipv6gw-hp3c2paq0ywauasza****
&RegionId=cn-huhehaote
&<Common request parameters>

Sample success responses

XML format

<CreateIpv6EgressOnlyRuleResponse>
	  <RequestId>9DFEDBEE-E5AB-49E8-A2DC-CC114C67AF75</RequestId>
	  <Ipv6EgressRuleId>ipv6py-hp3w98rmlbqp01245****</Ipv6EgressRuleId>
</CreateIpv6EgressOnlyRuleResponse>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.