ModifySubnetStackType

1. API Description

This API (ModifySubnetStackType) is used to modify the IP stack type of subnet under a global VPC.

circle-info

Note

You can only change the IP stack type of subnet from IPv4 to IPv4_IPv6.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

subnetId

Yes

String

Subnet ID.

ipv6Type

Yes

Subnet IPv6 type.

The optional values are as follows: Public , Private

stackType

No

IP stack type of subnet.

The optional values are as follows: IPv4_IPv6

Default value: IPv4_IPv6

ipv6CidrBlockId

No

String

ID of the public IPv6 CIDR block.

This field can only be specified when ipv6Type is Public.

If not specified, it will be allocated from the system's default IP pool.

ipv6MaskLength

No

Integer

The size of the IPv6 CIDR prefix assigned to the instance.

This parameter must be used together with the ipv6CidrBlockId parameter.

The default value is 96 if not explicitly provided.

The minimum value must be greater than or equal to the prefix of the specified ipv6CidrBlockId, and the maximum value cannot exceed 96.

Value range: [-, 96]

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request.

RequestId is required for locating a problem.

ipv6CidrBlock

String

IPv6 CIDR block of subnet.

4. Code Example

Modify the IP stack type of subnet.

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

HTTP Status Code
Error Code
Description

400

INVALID_CIDR_BLOCK_STATUS

The CIDR block state is invalid.

404

INVALID_CIDR_IPV6_NOT_FOUND

IPv6 CIDR block does not exist

400

INVALID_CIDR_REGION_MISMATCH

The subnet region does not match the IPv6 CIDR block region.

400

INVALID_MAST_LENGTH

The IPv6 address mask length must be greater than the subnet IPv6 prefix length.

404

INVALID_SUBNET_NOT_FOUND

Subnet does not exist.

404

INVALID_VPC_NOT_FOUND

The global VPC does not exist.

404

INVALID_ZONE_NOT_FOUND

Region does not exist.

400

OPERATION_DENIED_NO_AVAILABLE_CIDR

No available CIDR block.

400

OPERATION_DENIED_REGION_NOT_SUPPORT_PUB_IPV6

Public IPv6 is not supported in the specified region.

400

OPERATION_DENIED_SUBNET_TYPE_NOT_SUPPORT

Operations on subnets with such IP stack type is not supported.

400

OPERATION_DENIED_VPC_NOT_SUPPORT_PRI_IPV6

Private IPv6 is not supported for the specified global VPC.

Last updated