Network Security V1 API - Class Google::Cloud::NetworkSecurity::V1::AddressGroupService::Client (v0.1.0)

Reference documentation and code samples for the Network Security V1 API class Google::Cloud::NetworkSecurity::V1::AddressGroupService::Client.

Client for the AddressGroupService service.

AddressGroup is a resource that manages a collection of IP or Domain Names, it can be used in Firewall Policy to represent allow or deny traffic from all the IP or Domain Names from the Address Group.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the AddressGroupService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all AddressGroupService clients
::Google::Cloud::NetworkSecurity::V1::AddressGroupService::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::Operation

Adds items to an address group.

Overloads
def add_address_group_items(request, options = nil) -> ::Gapic::Operation
Pass arguments to add_address_group_items via a request object, either of type Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to add_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).
Parameters
  • 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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::Operation

Clones items from one address group to another.

Overloads
def clone_address_group_items(request, options = nil) -> ::Gapic::Operation
Pass arguments to clone_address_group_items via a request object, either of type CloneAddressGroupItemsRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to clone_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).
Parameters
  • 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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::Configuration

Configure the AddressGroupService 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#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::Operation

Creates a new address group in a given project and location.

Overloads
def create_address_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_address_group via a request object, either of type CreateAddressGroupRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to create_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).
Parameters
  • 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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::Operation

Deletes a single address group.

Overloads
def delete_address_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_address_group via a request object, either of type DeleteAddressGroupRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to delete_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).
Parameters
  • 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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::AddressGroup

Gets details of a single address group.

Overloads
def get_address_group(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::AddressGroup
Pass arguments to get_address_group via a request object, either of type GetAddressGroupRequest or an equivalent Hash.
Parameters
  • 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::AddressGroup
Pass arguments to get_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).
Parameter
  • name (::String) — Required. A name of the AddressGroup to get. Must be in the format projects/*/locations/{location}/addressGroups/*.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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::Client

Get the associated client for mix-in of the IAMPolicy.

Returns
  • (Google::Iam::V1::IAMPolicy::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new AddressGroupService client object.

Yields
  • (config) — Configure the AddressGroupService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::NetworkSecurity::V1::AddressGroupService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::NetworkSecurity::V1::AddressGroupService::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.

Overloads
def list_address_group_references(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>
Pass arguments to list_address_group_references via a request object, either of type ListAddressGroupReferencesRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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.

Overloads
def list_address_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>
Pass arguments to list_address_groups via a request object, either of type ListAddressGroupsRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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 ListAddressGroupsResponse Indicates that this is a continuation of a prior ListAddressGroups call, 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.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::NetworkSecurity::V1::AddressGroupService::Operations

Get 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::Operation

Removes items from an address group.

Overloads
def remove_address_group_items(request, options = nil) -> ::Gapic::Operation
Pass arguments to remove_address_group_items via a request object, either of type RemoveAddressGroupItemsRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to remove_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).
Parameters
  • 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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() -> String

The effective universe domain

Returns
  • (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::Operation

Updates the parameters of a single address group.

Overloads
def update_address_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_address_group via a request object, either of type UpdateAddressGroupRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to update_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).
Parameters
  • 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).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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::AddressGroupService::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