Cloud Security Compliance V1 API - Class Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client (v0.1.0)

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

REST client for the Deployment service.

Deployment service allows users to manage deployments of Frameworks and Cloud Controls on a target resource.

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the Deployment 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_framework_deployment

def create_framework_deployment(request, options = nil) -> ::Gapic::Operation
def create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) -> ::Gapic::Operation

Creates a new FrameworkDeployment in a given parent resource.

Overloads
def create_framework_deployment(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_framework_deployment via a request object, either of type CreateFrameworkDeploymentRequest or an equivalent Hash.
Parameters
def create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) -> ::Gapic::Operation
Pass arguments to create_framework_deployment 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 resource of the FrameworkDeployment in the format: organizations/{organization}/locations/{location} Only global location is supported.
  • framework_deployment_id (::String) — Optional. User provided identifier. It should be unique in scope of a parent. This is optional and if not provided, a random UUID will be generated.
  • framework_deployment (::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash) — Required. The FrameworkDeployment to be created.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Deployment::Rest::Client.new

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#delete_framework_deployment

def delete_framework_deployment(request, options = nil) -> ::Gapic::Operation
def delete_framework_deployment(name: nil, etag: nil) -> ::Gapic::Operation

Deletes a single FrameworkDeployment.

Overloads
def delete_framework_deployment(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_framework_deployment via a request object, either of type Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest or an equivalent Hash.
Parameters
def delete_framework_deployment(name: nil, etag: nil) -> ::Gapic::Operation
Pass arguments to delete_framework_deployment 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. name of the FrameworkDeployment to be deleted in the following format: organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}
  • etag (::String) — Optional. An opaque identifier for the current version of the resource.

    If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an [ABORTED][google.rpc.Code.ABORTED] error.

    If you omit this value, then the resource is deleted regardless of its current etag value.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Deployment::Rest::Client.new

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#get_cloud_control_deployment

def get_cloud_control_deployment(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment
def get_cloud_control_deployment(name: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment

Gets details of a single CloudControlDeployment.

Overloads
def get_cloud_control_deployment(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment
Pass arguments to get_cloud_control_deployment via a request object, either of type GetCloudControlDeploymentRequest or an equivalent Hash.
Parameters
def get_cloud_control_deployment(name: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment
Pass arguments to get_cloud_control_deployment 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. CloudControlDeployment name in the following format: organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}
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_security_compliance/v1"

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

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

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

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

#get_framework_deployment

def get_framework_deployment(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment
def get_framework_deployment(name: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment

Gets details of a single FrameworkDeployment.

Overloads
def get_framework_deployment(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment
Pass arguments to get_framework_deployment via a request object, either of type GetFrameworkDeploymentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::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_framework_deployment(name: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment
Pass arguments to get_framework_deployment 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. FrameworkDeployment name in the following format: organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}
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_security_compliance/v1"

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

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

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

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

#initialize

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

Create a new Deployment REST client object.

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

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

#list_cloud_control_deployments

def list_cloud_control_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>
def list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>

Lists CloudControlDeployments in a given parent resource.

Overloads
def list_cloud_control_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>
Pass arguments to list_cloud_control_deployments via a request object, either of type ListCloudControlDeploymentsRequest or an equivalent Hash.
Parameters
def list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>
Pass arguments to list_cloud_control_deployments 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 of the CloudControlDeployment in the format: organizations/{organization}/locations/{location} Only global location is supported.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. Filter to be applied on the resource, defined by EBNF grammar https://google.aip.dev/assets/misc/ebnf-filtering.txt.
  • order_by (::String) — Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
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_security_compliance/v1"

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

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

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

#list_framework_deployments

def list_framework_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>
def list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>

Lists FrameworkDeployments in a given parent resource.

Overloads
def list_framework_deployments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>
Pass arguments to list_framework_deployments via a request object, either of type ListFrameworkDeploymentsRequest or an equivalent Hash.
Parameters
def list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>
Pass arguments to list_framework_deployments 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 of the FrameworkDeployment in the format: organizations/{organization}/locations/{location} Only global location is supported.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A token identifying a page of results the server should return.
  • filter (::String) — Optional. Filter to be applied on the resource, defined by EBNF grammar https://google.aip.dev/assets/misc/ebnf-filtering.txt.
  • order_by (::String) — Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Deployment::Rest::Client.new

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

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

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)