Cloud Controls Partner V1 API - Class Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client (v1.1.0)

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

REST client for the CloudControlsPartnerCore service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the CloudControlsPartnerCore 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_customer

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

Gets details of a single customer

Overloads
def get_customer(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::Customer
Pass arguments to get_customer via a request object, either of type GetCustomerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::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_customer(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::Customer
Pass arguments to get_customer 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}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

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

#get_ekm_connections

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

Gets the EKM connections associated with a workload

Overloads
def get_ekm_connections(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::EkmConnections
Pass arguments to get_ekm_connections via a request object, either of type GetEkmConnectionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::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_ekm_connections(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::EkmConnections
Pass arguments to get_ekm_connections 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}/ekmConnections
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

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

#get_partner

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

Get details of a Partner.

Overloads
def get_partner(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::Partner
Pass arguments to get_partner via a request object, either of type GetPartnerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::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_partner(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::Partner
Pass arguments to get_partner 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}/partner
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

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

#get_partner_permissions

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

Gets the partner permissions granted for a workload

Overloads
def get_partner_permissions(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions
Pass arguments to get_partner_permissions via a request object, either of type GetPartnerPermissionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::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_partner_permissions(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions
Pass arguments to get_partner_permissions 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 to get in the format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

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

#get_workload

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

Gets details of a single workload

Overloads
def get_workload(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::Workload
Pass arguments to get_workload via a request object, either of type GetWorkloadRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::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_workload(name: nil) -> ::Google::Cloud::CloudControlsPartner::V1::Workload
Pass arguments to get_workload 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}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

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

#initialize

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

Create a new CloudControlsPartnerCore REST client object.

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

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

#list_access_approval_requests

def list_access_approval_requests(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse
def list_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse

Deprecated: Only returns access approval requests directly associated with an assured workload folder.

Overloads
def list_access_approval_requests(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse
Pass arguments to list_access_approval_requests via a request object, either of type ListAccessApprovalRequestsRequest or an equivalent Hash.
Parameters
def list_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse
Pass arguments to list_access_approval_requests 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 access requests to return. The service may return fewer than this value. If unspecified, at most 500 access requests will be returned.
  • page_token (::String) — Optional. A page token, received from a previous ListAccessApprovalRequests call. Provide this to retrieve the subsequent page.
  • filter (::String) — Optional. Filtering results.
  • order_by (::String) — Optional. Hint for how to order the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

#list_customers

def list_customers(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse
def list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse

Lists customers of a partner identified by its Google Cloud organization ID

Overloads
def list_customers(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse
Pass arguments to list_customers via a request object, either of type ListCustomersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse
Pass arguments to list_customers 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}
  • page_size (::Integer) — The maximum number of Customers to return. The service may return fewer than this value. If unspecified, at most 500 Customers will be returned.
  • page_token (::String) — A page token, received from a previous ListCustomers call. Provide this to retrieve the subsequent page.
  • filter (::String) — Optional. Filtering results
  • order_by (::String) — Optional. Hint for how to order the results
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

#list_workloads

def list_workloads(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse
def list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse

Lists customer workloads for a given customer org id

Overloads
def list_workloads(request, options = nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse
Pass arguments to list_workloads via a request object, either of type ListWorkloadsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse
Pass arguments to list_workloads 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}
  • page_size (::Integer) — The maximum number of workloads to return. The service may return fewer than this value. If unspecified, at most 500 workloads will be returned.
  • page_token (::String) — A page token, received from a previous ListWorkloads call. Provide this to retrieve the subsequent page.
  • filter (::String) — Optional. Filtering results.
  • order_by (::String) — Optional. Hint for how to order the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::CloudControlsPartnerCore::Rest::Client.new

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

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

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)