Reference documentation and code samples for the Cloud Security Compliance V1 API class Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.
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::ConfigurationConfigure the Deployment Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Deployment clients ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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::OperationCreates a framework deployment in a given parent resource. A framework deployment lets you assign a particular framework version to an organization, folder, or project so that you can control and monitor those resources using the framework's cloud controls.
def create_framework_deployment(request, options = nil) -> ::Gapic::Operationcreate_framework_deployment via a request object, either of type
CreateFrameworkDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::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 create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) -> ::Gapic::Operationcreate_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).
-
parent (::String) — Required. The parent resource of the framework deployment in the format
organizations/{organization}/locations/{location}. Only the global location is supported. - framework_deployment_id (::String) — Optional. An identifier for the framework deployment that's unique in scope of the parent. If you don't specify a value, then a random UUID is generated.
- framework_deployment (::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash) — Required. The framework deployment that you're creating.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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::OperationDeletes a framework deployment.
def delete_framework_deployment(request, options = nil) -> ::Gapic::Operationdelete_framework_deployment via a request object, either of type
Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::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 delete_framework_deployment(name: nil, etag: nil) -> ::Gapic::Operationdelete_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).
-
name (::String) — Required. The name of the framework deployment that you want to delete,
in the format
organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}. The only supported location isglobal. -
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
etagvalue.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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::CloudControlDeploymentGets details about a cloud control deployment.
def get_cloud_control_deployment(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeploymentget_cloud_control_deployment via a request object, either of type
GetCloudControlDeploymentRequest or an equivalent Hash.
- request (::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::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_cloud_control_deployment(name: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeploymentget_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).
-
name (::String) — Required. The name for the cloud control deployment, in the format
organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}. The only supported location isglobal.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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::FrameworkDeploymentGets details about a framework deployment.
def get_framework_deployment(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeploymentget_framework_deployment via a request object, either of type
GetFrameworkDeploymentRequest or an equivalent Hash.
- 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::FrameworkDeploymentget_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).
-
name (::String) — Required. The name of the framework deployment, in the format
organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}. The only supported location isglobal.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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| ... } -> ClientCreate a new Deployment client object.
- (config) — Configure the Deployment client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new # Create a client using a custom configuration client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| config.timeout = 10.0 end
#list_cloud_control_deployments
def list_cloud_control_deployments(request, options = nil) -> ::Gapic::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::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>Lists the cloud conrol deployments in a given parent resource.
def list_cloud_control_deployments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>list_cloud_control_deployments via a request object, either of type
ListCloudControlDeploymentsRequest or an equivalent Hash.
- request (::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::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_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>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).
-
parent (::String) — Required. The parent resource for the cloud control deployment, in the
format
organizations/{organization}/locations/{location}. The only supported location isglobal. - page_size (::Integer) — Optional. The requested page size. The server might return fewer items than you 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 filter to apply on the resource, as defined by AIP-160: Filtering.
-
order_by (::String) — Optional. The sort order for the results. The following values are
supported:
namename desc
If you do not specify a value, then the results are not sorted.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>
def list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>Lists the framework deployments in a given parent resource.
def list_framework_deployments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>list_framework_deployments via a request object, either of type
ListFrameworkDeploymentsRequest or an equivalent Hash.
- request (::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::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_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>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).
-
parent (::String) — Required. The parent resource of the framework deployment, in the format
organizations/{organization}/locations/{location}. The only supported location isglobal. - 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 a page of results the server should return.
- filter (::String) — Optional. The filter to be applied on the resource, as defined by AIP-160: Filtering.
-
order_by (::String) — Optional. The sort order for the results. The following values are
supported:
namename desc
If you do not specify a value, then the results are not sorted.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)