Virtual Private Cloud API, REST: Subnet.get
Returns the specified Subnet resource.
To get the list of available Subnet resources, make a list request.
HTTP request
GET https://vpc.api.cloud.yandex.net/vpc/v1/subnets/{subnetId}
Path parameters
Parameter | Description |
---|---|
subnetId | Required. ID of the Subnet resource to return. To get the subnet ID use a list request. The maximum string length in characters is 50. |
Response
HTTP Code: 200 - OK
{
"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"
]
}
}
A Subnet resource. For more information, see Subnets.
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. |