ModifySubnetStackType

ModifySubnetStackType

1. API Description

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

注意事项

  • 当前Subnet堆栈类型为IPv4、目标堆栈类型为IPv4_IPv6

2. Input Parameters

The following request parameter list only provides API request parameters.

参数名称必选类型描述

subnetId

String

Subnet的ID

stackType

String

Subnet 堆栈类型 IPv4_IPv6

ipv6Type

String

Subnet IPv6类型 Public、Private

Parameter NameRequiredTypeDescription

subnetId

Yes

String

Subnet ID.

stackType

Yes

String

IP stack type of subnet. The optional values are as follows: IPv4, IPv4_IPv6, IPv6

ipv6Type

Yes

String

Subnet IPv6 type. The optional values are as follows: Public, Private

3. Output Parameters

Parameter NameTypeDescription

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.

POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: ModifySubnetStackType
<Common Request Params>

Request:
{
  "subnetId": "XXX",
  "stackType": "IPv4_IPv6",
  "ipv6Type": "Private"
}

Response:
{
  "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
  "response": {
    "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
    "ipv6CidrBlock": "xxx"
  }
}

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 CodeError CodeDescription

404

INVALID_SUBNET_NOT_FOUND

Subnet does not exist.

400

OPERATION_DENIED_DEFAULT_SUBNET

Operations on default subnet is not supported.

400

OPERATION_DENIED_SUBNET_TYPE_NOT_SUPPORT

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

400

OPERATION_DENIED_VPC_NOT_SUPPORT_IPV6

Private IPv6 is not supported for this global VPC.

400

INVALID_ZONE_NOT_FOUND

Region does not exist.

400

OPERATION_DENIED_SUBNET_TYPE_NOT_SUPPORT_IPV6

Public IPv6 is not supported in this region.

Last updated