Virtual Private Cloud API, REST: Subnet methods
A set of methods for managing Subnet resources.
JSON Representation
{
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"networkId": "string",
"zoneId": "string",
"v4CidrBlocks": [
"string"
],
"v6CidrBlocks": [
"string"
],
"routeTableId": "string",
"dhcpOptions": {
"domainNameServers": [
"string"
],
"domainName": "string",
"ntpServers": [
"string"
]
}
}
Field | Description |
---|---|
id | string ID of the subnet. |
folderId | string ID of the folder that the subnet belongs to. |
createdAt | string (date-time) Creation timestamp in RFC3339 text format. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |
description | string Optional description of the subnet. 0-256 characters long. |
labels | object Resource labels, |
networkId | string ID of the network the subnet belongs to. |
zoneId | string ID of the availability zone where the subnet resides. |
v4CidrBlocks[] | string CIDR block. The range of internal addresses that are defined for this subnet. This field can be set only at Subnet resource creation time and cannot be changed. For example, 10.0.0.0/22 or 192.168.0.0/24. Minimum subnet size is /28, maximum subnet size is /16. |
v6CidrBlocks[] | string IPv6 not available yet. |
routeTableId | string ID of route table the subnet is linked to. |
dhcpOptions | object DHCP options for the subnet. |
dhcpOptions. domainNameServers[] |
string A list of DHCP servers for this subnet. |
dhcpOptions. domainName |
string A domain name to us as a suffix when resolving host names in this subnet. |
dhcpOptions. ntpServers[] |
string List of NTP servers for this subnet. |
Methods
Method | Description |
---|---|
addCidrBlocks | Adds CIDR blocks to the specified subnet. Method starts an asynchronous operation that can be cancelled while it is in progress. |
create | Creates a subnet in the specified folder and network. Method starts an asynchronous operation that can be cancelled while it is in progress. |
delete | Deletes the specified subnet. |
get | Returns the specified Subnet resource. |
list | Retrieves the list of Subnet resources in the specified folder. |
listOperations | List operations for the specified subnet. |
listUsedAddresses | List used addresses in specified subnet. |
move | Move subnet to another folder. |
relocate | |
removeCidrBlocks | Removes CIDR blocks from the specified subnet. Method starts an asynchronous operation that can be cancelled while it is in progress. |
update | Updates the specified subnet. Method starts an asynchronous operation that can be cancelled while it is in progress. |