Method 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"
}

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.

name string

Name of the subnet. The name is unique within the project. 3-63 characters long.

description string

Optional description of the subnet. 0-256 characters long.

labels object

Resource labels as key:value pairs. Мaximum of 64 per resource.

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.