Security Center Management V1 API - Class Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client (v1.0.0)

Reference documentation and code samples for the Security Center Management V1 API class Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.

Client for the SecurityCenterManagement service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the SecurityCenterManagement 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_event_threat_detection_custom_module

def create_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
def create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule

Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

Overloads
def create_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
Pass arguments to create_event_threat_detection_custom_module via a request object, either of type CreateEventThreatDetectionCustomModuleRequest or an equivalent Hash.
Parameters
def create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
Pass arguments to create_event_threat_detection_custom_module 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. Name of parent for the module. Its format is organizations/{organization}/locations/{location}, folders/{folder}/locations/{location}, or projects/{project}/locations/{location}
  • event_threat_detection_custom_module (::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash) — Required. The module to create. The event_threat_detection_custom_module.name will be ignored and server generated.
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will done for the request (no module will be created). An OK response indicates the request is valid while an error response indicates the request is invalid. Note that a subsequent request to actually create the module could still fail because 1. the state could have changed (e.g. IAM permission lost) or

    1. A failure occurred during creation of the module.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
p result

#create_security_health_analytics_custom_module

def create_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
def create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule

Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

Overloads
def create_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
Pass arguments to create_security_health_analytics_custom_module via a request object, either of type CreateSecurityHealthAnalyticsCustomModuleRequest or an equivalent Hash.
Parameters
def create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
Pass arguments to create_security_health_analytics_custom_module 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. Name of the parent organization, folder, or project of the module, specified in one of the following formats:

    • organizations/{organization}/locations/{location}
    • folders/{folder}/locations/{location}
    • projects/{project}/locations/{location}
  • security_health_analytics_custom_module (::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash) — Required. The resource being created
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will done for the request (no module will be created). An OK response indicates the request is valid while an error response indicates the request is invalid. Note that a subsequent request to actually create the module could still fail because:

    1. the state could have changed (e.g. IAM permission lost) or
    2. A failure occurred during creation of the module. Defaults to false.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
p result

#delete_event_threat_detection_custom_module

def delete_event_threat_detection_custom_module(request, options = nil) -> ::Google::Protobuf::Empty
def delete_event_threat_detection_custom_module(name: nil, validate_only: nil) -> ::Google::Protobuf::Empty

Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

Overloads
def delete_event_threat_detection_custom_module(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_event_threat_detection_custom_module via a request object, either of type DeleteEventThreatDetectionCustomModuleRequest or an equivalent Hash.
Parameters
def delete_event_threat_detection_custom_module(name: nil, validate_only: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_event_threat_detection_custom_module 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. The resource name of the ETD custom module.

    Its format is:

    • organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}.
    • folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}.
    • projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}.
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will done for the request (module will not be deleted). An OK response indicates the request is valid while an error response indicates the request is invalid. Note that a subsequent request to actually delete the module could still fail because 1. the state could have changed (e.g. IAM permission lost) or

    1. A failure occurred while trying to delete the module.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_security_health_analytics_custom_module

def delete_security_health_analytics_custom_module(request, options = nil) -> ::Google::Protobuf::Empty
def delete_security_health_analytics_custom_module(name: nil, validate_only: nil) -> ::Google::Protobuf::Empty

Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

Overloads
def delete_security_health_analytics_custom_module(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_security_health_analytics_custom_module via a request object, either of type DeleteSecurityHealthAnalyticsCustomModuleRequest or an equivalent Hash.
Parameters
def delete_security_health_analytics_custom_module(name: nil, validate_only: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_security_health_analytics_custom_module 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. The resource name of the SHA custom module.

    Its format is:

    • organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}.
    • folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}.
    • projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}.
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will done for the request (module will not be deleted). An OK response indicates the request is valid while an error response indicates the request is invalid. Note that a subsequent request to actually delete the module could still fail because 1. the state could have changed (e.g. IAM permission lost) or

    1. A failure occurred while trying to delete the module.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

#get_effective_event_threat_detection_custom_module

def get_effective_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule
def get_effective_event_threat_detection_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule

Gets an effective ETD custom module. Retrieves the effective module at the given level. The difference between an EffectiveCustomModule and a CustomModule is that the fields for an EffectiveCustomModule are computed from ancestors if needed. For example, the enablement_state for a CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the enablement_state for an EffectiveCustomModule is always computed to ENABLED or DISABLED (the effective enablement_state).

Overloads
def get_effective_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule
Pass arguments to get_effective_event_threat_detection_custom_module via a request object, either of type GetEffectiveEventThreatDetectionCustomModuleRequest or an equivalent Hash.
Parameters
def get_effective_event_threat_detection_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule
Pass arguments to get_effective_event_threat_detection_custom_module 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. The resource name of the ETD custom module.

    Its format is:

    • organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}.
    • folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}.
    • projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.
p result

#get_effective_security_health_analytics_custom_module

def get_effective_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule
def get_effective_security_health_analytics_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule

Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.

Overloads
def get_effective_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule
Pass arguments to get_effective_security_health_analytics_custom_module via a request object, either of type GetEffectiveSecurityHealthAnalyticsCustomModuleRequest or an equivalent Hash.
Parameters
def get_effective_security_health_analytics_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule
Pass arguments to get_effective_security_health_analytics_custom_module 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. The full resource name of the custom module, specified in one of the following formats:

    • organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
    • folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
    • projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.
p result

#get_event_threat_detection_custom_module

def get_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
def get_event_threat_detection_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule

Gets an Event Threat Detection custom module.

Overloads
def get_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
Pass arguments to get_event_threat_detection_custom_module via a request object, either of type GetEventThreatDetectionCustomModuleRequest or an equivalent Hash.
Parameters
def get_event_threat_detection_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
Pass arguments to get_event_threat_detection_custom_module 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. The resource name of the ETD custom module.

    Its format is:

    • organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}.
    • folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}.
    • projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
p result

#get_security_center_service

def get_security_center_service(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService
def get_security_center_service(name: nil, show_eligible_modules_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService

Gets service settings for the specified Security Command Center service.

Overloads
def get_security_center_service(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService
Pass arguments to get_security_center_service via a request object, either of type GetSecurityCenterServiceRequest or an equivalent Hash.
Parameters
def get_security_center_service(name: nil, show_eligible_modules_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService
Pass arguments to get_security_center_service 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. The Security Command Center service to retrieve.

    Formats:

    • organizations/{organization}/locations/{location}/securityCenterServices/{service}
    • folders/{folder}/locations/{location}/securityCenterServices/{service}
    • projects/{project}/locations/{location}/securityCenterServices/{service}

    The possible values for id {service} are:

    • container-threat-detection
    • event-threat-detection
    • security-health-analytics
    • vm-threat-detection
    • web-security-scanner
  • show_eligible_modules_only (::Boolean) — Flag that, when set, will be used to filter the ModuleSettings that are in scope. The default setting is that all modules will be shown.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.
p result

#get_security_health_analytics_custom_module

def get_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
def get_security_health_analytics_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule

Retrieves a SecurityHealthAnalyticsCustomModule.

Overloads
def get_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
Pass arguments to get_security_health_analytics_custom_module via a request object, either of type GetSecurityHealthAnalyticsCustomModuleRequest or an equivalent Hash.
Parameters
def get_security_health_analytics_custom_module(name: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
Pass arguments to get_security_health_analytics_custom_module 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. Name of the resource
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
p result

#initialize

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

Create a new SecurityCenterManagement client object.

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

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

#list_descendant_event_threat_detection_custom_modules

def list_descendant_event_threat_detection_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>
def list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>

Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

Overloads
def list_descendant_event_threat_detection_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>
Pass arguments to list_descendant_event_threat_detection_custom_modules via a request object, either of type ListDescendantEventThreatDetectionCustomModulesRequest or an equivalent Hash.
Parameters
def list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>
Pass arguments to list_descendant_event_threat_detection_custom_modules 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. Name of parent to list custom modules. Its format is organizations/{organization}/locations/{location}, folders/{folder}/locations/{location}, or projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_descendant_event_threat_detection_custom_modules method.
result = client.list_descendant_event_threat_detection_custom_modules 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::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
  p item
end

#list_descendant_security_health_analytics_custom_modules

def list_descendant_security_health_analytics_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>
def list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>

Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent's CRM descendants.

Overloads
def list_descendant_security_health_analytics_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>
Pass arguments to list_descendant_security_health_analytics_custom_modules via a request object, either of type ListDescendantSecurityHealthAnalyticsCustomModulesRequest or an equivalent Hash.
Parameters
def list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>
Pass arguments to list_descendant_security_health_analytics_custom_modules 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. Name of the parent organization, folder, or project in which to list custom modules, specified in one of the following formats:

    • organizations/{organization}/locations/{location}
    • folders/{folder}/locations/{location}
    • projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_descendant_security_health_analytics_custom_modules method.
result = client.list_descendant_security_health_analytics_custom_modules 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::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
  p item
end

#list_effective_event_threat_detection_custom_modules

def list_effective_event_threat_detection_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>
def list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>

Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

Overloads
def list_effective_event_threat_detection_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>
Pass arguments to list_effective_event_threat_detection_custom_modules via a request object, either of type ListEffectiveEventThreatDetectionCustomModulesRequest or an equivalent Hash.
Parameters
def list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>
Pass arguments to list_effective_event_threat_detection_custom_modules 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. Name of parent to list effective custom modules. Its format is organizations/{organization}/locations/{location}, folders/{folder}/locations/{location}, or projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
  • page_token (::String) — Optional. The value returned by the last call indicating a continuation
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_effective_event_threat_detection_custom_modules method.
result = client.list_effective_event_threat_detection_custom_modules 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::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.
  p item
end

#list_effective_security_health_analytics_custom_modules

def list_effective_security_health_analytics_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>
def list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>

Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors (no descendants).

Overloads
def list_effective_security_health_analytics_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>
Pass arguments to list_effective_security_health_analytics_custom_modules via a request object, either of type ListEffectiveSecurityHealthAnalyticsCustomModulesRequest or an equivalent Hash.
Parameters
def list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>
Pass arguments to list_effective_security_health_analytics_custom_modules 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. Name of parent to list effective custom modules. specified in one of the following formats:

    • organizations/{organization}/locations/{location}
    • folders/{folder}/locations/{location} or projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
  • page_token (::String) — Optional. The value returned by the last call indicating a continuation.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_effective_security_health_analytics_custom_modules method.
result = client.list_effective_security_health_analytics_custom_modules 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::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.
  p item
end

#list_event_threat_detection_custom_modules

def list_event_threat_detection_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>
def list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>

Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

Overloads
def list_event_threat_detection_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>
Pass arguments to list_event_threat_detection_custom_modules via a request object, either of type ListEventThreatDetectionCustomModulesRequest or an equivalent Hash.
Parameters
def list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>
Pass arguments to list_event_threat_detection_custom_modules 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. Name of parent to list custom modules. Its format is organizations/{organization}/locations/{location}, folders/{folder}/locations/{location}, or projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. A page token, received from a previous ListEventThreatDetectionCustomModules call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListEventThreatDetectionCustomModules must match the call that provided the page token.

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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_event_threat_detection_custom_modules method.
result = client.list_event_threat_detection_custom_modules 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::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
  p item
end

#list_security_center_services

def list_security_center_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>
def list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>

Returns a list of all Security Command Center services for the given parent.

Overloads
def list_security_center_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>
Pass arguments to list_security_center_services via a request object, either of type ListSecurityCenterServicesRequest or an equivalent Hash.
Parameters
def list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>
Pass arguments to list_security_center_services 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 name of the parent to list Security Command Center services.

    Formats:

    • organizations/{organization}/locations/{location}
    • folders/{folder}/locations/{location}
    • projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
  • page_token (::String) — Optional. The value returned by the last call indicating a continuation.
  • show_eligible_modules_only (::Boolean) — Flag that, when set, will be used to filter the ModuleSettings that are in scope. The default setting is that all modules will be shown.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_security_center_services method.
result = client.list_security_center_services 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::SecurityCenterManagement::V1::SecurityCenterService.
  p item
end

#list_security_health_analytics_custom_modules

def list_security_health_analytics_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>
def list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>

Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors (no descendants).

Overloads
def list_security_health_analytics_custom_modules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>
Pass arguments to list_security_health_analytics_custom_modules via a request object, either of type ListSecurityHealthAnalyticsCustomModulesRequest or an equivalent Hash.
Parameters
def list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>
Pass arguments to list_security_health_analytics_custom_modules 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. Name of parent organization, folder, or project in which to list custom modules, specified in one of the following formats:

    • organizations/{organization}/locations/{location}
    • folders/{folder}/locations/{location}
    • projects/{project}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

# Call the list_security_health_analytics_custom_modules method.
result = client.list_security_health_analytics_custom_modules 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::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
  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)

#simulate_security_health_analytics_custom_module

def simulate_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse
def simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

Overloads
def simulate_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse
Pass arguments to simulate_security_health_analytics_custom_module via a request object, either of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest or an equivalent Hash.
Parameters
def simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse
Pass arguments to simulate_security_health_analytics_custom_module 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
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_event_threat_detection_custom_module

def update_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
def update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule

Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.

Overloads
def update_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
Pass arguments to update_event_threat_detection_custom_module via a request object, either of type UpdateEventThreatDetectionCustomModuleRequest or an equivalent Hash.
Parameters
def update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule
Pass arguments to update_event_threat_detection_custom_module 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 EventThreatDetectionCustomModule 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.
  • event_threat_detection_custom_module (::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash) — Required. The module being updated
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will done for the request (module will not be updated). An OK response indicates the request is valid while an error response indicates the request is invalid. Note that a subsequent request to actually update the module could still fail because 1. the state could have changed (e.g. IAM permission lost) or

    1. A failure occurred while trying to update the module.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.
p result

#update_security_center_service

def update_security_center_service(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService
def update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService

Updates a Security Command Center service using the given update mask.

Overloads
def update_security_center_service(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService
Pass arguments to update_security_center_service via a request object, either of type UpdateSecurityCenterServiceRequest or an equivalent Hash.
Parameters
def update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService
Pass arguments to update_security_center_service 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
  • security_center_service (::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash) — Required. The updated service.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) —

    Required. The list of fields to be updated. Possible values:

    • "intended_enablement_state"
    • "modules"
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will be done for the request (service will not be updated). An OK response indicates that the request is valid, while an error response indicates that the request is invalid. Note that a subsequent request to actually update the service could still fail for one of the following reasons:

    • The state could have changed (e.g. IAM permission lost).
    • A failure occurred while trying to delete the module.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.
p result

#update_security_health_analytics_custom_module

def update_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
def update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule

Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only.

Overloads
def update_security_health_analytics_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
Pass arguments to update_security_health_analytics_custom_module via a request object, either of type UpdateSecurityHealthAnalyticsCustomModuleRequest or an equivalent Hash.
Parameters
def update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule
Pass arguments to update_security_health_analytics_custom_module 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. The list of fields to be updated. The only fields that can be updated are enablement_state and custom_config. If empty or set to the wildcard value *, both enablement_state and custom_config are updated.
  • security_health_analytics_custom_module (::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash) — Required. The resource being updated
  • validate_only (::Boolean) —

    Optional. When set to true, only validations (including IAM checks) will done for the request (module will not be updated). An OK response indicates the request is valid while an error response indicates the request is invalid. Note that a subsequent request to actually update the module could still fail because 1. the state could have changed (e.g. IAM permission lost) or

    1. A failure occurred while trying to update the module.
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.
p result

#validate_event_threat_detection_custom_module

def validate_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse
def validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse

Validates the given Event Threat Detection custom module.

Overloads
def validate_event_threat_detection_custom_module(request, options = nil) -> ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse
Pass arguments to validate_event_threat_detection_custom_module via a request object, either of type ValidateEventThreatDetectionCustomModuleRequest or an equivalent Hash.
Parameters
def validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) -> ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse
Pass arguments to validate_event_threat_detection_custom_module 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. Resource name of the parent to validate the Custom Module under.

    Its format is:

    • organizations/{organization}/locations/{location}.
  • raw_text (::String) — Required. The raw text of the module's contents. Used to generate error messages.
  • type (::String) — Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).
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/security_center_management/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new

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

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

# The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.
p result