Reference documentation and code samples for the Cloud Controls Partner V1BETA API class Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.
REST 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CloudControlsPartnerMonitoring clients ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#get_violation
def get_violation(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1beta::Violation
def get_violation(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1beta::Violation
Gets details of a single Violation.
def get_violation(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1beta::Violation
get_violation
via a request object, either of type
GetViolationRequest or an equivalent Hash.
- request (::Google::Cloud::CloudControlsPartner::V1beta::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::V1beta::Violation
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).
-
name (::String) — Required. Format:
organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudControlsPartner::V1beta::Violation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/cloud_controls_partner/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new # Call the get_violation method. result = client.get_violation request # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new CloudControlsPartnerMonitoring REST client object.
- (config) — Configure the CloudControlsPartnerMonitoring client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| config.timeout = 10.0 end
#list_violations
def list_violations(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse
def list_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) -> ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse
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}
def list_violations(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse
list_violations
via a request object, either of type
ListViolationsRequest or an equivalent Hash.
- request (::Google::Cloud::CloudControlsPartner::V1beta::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) -> ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse
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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/cloud_controls_partner/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::CloudControlsPartner::V1beta::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::V1beta::Violation. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)