Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Intertech Services AG
Yandex Virtual Private Cloud
  • Getting started
  • Step-by-step instructions
  • Practical guidelines
  • Concepts
  • DDoS Protection
  • Recommendations
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • REST
    • gRPC
      • Overview
      • AddressService
      • GatewayService
      • NetworkService
      • RouteTableService
      • SecurityGroupService
      • SubnetService
      • OperationService
  • Questions and answers
  1. API reference
  2. gRPC
  3. AddressService

Virtual Private Cloud API, gRPC: AddressService

Written by
Yandex Cloud
  • Calls AddressService
  • Get
    • GetAddressRequest
    • Address
    • ExternalIpv4Address
    • AddressRequirements
  • GetByValue
    • GetAddressByValueRequest
    • Address
    • ExternalIpv4Address
    • AddressRequirements
  • List
    • ListAddressesRequest
    • ListAddressesResponse
    • Address
    • ExternalIpv4Address
    • AddressRequirements
  • Create
    • CreateAddressRequest
    • ExternalIpv4AddressSpec
    • AddressRequirements
    • Operation
    • CreateAddressMetadata
    • Address
    • ExternalIpv4Address
  • Update
    • UpdateAddressRequest
    • Operation
    • UpdateAddressMetadata
    • Address
    • ExternalIpv4Address
    • AddressRequirements
  • Delete
    • DeleteAddressRequest
    • Operation
    • DeleteAddressMetadata
  • ListOperations
    • ListAddressOperationsRequest
    • ListAddressOperationsResponse
    • Operation
  • Move
    • MoveAddressRequest
    • Operation
    • MoveAddressMetadata
    • Address
    • ExternalIpv4Address
    • AddressRequirements

A set of methods for managing Address resources.

Call Description
Get Returns the specified Address resource.
GetByValue Returns the specified Address resource by a given value.
List Retrieves the list of Address resources in the specified folder.
Create Creates an address in the specified folder and network.
Update Updates the specified address.
Delete Deletes the specified address.
ListOperations List operations for the specified address.
Move Move an address to another folder

Calls AddressService

Get

Returns the specified Address resource.
To get the list of all available Address resources, make a List request.

rpc Get (GetAddressRequest) returns (Address)

GetAddressRequest

Field Description
address_id string
Required. ID of the Address resource to return.
To get Address resource ID make a AddressService.List request. The maximum string length in characters is 50.

Address

Field Description
id string
ID of the address. Generated at creation time.
folder_id string
ID of the folder that the address belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the address. The name is unique within the folder.
description string
Description of the address.
labels map<string,string>
Resource labels as key:value pairs.
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address ExternalIpv4Address
External ipv4 address specification.
reserved bool
Specifies if address is reserved or not.
used bool
Specifies if address is used or not.
type enum Type
Type of the IP address.
  • INTERNAL: Internal IP address.
  • EXTERNAL: Public IP address.
ip_version enum IpVersion
Vervion of the IP address.
  • IPV4: IPv4 address.
  • IPV6: IPv6 address.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4Address

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

AddressRequirements

Field Description
ddos_protection_provider string
DDoS protection provider ID.
outgoing_smtp_capability string
Capability to send SMTP traffic.

GetByValue

Returns the specified Address resource by a given value.
To get the list of all available Address resources, make a List request.

rpc GetByValue (GetAddressByValueRequest) returns (Address)

GetAddressByValueRequest

Field Description
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address string
External ipv4 address specification.

Address

Field Description
id string
ID of the address. Generated at creation time.
folder_id string
ID of the folder that the address belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the address. The name is unique within the folder.
description string
Description of the address.
labels map<string,string>
Resource labels as key:value pairs.
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address ExternalIpv4Address
External ipv4 address specification.
reserved bool
Specifies if address is reserved or not.
used bool
Specifies if address is used or not.
type enum Type
Type of the IP address.
  • INTERNAL: Internal IP address.
  • EXTERNAL: Public IP address.
ip_version enum IpVersion
Vervion of the IP address.
  • IPV4: IPv4 address.
  • IPV6: IPv6 address.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4Address

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

AddressRequirements

Field Description
ddos_protection_provider string
DDoS protection provider ID.
outgoing_smtp_capability string
Capability to send SMTP traffic.

List

Retrieves the list of Address resources in the specified folder.

rpc List (ListAddressesRequest) returns (ListAddressesResponse)

ListAddressesRequest

Field Description
folder_id string
Required. ID of the folder to list addresses 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 ListAddressesResponse.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 ListAddressesResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.
filter string
A filter expression that filters Address listed in the response.
The expression must specify:
  1. The field name. Currently you can use filtering only on Address.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z][-a-z0-9]{1,61}[a-z0-9].
Example of a filter: name=my-address.

ListAddressesResponse

Field Description
addresses[] Address
List of addresses.
next_page_token string
Token for getting the next page of the list. If the number of results is greater than the specified ListAddressesRequest.page_size, use next_page_token as the value for the ListAddressesRequest.page_token parameter in the next list request.
Each subsequent page will have its own next_page_token to continue paging through the results.

Address

Field Description
id string
ID of the address. Generated at creation time.
folder_id string
ID of the folder that the address belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the address. The name is unique within the folder.
description string
Description of the address.
labels map<string,string>
Resource labels as key:value pairs.
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address ExternalIpv4Address
External ipv4 address specification.
reserved bool
Specifies if address is reserved or not.
used bool
Specifies if address is used or not.
type enum Type
Type of the IP address.
  • INTERNAL: Internal IP address.
  • EXTERNAL: Public IP address.
ip_version enum IpVersion
Vervion of the IP address.
  • IPV4: IPv4 address.
  • IPV6: IPv6 address.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4Address

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

AddressRequirements

Field Description
ddos_protection_provider string
DDoS protection provider ID.
outgoing_smtp_capability string
Capability to send SMTP traffic.

Create

Creates an address in the specified folder and network.

rpc Create (CreateAddressRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateAddressMetadata

    Operation.response:Address

CreateAddressRequest

Field Description
folder_id string
Required. ID of the folder to create a address in.
To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.
name string
Name of the address. The name must be unique within the folder. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
description string
Description of the address. The maximum string length in characters is 256.
labels map<string,string>
Address 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]*.
address_spec oneof: external_ipv4_address_spec
External ipv4 address specification.
  external_ipv4_address_spec ExternalIpv4AddressSpec
External ipv4 address specification.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4AddressSpec

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

AddressRequirements

Field Description
ddos_protection_provider string
DDoS protection provider ID.
outgoing_smtp_capability string
Capability to send SMTP traffic.

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<CreateAddressMetadata>
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<Address>
if operation finished successfully.

CreateAddressMetadata

Field Description
address_id string
ID of the address that is being created.

Address

Field Description
id string
ID of the address. Generated at creation time.
folder_id string
ID of the folder that the address belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the address. The name is unique within the folder.
description string
Description of the address.
labels map<string,string>
Resource labels as key:value pairs.
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address ExternalIpv4Address
External ipv4 address specification.
reserved bool
Specifies if address is reserved or not.
used bool
Specifies if address is used or not.
type enum Type
Type of the IP address.
  • INTERNAL: Internal IP address.
  • EXTERNAL: Public IP address.
ip_version enum IpVersion
Vervion of the IP address.
  • IPV4: IPv4 address.
  • IPV6: IPv6 address.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4Address

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

Update

Updates the specified address.

rpc Update (UpdateAddressRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateAddressMetadata

    Operation.response:Address

UpdateAddressRequest

Field Description
address_id string
Required. ID of the address to update.
To get the address ID make a AddressService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which attributes of the Address should be updated.
name string
New name for the address. The name must be unique within the folder. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
description string
New description of the address. The maximum string length in characters is 256.
labels map<string,string>
Address labels as key:value pairs.
Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:
  1. Get the current set of labels with a AddressService.Get request.
  2. Add or remove a label in this set.
  3. Send the new set in this field.
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]*.
reserved bool
Specifies if address is reserved or not.
deletion_protection bool
Specifies if address protected from deletion.

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<UpdateAddressMetadata>
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<Address>
if operation finished successfully.

UpdateAddressMetadata

Field Description
address_id string
ID of the Address that is being updated.

Address

Field Description
id string
ID of the address. Generated at creation time.
folder_id string
ID of the folder that the address belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the address. The name is unique within the folder.
description string
Description of the address.
labels map<string,string>
Resource labels as key:value pairs.
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address ExternalIpv4Address
External ipv4 address specification.
reserved bool
Specifies if address is reserved or not.
used bool
Specifies if address is used or not.
type enum Type
Type of the IP address.
  • INTERNAL: Internal IP address.
  • EXTERNAL: Public IP address.
ip_version enum IpVersion
Vervion of the IP address.
  • IPV4: IPv4 address.
  • IPV6: IPv6 address.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4Address

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

AddressRequirements

Field Description
ddos_protection_provider string
DDoS protection provider ID.
outgoing_smtp_capability string
Capability to send SMTP traffic.

Delete

Deletes the specified address.

rpc Delete (DeleteAddressRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteAddressMetadata

    Operation.response:google.protobuf.Empty

DeleteAddressRequest

Field Description
address_id string
Required. ID of the address to delete.
To get a address ID make a AddressService.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<DeleteAddressMetadata>
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<google.protobuf.Empty>
if operation finished successfully.

DeleteAddressMetadata

Field Description
address_id string
ID of the address that is being deleted.

ListOperations

List operations for the specified address.

rpc ListOperations (ListAddressOperationsRequest) returns (ListAddressOperationsResponse)

ListAddressOperationsRequest

Field Description
address_id string
Required. ID of the address to list operations for.
To get a address ID make a AddressService.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 ListAddressOperationsResponse.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 ListAddressOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListAddressOperationsResponse

Field Description
operations[] operation.Operation
List of operations for the specified address.
next_page_token string
Token for getting the next page of the list. If the number of results is greater than the specified ListAddressOperationsRequest.page_size, use next_page_token as the value for the ListAddressOperationsRequest.page_token parameter in the next list request.
Each subsequent page 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. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.

Move

Move an address to another folder

rpc Move (MoveAddressRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:MoveAddressMetadata

    Operation.response:Address

MoveAddressRequest

Field Description
address_id string
Required. The maximum string length in characters is 50.
destination_folder_id string
Required. 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<MoveAddressMetadata>
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<Address>
if operation finished successfully.

MoveAddressMetadata

Field Description
address_id string

Address

Field Description
id string
ID of the address. Generated at creation time.
folder_id string
ID of the folder that the address belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the address. The name is unique within the folder.
description string
Description of the address.
labels map<string,string>
Resource labels as key:value pairs.
address oneof: external_ipv4_address
External ipv4 address specification.
  external_ipv4_address ExternalIpv4Address
External ipv4 address specification.
reserved bool
Specifies if address is reserved or not.
used bool
Specifies if address is used or not.
type enum Type
Type of the IP address.
  • INTERNAL: Internal IP address.
  • EXTERNAL: Public IP address.
ip_version enum IpVersion
Vervion of the IP address.
  • IPV4: IPv4 address.
  • IPV6: IPv6 address.
deletion_protection bool
Specifies if address protected from deletion.

ExternalIpv4Address

Field Description
address string
Value of address.
zone_id string
Availability zone from which the address will be allocated.
requirements AddressRequirements
Parameters of the allocated address, for example DDoS Protection.

AddressRequirements

Field Description
ddos_protection_provider string
DDoS protection provider ID.
outgoing_smtp_capability string
Capability to send SMTP traffic.

Was the article helpful?

Language / Region
Yandex project
© 2023 Intertech Services AG
In this article:
  • Calls AddressService
  • Get
  • GetAddressRequest
  • Address
  • ExternalIpv4Address
  • AddressRequirements
  • GetByValue
  • GetAddressByValueRequest
  • Address
  • ExternalIpv4Address
  • AddressRequirements
  • List
  • ListAddressesRequest
  • ListAddressesResponse
  • Address
  • ExternalIpv4Address
  • AddressRequirements
  • Create
  • CreateAddressRequest
  • ExternalIpv4AddressSpec
  • AddressRequirements
  • Operation
  • CreateAddressMetadata
  • Address
  • ExternalIpv4Address
  • Update
  • UpdateAddressRequest
  • Operation
  • UpdateAddressMetadata
  • Address
  • ExternalIpv4Address
  • AddressRequirements
  • Delete
  • DeleteAddressRequest
  • Operation
  • DeleteAddressMetadata
  • ListOperations
  • ListAddressOperationsRequest
  • ListAddressOperationsResponse
  • Operation
  • Move
  • MoveAddressRequest
  • Operation
  • MoveAddressMetadata
  • Address
  • ExternalIpv4Address
  • AddressRequirements