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 to which the specified IPv6 address belongs.

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 the instance to which you want to apply the egress-only rule. Set the value to:

Ipv6Address. This is the default value and specifies the IPv6 address type.

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, periods (.), underscores (_), and hyphens (-). It 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 and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with http:// or https://.

ClientToken String No 123456

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

The value of this parameter is generated by a client. The value must be unique among different requests and must be 1 to 64 ASCII characters in length.

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

https://vpc.aliyuncs.com/?Action=CreateIpv6EgressOnlyRule
&RegionId=cn-huhehaote
&InstanceId=ipv6-hp3nxjkfxn5pnhgl5****
&Ipv6GatewayId=ipv6gw-hp3c2paq0ywauasza****
&<Common request parameters>

Sample 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.