Creates an egress-only rule for an IPv6 address.

Usage notes

  • The CreateIpv6EgressOnlyRule operation is asynchronous. After you send the request, the system returns a request ID. However, the operation is still being performed in the system background. You can call the DescribeIpv6EgressOnlyRules operation to query the status of an egress-only rule.
    • If the egress-only rule is in the Creating state, the egress-only rule is being created.
    • If the egress-only rule is in the Created state, the egress-only rule is created.
  • You cannot repeatedly call the CreateIpv6EgressOnlyRule operation to add egress-only rules for an IPv6 address within the specified period of time.

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
RegionId String Yes cn-huhehaote

The region ID of the IPv6 gateway.

You can call the DescribeRegions operation to query the most recent region list.

Ipv6GatewayId String Yes ipv6gw-hp3c2paq0ywauasza****

The ID of the IPv6 gateway.

InstanceId String Yes ipv6-hp3nxjkfxn5pnhgl5****

The ID of the IPv6 address for which you want to create an egress-only rule.

InstanceType String No Ipv6Address

The type of the instance for which you want to create an egress-only rule.

Set the value to Ipv6Address (default). This value 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, 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 and 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 make sure that the value 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 value of RequestId for each API request may be different.
Action String Yes CreateIpv6EgressOnlyRule

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

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

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HttpCode Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.

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