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

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

Client for the SecurityProfileGroupService service.

SecurityProfileGroup is a resource that defines an action for specific threat signatures or severity levels.

Inherits

  • Object

Methods

.configure

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

Configure the SecurityProfileGroupService 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 SecurityProfileGroupService clients
::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroupService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the SecurityProfileGroupService 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_security_profile

def create_security_profile(request, options = nil) -> ::Gapic::Operation
def create_security_profile(parent: nil, security_profile_id: nil, security_profile: nil) -> ::Gapic::Operation

Creates a new SecurityProfile in a given project and location.

Overloads
def create_security_profile(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_security_profile via a request object, either of type CreateSecurityProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::CreateSecurityProfileRequest, ::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_security_profile(parent: nil, security_profile_id: nil, security_profile: nil) -> ::Gapic::Operation
Pass arguments to create_security_profile 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 SecurityProfile. Must be in the format projects|organizations/*/locations/{location}.
  • security_profile_id (::String) — Required. Short name of the SecurityProfile 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. "security_profile1".
  • security_profile (::Google::Cloud::NetworkSecurity::V1::SecurityProfile, ::Hash) — Required. SecurityProfile resource to be created.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::CreateSecurityProfileRequest.new

# Call the create_security_profile method.
result = client.create_security_profile 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

#create_security_profile_group

def create_security_profile_group(request, options = nil) -> ::Gapic::Operation
def create_security_profile_group(parent: nil, security_profile_group_id: nil, security_profile_group: nil) -> ::Gapic::Operation

Creates a new SecurityProfileGroup in a given project and location.

Overloads
def create_security_profile_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_security_profile_group via a request object, either of type CreateSecurityProfileGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::CreateSecurityProfileGroupRequest, ::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_security_profile_group(parent: nil, security_profile_group_id: nil, security_profile_group: nil) -> ::Gapic::Operation
Pass arguments to create_security_profile_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 SecurityProfileGroup. Must be in the format projects|organizations/*/locations/{location}.
  • security_profile_group_id (::String) — Required. Short name of the SecurityProfileGroup 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. "security_profile_group1".
  • security_profile_group (::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup, ::Hash) — Required. SecurityProfileGroup resource to be created.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::CreateSecurityProfileGroupRequest.new

# Call the create_security_profile_group method.
result = client.create_security_profile_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_security_profile

def delete_security_profile(request, options = nil) -> ::Gapic::Operation
def delete_security_profile(name: nil, etag: nil) -> ::Gapic::Operation

Deletes a single SecurityProfile.

Overloads
def delete_security_profile(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_security_profile via a request object, either of type DeleteSecurityProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::DeleteSecurityProfileRequest, ::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_security_profile(name: nil, etag: nil) -> ::Gapic::Operation
Pass arguments to delete_security_profile 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 SecurityProfile to delete. Must be in the format projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}.
  • etag (::String) — Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::DeleteSecurityProfileRequest.new

# Call the delete_security_profile method.
result = client.delete_security_profile 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_security_profile_group

def delete_security_profile_group(request, options = nil) -> ::Gapic::Operation
def delete_security_profile_group(name: nil, etag: nil) -> ::Gapic::Operation

Deletes a single SecurityProfileGroup.

Overloads
def delete_security_profile_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_security_profile_group via a request object, either of type DeleteSecurityProfileGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::DeleteSecurityProfileGroupRequest, ::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_security_profile_group(name: nil, etag: nil) -> ::Gapic::Operation
Pass arguments to delete_security_profile_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 SecurityProfileGroup to delete. Must be in the format projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}.
  • etag (::String) — Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::DeleteSecurityProfileGroupRequest.new

# Call the delete_security_profile_group method.
result = client.delete_security_profile_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_security_profile

def get_security_profile(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfile
def get_security_profile(name: nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfile

Gets details of a single SecurityProfile.

Overloads
def get_security_profile(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfile
Pass arguments to get_security_profile via a request object, either of type GetSecurityProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::GetSecurityProfileRequest, ::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_security_profile(name: nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfile
Pass arguments to get_security_profile 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 SecurityProfile to get. Must be in the format projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::GetSecurityProfileRequest.new

# Call the get_security_profile method.
result = client.get_security_profile request

# The returned object is of type Google::Cloud::NetworkSecurity::V1::SecurityProfile.
p result

#get_security_profile_group

def get_security_profile_group(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup
def get_security_profile_group(name: nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup

Gets details of a single SecurityProfileGroup.

Overloads
def get_security_profile_group(request, options = nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup
Pass arguments to get_security_profile_group via a request object, either of type GetSecurityProfileGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::GetSecurityProfileGroupRequest, ::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_security_profile_group(name: nil) -> ::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup
Pass arguments to get_security_profile_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 SecurityProfileGroup to get. Must be in the format projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::GetSecurityProfileGroupRequest.new

# Call the get_security_profile_group method.
result = client.get_security_profile_group request

# The returned object is of type Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup.
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 SecurityProfileGroupService client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroupService::Client.new do |config|
  config.timeout = 10.0
end

#list_security_profile_groups

def list_security_profile_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup>
def list_security_profile_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup>

Lists SecurityProfileGroups in a given project and location.

Overloads
def list_security_profile_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup>
Pass arguments to list_security_profile_groups via a request object, either of type ListSecurityProfileGroupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::ListSecurityProfileGroupsRequest, ::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_security_profile_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup>
Pass arguments to list_security_profile_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 or organization and location from which the SecurityProfileGroups should be listed, specified in the format projects|organizations/*/locations/{location}.
  • page_size (::Integer) — Optional. Maximum number of SecurityProfileGroups to return per call.
  • page_token (::String) — Optional. The value returned by the last ListSecurityProfileGroupsResponse Indicates that this is a continuation of a prior ListSecurityProfileGroups call, and that the system should return the next page of data.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::ListSecurityProfileGroupsRequest.new

# Call the list_security_profile_groups method.
result = client.list_security_profile_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::SecurityProfileGroup.
  p item
end

#list_security_profiles

def list_security_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfile>
def list_security_profiles(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfile>

Lists SecurityProfiles in a given project and location.

Overloads
def list_security_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfile>
Pass arguments to list_security_profiles via a request object, either of type ListSecurityProfilesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::ListSecurityProfilesRequest, ::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_security_profiles(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::SecurityProfile>
Pass arguments to list_security_profiles 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 or organization and location from which the SecurityProfiles should be listed, specified in the format projects|organizations/*/locations/{location}.
  • page_size (::Integer) — Optional. Maximum number of SecurityProfiles to return per call.
  • page_token (::String) — Optional. The value returned by the last ListSecurityProfilesResponse Indicates that this is a continuation of a prior ListSecurityProfiles call, and that the system should return the next page of data.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::ListSecurityProfilesRequest.new

# Call the list_security_profiles method.
result = client.list_security_profiles 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::SecurityProfile.
  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::SecurityProfileGroupService::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_security_profile

def update_security_profile(request, options = nil) -> ::Gapic::Operation
def update_security_profile(update_mask: nil, security_profile: nil) -> ::Gapic::Operation

Updates the parameters of a single SecurityProfile.

Overloads
def update_security_profile(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_security_profile via a request object, either of type UpdateSecurityProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::UpdateSecurityProfileRequest, ::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_security_profile(update_mask: nil, security_profile: nil) -> ::Gapic::Operation
Pass arguments to update_security_profile 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) — Required. Field mask is used to specify the fields to be overwritten in the SecurityProfile 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.
  • security_profile (::Google::Cloud::NetworkSecurity::V1::SecurityProfile, ::Hash) — Required. Updated SecurityProfile resource.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::UpdateSecurityProfileRequest.new

# Call the update_security_profile method.
result = client.update_security_profile 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

#update_security_profile_group

def update_security_profile_group(request, options = nil) -> ::Gapic::Operation
def update_security_profile_group(update_mask: nil, security_profile_group: nil) -> ::Gapic::Operation

Updates the parameters of a single SecurityProfileGroup.

Overloads
def update_security_profile_group(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_security_profile_group via a request object, either of type UpdateSecurityProfileGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::NetworkSecurity::V1::UpdateSecurityProfileGroupRequest, ::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_security_profile_group(update_mask: nil, security_profile_group: nil) -> ::Gapic::Operation
Pass arguments to update_security_profile_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) — Required. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup 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.
  • security_profile_group (::Google::Cloud::NetworkSecurity::V1::SecurityProfileGroup, ::Hash) — Required. Updated SecurityProfileGroup resource.
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::SecurityProfileGroupService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetworkSecurity::V1::UpdateSecurityProfileGroupRequest.new

# Call the update_security_profile_group method.
result = client.update_security_profile_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