Cloud Controls Partner V1 API - Class Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client (v1.0.1)

Reference documentation and code samples for the Cloud Controls Partner V1 API class Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.

Client for the CloudControlsPartnerMonitoring service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

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

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

#configure

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

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

#get_violation

def get_violation(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::Violation
def get_violation(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::Violation

Gets details of a single Violation.

Overloads
def get_violation(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::Violation
Pass arguments to get_violation via a request object, either of type GetViolationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::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_violation(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::Violation
Pass arguments to get_violation 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. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}
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_controls_partner/v1"

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

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

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

# The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation.
p result

#initialize

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

Create a new CloudControlsPartnerMonitoring client object.

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

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

#list_violations

def list_violations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>
def list_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>

Lists Violations for a workload Callers may also choose to read across multiple Customers or for a single customer as per AIP-159 by using '-' (the hyphen or dash character) as a wildcard character instead of {customer} & {workload}. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}

Overloads
def list_violations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>
Pass arguments to list_violations via a request object, either of type ListViolationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>
Pass arguments to list_violations 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. Parent resource Format organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}
  • page_size (::Integer) — Optional. The maximum number of customers row to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned.
  • page_token (::String) — Optional. A page token, received from a previous ListViolations call. Provide this to retrieve the subsequent page.
  • filter (::String) — Optional. Filtering results
  • order_by (::String) — Optional. Hint for how to order the results
  • interval (::Google::Type::Interval, ::Hash) — Optional. Specifies the interval for retrieving violations. if unspecified, all violations will be returned.
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/cloud_controls_partner/v1"

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

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

# Call the list_violations method.
result = client.list_violations 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::CloudControlsPartner::V1::Violation.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)