Virtual Private Cloud API, gRPC: SubnetService
A set of methods for managing Subnet resources.
Call | Description |
---|---|
Get | Returns the specified Subnet resource. |
List | Retrieves the list of Subnet resources in the specified folder. |
Create | Creates a subnet in the specified folder and network. |
Update | Updates the specified subnet. |
AddCidrBlocks | Adds CIDR blocks to the specified subnet. |
RemoveCidrBlocks | Removes CIDR blocks from the specified subnet. |
Delete | Deletes the specified subnet. |
ListOperations | List operations for the specified subnet. |
Move | Move subnet to another folder. |
Relocate | |
ListUsedAddresses | List used addresses in specified subnet. |
Calls SubnetService
Get
Returns the specified Subnet resource.
To get the list of available Subnet resources, make a List request.
rpc Get (GetSubnetRequest) returns (Subnet)
GetSubnetRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the Subnet resource to return. To get the subnet ID use a SubnetService.List request. The maximum string length in characters is 50. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
List
Retrieves the list of Subnet resources in the specified folder.
rpc List (ListSubnetsRequest) returns (ListSubnetsResponse)
ListSubnetsRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list subnets in. To get the folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListSubnetsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListSubnetsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters resources listed in the response. The expression must specify:
|
ListSubnetsResponse
Field | Description |
---|---|
subnets[] | Subnet List of Subnet resources. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListSubnetsRequest.page_size, use the next_page_token as the value for the ListSubnetsRequest.page_token query parameter in the next list request. Subsequent list requests will have their own next_page_token to continue paging through the results. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
Create
Creates a subnet in the specified folder and network. Method starts an asynchronous operation that can be cancelled while it is in progress.
rpc Create (CreateSubnetRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateSubnetMetadata
Operation.response:Subnet
CreateSubnetRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to create a subnet in. To get folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the subnet. The maximum string length in characters is 256. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string Required. ID of the network to create subnet in. The maximum string length in characters is 50. |
zone_id | string Required. ID of the availability zone where the subnet resides. To get a list of available zones, use the yandex.cloud.compute.v1.ZoneService.List request. The maximum string length in characters is 50. |
v4_cidr_blocks[] | string Required. CIDR block. The range of internal addresses that are defined for this subnet. For example, 10.0.0.0/22 or 192.168.0.0/24. Minimum subnet size is /28, maximum subnet size is /16. |
route_table_id | string ID of route table the subnet is linked to. The maximum string length in characters is 50. |
dhcp_options | DhcpOptions |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateSubnetMetadata
Field | Description |
---|---|
subnet_id | string ID of the subnet that is being created. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
Update
Updates the specified subnet. Method starts an asynchronous operation that can be cancelled while it is in progress.
rpc Update (UpdateSubnetRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSubnetMetadata
Operation.response:Subnet
UpdateSubnetRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the Subnet resource to update. The maximum string length in characters is 50. |
update_mask | google.protobuf.FieldMask Field mask that specifies which fields of the Subnet resource are going to be updated. |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the subnet. The maximum string length in characters is 256. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
route_table_id | string ID of route table the subnet is linked to. The maximum string length in characters is 50. |
dhcp_options | DhcpOptions |
v4_cidr_blocks[] | string New CIDR blocks which will overwrite the existing ones. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateSubnetMetadata
Field | Description |
---|---|
subnet_id | string ID of the Subnet resource that is being updated. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
AddCidrBlocks
Adds CIDR blocks to the specified subnet. Method starts an asynchronous operation that can be cancelled while it is in progress.
rpc AddCidrBlocks (AddSubnetCidrBlocksRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSubnetMetadata
Operation.response:Subnet
AddSubnetCidrBlocksRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the Subnet resource that is being updated. The maximum string length in characters is 50. |
v4_cidr_blocks[] | string CIDR block. The range of internal addresses that should be added to this subnet. For example, 10.0.0.0/22 or 192.168.0.0/24. Minimum subnet size is /28, maximum subnet size is /16. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateSubnetMetadata
Field | Description |
---|---|
subnet_id | string ID of the Subnet resource that is being updated. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
RemoveCidrBlocks
Removes CIDR blocks from the specified subnet. Method starts an asynchronous operation that can be cancelled while it is in progress.
rpc RemoveCidrBlocks (RemoveSubnetCidrBlocksRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSubnetMetadata
Operation.response:Subnet
RemoveSubnetCidrBlocksRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the Subnet resource that is being updated. The maximum string length in characters is 50. |
v4_cidr_blocks[] | string CIDR block. The range of internal addresses that are removed from this subnet. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateSubnetMetadata
Field | Description |
---|---|
subnet_id | string ID of the Subnet resource that is being updated. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
Delete
Deletes the specified subnet.
rpc Delete (DeleteSubnetRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteSubnetMetadata
Operation.response:google.protobuf.Empty
DeleteSubnetRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the subnet to delete. To get the subnet ID use a SubnetService.List request. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteSubnetMetadata
Field | Description |
---|---|
subnet_id | string ID of the Subnet resource that is being deleted. |
ListOperations
List operations for the specified subnet.
rpc ListOperations (ListSubnetOperationsRequest) returns (ListSubnetOperationsResponse)
ListSubnetOperationsRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the Subnet resource to list operations for. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page that should be returned. If the number of available results is larger than page_size , the service returns a ListSubnetOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListSubnetOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
ListSubnetOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified Subnet resource. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListSubnetOperationsRequest.page_size, use the next_page_token as the value for the ListSubnetOperationsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty |
Move
Move subnet to another folder.
rpc Move (MoveSubnetRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:MoveSubnetMetadata
Operation.response:Subnet
MoveSubnetRequest
Field | Description |
---|---|
subnet_id | string Required. ID of the Subnet resource to move. The maximum string length in characters is 50. |
destination_folder_id | string Required. ID of the destination folder. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
MoveSubnetMetadata
Field | Description |
---|---|
subnet_id | string ID of the Subnet resource that is being moved. |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
Relocate
rpc Relocate (RelocateSubnetRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:RelocateSubnetMetadata
Operation.response:Subnet
RelocateSubnetRequest
Field | Description |
---|---|
subnet_id | string Required. The maximum string length in characters is 50. |
destination_zone_id | string Required. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
RelocateSubnetMetadata
Field | Description |
---|---|
subnet_id | string |
Subnet
Field | Description |
---|---|
id | string ID of the subnet. |
folder_id | string ID of the folder that the subnet belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the subnet. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Optional description of the subnet. 0-256 characters long. |
labels | map<string,string> Resource labels, key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
network_id | string ID of the network the subnet belongs to. |
zone_id | string ID of the availability zone where the subnet resides. |
v4_cidr_blocks[] | 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. |
v6_cidr_blocks[] | string IPv6 not available yet. |
route_table_id | string ID of route table the subnet is linked to. |
dhcp_options | DhcpOptions DHCP options for the subnet. |
DhcpOptions
Field | Description |
---|---|
domain_name_servers[] | string A list of DHCP servers for this subnet. |
domain_name | string A domain name to us as a suffix when resolving host names in this subnet. |
ntp_servers[] | string List of NTP servers for this subnet. |
ListUsedAddresses
List used addresses in specified subnet.
rpc ListUsedAddresses (ListUsedAddressesRequest) returns (ListUsedAddressesResponse)
ListUsedAddressesRequest
Field | Description |
---|---|
subnet_id | string Required. |
page_size | int64 |
page_token | string |
filter | string |
ListUsedAddressesResponse
Field | Description |
---|---|
addresses[] | UsedAddress |
next_page_token | string |
UsedAddress
Field | Description |
---|---|
address | string |
ip_version | enum IpVersion |
references[] | reference.Reference |