Reference documentation and code samples for the Network Security V1 API class Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.
Client for the OrganizationAddressGroupService service.
Organization AddressGroup is created under organization. Requests against Organization AddressGroup will use project from request credential for activation/quota/visibility check.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the OrganizationAddressGroupService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all OrganizationAddressGroupService clients ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.configure do |config| config.timeout = 10.0 end
#add_address_group_items
def add_address_group_items(request, options = nil) -> ::Gapic::Operation
def add_address_group_items(address_group: nil, items: nil, request_id: nil) -> ::Gapic::OperationAdds items to an address group.
def add_address_group_items(request, options = nil) -> ::Gapic::Operationadd_address_group_items via a request object, either of type
AddAddressGroupItemsRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def add_address_group_items(address_group: nil, items: nil, request_id: nil) -> ::Gapic::Operationadd_address_group_items via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
address_group (::String) — Required. A name of the AddressGroup to add items to. Must be in the format
projects|organization/*/locations/{location}/addressGroups/*. - items (::Array<::String>) — Required. List of items to add.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest.new # Call the add_address_group_items method. result = client.add_address_group_items request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#clone_address_group_items
def clone_address_group_items(request, options = nil) -> ::Gapic::Operation
def clone_address_group_items(address_group: nil, source_address_group: nil, request_id: nil) -> ::Gapic::OperationClones items from one address group to another.
def clone_address_group_items(request, options = nil) -> ::Gapic::Operationclone_address_group_items via a request object, either of type
CloneAddressGroupItemsRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::CloneAddressGroupItemsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def clone_address_group_items(address_group: nil, source_address_group: nil, request_id: nil) -> ::Gapic::Operationclone_address_group_items via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
address_group (::String) — Required. A name of the AddressGroup to clone items to. Must be in the
format
projects|organization/*/locations/{location}/addressGroups/*. - source_address_group (::String) — Required. Source address group to clone items from.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::CloneAddressGroupItemsRequest.new # Call the clone_address_group_items method. result = client.clone_address_group_items request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the OrganizationAddressGroupService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_address_group
def create_address_group(request, options = nil) -> ::Gapic::Operation
def create_address_group(parent: nil, address_group_id: nil, address_group: nil, request_id: nil) -> ::Gapic::OperationCreates a new address group in a given project and location.
def create_address_group(request, options = nil) -> ::Gapic::Operationcreate_address_group via a request object, either of type
CreateAddressGroupRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::CreateAddressGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_address_group(parent: nil, address_group_id: nil, address_group: nil, request_id: nil) -> ::Gapic::Operationcreate_address_group via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent resource of the AddressGroup. Must be in the
format
projects/*/locations/{location}. - address_group_id (::String) — Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy".
- address_group (::Google::Cloud::NetworkSecurity::V1::AddressGroup, ::Hash) — Required. AddressGroup resource to be created.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::CreateAddressGroupRequest.new # Call the create_address_group method. result = client.create_address_group request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_address_group
def delete_address_group(request, options = nil) -> ::Gapic::Operation
def delete_address_group(name: nil, request_id: nil) -> ::Gapic::OperationDeletes an address group.
def delete_address_group(request, options = nil) -> ::Gapic::Operationdelete_address_group via a request object, either of type
DeleteAddressGroupRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::DeleteAddressGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_address_group(name: nil, request_id: nil) -> ::Gapic::Operationdelete_address_group via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the AddressGroup to delete. Must be in the format
projects/*/locations/{location}/addressGroups/*. -
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::DeleteAddressGroupRequest.new # Call the delete_address_group method. result = client.delete_address_group request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_address_group
def get_address_group(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::AddressGroup
def get_address_group(name: nil) -> ::Google::Cloud::NetworkSecurity::V1::AddressGroupGets details of a single address group.
def get_address_group(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::AddressGroupget_address_group via a request object, either of type
GetAddressGroupRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::GetAddressGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_address_group(name: nil) -> ::Google::Cloud::NetworkSecurity::V1::AddressGroupget_address_group via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the AddressGroup to get. Must be in the format
projects/*/locations/{location}/addressGroups/*.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::NetworkSecurity::V1::AddressGroup)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::GetAddressGroupRequest.new # Call the get_address_group method. result = client.get_address_group request # The returned object is of type Google::Cloud::NetworkSecurity::V1::AddressGroup. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::ClientGet the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> ClientCreate a new OrganizationAddressGroupService client object.
- (config) — Configure the OrganizationAddressGroupService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new do |config| config.timeout = 10.0 end
#list_address_group_references
def list_address_group_references(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>
def list_address_group_references(address_group: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>Lists references of an address group.
def list_address_group_references(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>list_address_group_references via a request object, either of type
ListAddressGroupReferencesRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_address_group_references(address_group: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>list_address_group_references via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
address_group (::String) — Required. A name of the AddressGroup to clone items to. Must be in the
format
projects|organization/*/locations/{location}/addressGroups/*. - page_size (::Integer) — The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.
- page_token (::String) — The next_page_token value returned from a previous List request, if any.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesRequest.new # Call the list_address_group_references method. result = client.list_address_group_references request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference. p item end
#list_address_groups
def list_address_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>
def list_address_groups(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>Lists address groups in a given project and location.
def list_address_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>list_address_groups via a request object, either of type
ListAddressGroupsRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::ListAddressGroupsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_address_groups(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>list_address_groups via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The project and location from which the AddressGroups
should be listed, specified in the format
projects/*/locations/{location}. - page_size (::Integer) — Maximum number of AddressGroups to return per call.
-
page_token (::String) — The value returned by the last
ListAddressGroupsResponseIndicates that this is a continuation of a priorListAddressGroupscall, and that the system should return the next page of data. - return_partial_success (::Boolean) — Optional. If true, allow partial responses for multi-regional Aggregated List requests.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::ListAddressGroupsRequest.new # Call the list_address_groups method. result = client.list_address_groups request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::NetworkSecurity::V1::AddressGroup. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::OperationsGet the associated client for long-running operations.
#remove_address_group_items
def remove_address_group_items(request, options = nil) -> ::Gapic::Operation
def remove_address_group_items(address_group: nil, items: nil, request_id: nil) -> ::Gapic::OperationRemoves items from an address group.
def remove_address_group_items(request, options = nil) -> ::Gapic::Operationremove_address_group_items via a request object, either of type
RemoveAddressGroupItemsRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::RemoveAddressGroupItemsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def remove_address_group_items(address_group: nil, items: nil, request_id: nil) -> ::Gapic::Operationremove_address_group_items via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
address_group (::String) — Required. A name of the AddressGroup to remove items from. Must be in the
format
projects|organization/*/locations/{location}/addressGroups/*. - items (::Array<::String>) — Required. List of items to remove.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::RemoveAddressGroupItemsRequest.new # Call the remove_address_group_items method. result = client.remove_address_group_items request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_address_group
def update_address_group(request, options = nil) -> ::Gapic::Operation
def update_address_group(update_mask: nil, address_group: nil, request_id: nil) -> ::Gapic::OperationUpdates parameters of an address group.
def update_address_group(request, options = nil) -> ::Gapic::Operationupdate_address_group via a request object, either of type
UpdateAddressGroupRequest or an equivalent Hash.
- request (::Google::Cloud::NetworkSecurity::V1::UpdateAddressGroupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_address_group(update_mask: nil, address_group: nil, request_id: nil) -> ::Gapic::Operationupdate_address_group via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- address_group (::Google::Cloud::NetworkSecurity::V1::AddressGroup, ::Hash) — Required. Updated AddressGroup resource.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/network_security/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::NetworkSecurity::V1::UpdateAddressGroupRequest.new # Call the update_address_group method. result = client.update_address_group request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end