Cloud Security Compliance V1 API - Class Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client (v0.2.0)

Reference documentation and code samples for the Cloud Security Compliance V1 API class Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.

Client for the Monitoring service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

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

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

#aggregate_framework_compliance_report

def aggregate_framework_compliance_report(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse
def aggregate_framework_compliance_report(name: nil, interval: nil, filter: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse

Gets the aggregated compliance report over time for a given scope.

Overloads
def aggregate_framework_compliance_report(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse
Pass arguments to aggregate_framework_compliance_report via a request object, either of type AggregateFrameworkComplianceReportRequest or an equivalent Hash.
Parameters
def aggregate_framework_compliance_report(name: nil, interval: nil, filter: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse
Pass arguments to aggregate_framework_compliance_report 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 name of the aggregated compliance report over time to retrieve.

    The supported format is: organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}

  • interval (::Google::Type::Interval, ::Hash) — Optional. The start and end time range for the aggregated compliance report.
  • filter (::String) — Optional. The filtering results.
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/cloud_security_compliance/v1"

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

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

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

# The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.
p result

#configure

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

Configure the Monitoring 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

#fetch_framework_compliance_report

def fetch_framework_compliance_report(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport
def fetch_framework_compliance_report(name: nil, end_time: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport

Fetches the framework compliance report for a given scope.

Overloads
def fetch_framework_compliance_report(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport
Pass arguments to fetch_framework_compliance_report via a request object, either of type FetchFrameworkComplianceReportRequest or an equivalent Hash.
Parameters
def fetch_framework_compliance_report(name: nil, end_time: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport
Pass arguments to fetch_framework_compliance_report 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 name of the framework compliance report to retrieve.
  • end_time (::Google::Protobuf::Timestamp, ::Hash) — Optional. The end time of the report.
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/cloud_security_compliance/v1"

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

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

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

# The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.
p result

#initialize

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

Create a new Monitoring client object.

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

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

#list_control_compliance_summaries

def list_control_compliance_summaries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>
def list_control_compliance_summaries(parent: nil, end_time: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>

Lists the control compliance summary for a given scope.

Overloads
def list_control_compliance_summaries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>
Pass arguments to list_control_compliance_summaries via a request object, either of type ListControlComplianceSummariesRequest or an equivalent Hash.
Parameters
def list_control_compliance_summaries(parent: nil, end_time: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>
Pass arguments to list_control_compliance_summaries 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 scope for the framework overview page.
  • end_time (::Google::Protobuf::Timestamp, ::Hash) — Optional. The end time of the control compliance summary.
  • page_size (::Integer) — Optional. The requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.
  • page_token (::String) — Optional. A token that identifies the page of results that the server should return.
  • filter (::String) — Optional. The filtering results.
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/cloud_security_compliance/v1"

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

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

# Call the list_control_compliance_summaries method.
result = client.list_control_compliance_summaries 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::CloudSecurityCompliance::V1::ControlComplianceSummary.
  p item
end

#list_finding_summaries

def list_finding_summaries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>
def list_finding_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>

Lists the finding summary by category for a given scope.

Overloads
def list_finding_summaries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>
Pass arguments to list_finding_summaries via a request object, either of type ListFindingSummariesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::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_finding_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>
Pass arguments to list_finding_summaries 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 scope for the framework overview page.
  • page_size (::Integer) — Optional. The requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.
  • page_token (::String) — Optional. A token that identifies the page of results that the server should return.
  • filter (::String) — Optional. The filtering results.
  • end_time (::Google::Protobuf::Timestamp, ::Hash) — Optional. The end time of the finding summary.
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/cloud_security_compliance/v1"

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

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

# Call the list_finding_summaries method.
result = client.list_finding_summaries 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::CloudSecurityCompliance::V1::FindingSummary.
  p item
end

#list_framework_compliance_summaries

def list_framework_compliance_summaries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>
def list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>

Lists the framework compliance summary for a given scope.

Overloads
def list_framework_compliance_summaries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>
Pass arguments to list_framework_compliance_summaries via a request object, either of type ListFrameworkComplianceSummariesRequest or an equivalent Hash.
Parameters
def list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>
Pass arguments to list_framework_compliance_summaries 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 scope for the framework compliance summary.
  • page_size (::Integer) — Optional. The requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.
  • page_token (::String) — Optional. A token that identifies the page of results that the server should return.
  • filter (::String) — Optional. The filtering results.
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/cloud_security_compliance/v1"

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

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

# Call the list_framework_compliance_summaries method.
result = client.list_framework_compliance_summaries 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::CloudSecurityCompliance::V1::FrameworkComplianceSummary.
  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)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)