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

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

REST client for the Config service.

Config Service manages compliance frameworks, cloud controls, and their configurations.

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the Config 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_cloud_control

def create_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
def create_cloud_control(parent: nil, cloud_control_id: nil, cloud_control: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl

Creates a custom cloud control in a given parent resource. You can't create built-in cloud controls because those are managed by Google.

Overloads
def create_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
Pass arguments to create_cloud_control via a request object, either of type Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::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_cloud_control(parent: nil, cloud_control_id: nil, cloud_control: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
Pass arguments to create_cloud_control 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 name, in the format organizations/{organization}/locations/{location}. The only supported location is global.
  • cloud_control_id (::String) — Required. The identifier for the cloud control, which is the last segment of the cloud control name. The format is ^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$.
  • cloud_control (::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash) — Required. The cloud control that's being created.
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::Config::Rest::Client.new

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

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

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

#create_framework

def create_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
def create_framework(parent: nil, framework_id: nil, framework: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework

Creates a custom framework in a given parent resource. You can't create built-in frameworks because those are managed by Google.

Overloads
def create_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
Pass arguments to create_framework via a request object, either of type Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::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(parent: nil, framework_id: nil, framework: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
Pass arguments to create_framework 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 name, in the format organizations/{organization}/locations/{location}. The only supported location is global.
  • framework_id (::String) — Required. The identifier (ID) of the framework. The ID is not the full name of the framework; it's the last part of the full name of the framework.
  • framework (::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash) — Required. The resource being created.
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::Config::Rest::Client.new

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

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

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

#delete_cloud_control

def delete_cloud_control(request, options = nil) -> ::Google::Protobuf::Empty
def delete_cloud_control(name: nil) -> ::Google::Protobuf::Empty

Deletes a custom cloud control, including all its major and minor revisions. Consider the following:

  • You can't delete built-in cloud controls. You can only delete cloud controls with type CUSTOM.
  • You can't delete cloud controls if any of the versions are referenced by a framework.
  • You can't restore a deleted cloud control. This action is permanent.
Overloads
def delete_cloud_control(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_cloud_control via a request object, either of type DeleteCloudControlRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::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_cloud_control(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_cloud_control 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. The name of the cloud control to delete, in the format organizations/{organization}/locations/{location}/CloudControls/{CloudControl}. The only supported location is global.
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::Config::Rest::Client.new

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_framework

def delete_framework(request, options = nil) -> ::Google::Protobuf::Empty
def delete_framework(name: nil) -> ::Google::Protobuf::Empty

Deletes a custom framework, including all its major and minor revisions. Consider the following:

  • You can't delete built-in frameworks. You can only delete frameworks with type CUSTOM.
  • You can't delete frameworks that are deployed to a resource.
  • You can't restore a deleted framework. This action is permanent.
Overloads
def delete_framework(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_framework via a request object, either of type DeleteFrameworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::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(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_framework 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. The name of the resource, in the format organizations/{organization}/locations/{location}/frameworks/{framework}. The only supported location is global.
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::Config::Rest::Client.new

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

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

# The returned object is of type Google::Protobuf::Empty.
p result

#get_cloud_control

def get_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
def get_cloud_control(name: nil, major_revision_id: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl

Gets details about a cloud control. This method retrieves the latest major version of a cloud control that you identify by name.

By default, the latest major version of the cloud control is returned. To retrieve a specific major version, include major_revision_id in the request.

Overloads
def get_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
Pass arguments to get_cloud_control via a request object, either of type GetCloudControlRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::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(name: nil, major_revision_id: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
Pass arguments to get_cloud_control 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. The name of the cloud control to retrieve, in the format organizations/{organization}/locations/{location}/cloudControls/{cloud_control}. The only supported location is global.
  • major_revision_id (::Integer) — Optional. The major version of the cloud control to retrieve. If not specified, the most recently updated revision_id is retrieved.
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::Config::Rest::Client.new

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

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

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

#get_framework

def get_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
def get_framework(name: nil, major_revision_id: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework

Gets details about a framework. This method retrieves the latest major version of the framework.

To retrieve a specific major version, include major_revision_id in the request.

Overloads
def get_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
Pass arguments to get_framework via a request object, either of type GetFrameworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::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(name: nil, major_revision_id: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
Pass arguments to get_framework 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. The name of the framework to retrieve, in the format organizations/{organization}/locations/{location}/frameworks/{framework_id} The only supported location is global.
  • major_revision_id (::Integer) — Optional. The framework major version to retrieve. If not specified, the most recently updated revision_id is retrieved.
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::Config::Rest::Client.new

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

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

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

#initialize

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

Create a new Config REST client object.

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

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

#list_cloud_controls

def list_cloud_controls(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>
def list_cloud_controls(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>

Lists the cloud controls (both built-in and custom) that are available in a given parent resource. The latest major version of each cloud control is returned. This method supports pagination.

Overloads
def list_cloud_controls(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>
Pass arguments to list_cloud_controls via a request object, either of type ListCloudControlsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::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_controls(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>
Pass arguments to list_cloud_controls 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 name, in the format organizations/{organization}/locations/{location}. The only supported location is global.
  • page_size (::Integer) — Optional. The maximum number of cloud controls to return. The default value is 500.

    If you exceed the maximum value of 1000, then the service uses the maximum value.

  • page_token (::String) — Optional. A pagination token that's returned from a previous request to list cloud controls. Provide this token to retrieve the next page of results.

    When paginating, the parent that you provide to the ListCloudControls request must match the call that provided the page token.

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::Config::Rest::Client.new

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

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

#list_frameworks

def list_frameworks(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>
def list_frameworks(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>

Lists the frameworks (both built-in and custom) that are available within the parent resource. The latest major version of each framework is returned. This method supports pagination.

Overloads
def list_frameworks(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>
Pass arguments to list_frameworks via a request object, either of type ListFrameworksRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::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_frameworks(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>
Pass arguments to list_frameworks 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 name, in the format organizations/{organization}/locations/{location}. The only supported location is global.
  • page_size (::Integer) — Optional. The maximum number of frameworks to return. The default value is 500.

    If you exceed the maximum value of 1000, then the service uses the maximum value.

  • page_token (::String) — Optional. A pagination token returned from a previous request to list frameworks. Provide this token to retrieve the next page of results.
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::Config::Rest::Client.new

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

# Call the list_frameworks method.
result = client.list_frameworks 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::Framework.
  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)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_cloud_control

def update_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
def update_cloud_control(update_mask: nil, cloud_control: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl

Updates a custom cloud control. This method allows for partial updates of a cloud control. Use the update_mask to specify which fields to update. Consider the following:

  • If you provide an update_mask, only the fields that are specified in the mask are updated.
  • If you don't provide an update_mask, all the fields that are present in the request's cloud_control body are used to overwrite the existing resource.

You can only update cloud controls with the CUSTOM type. A successful update creates a new version of the cloud control.

Overloads
def update_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
Pass arguments to update_cloud_control via a request object, either of type UpdateCloudControlRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::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 update_cloud_control(update_mask: nil, cloud_control: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl
Pass arguments to update_cloud_control 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) —

    Optional. Use a field mask to specify the fields to be overwritten in the cloud control during the update. The fields that you specify in the update_mask are relative to the cloud control, not the full request. A field is overwritten if it is in the mask. If you don't provide a mask, all fields in the request are updated.

    You can update the following fields:

    • Display name
    • Description
    • Parameters
    • Rules
    • Parameter specification
  • cloud_control (::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash) — Required. The cloud control that you're updating.
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::Config::Rest::Client.new

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

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

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

#update_framework

def update_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
def update_framework(update_mask: nil, framework: nil, major_revision_id: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework

Updates a custom framework. This method allows for partial updates of a framework. Use the update_mask to specify which fields to update. Consider the following:

  • If you provide an update_mask, only the fields that are specified in the mask are updated.
  • If you don't provide an update_mask, all the fields that are present in the request's framework body are used to overwrite the existing resource.

You can only update frameworks with the CUSTOM type. A successful update creates a new version of the framework.

Overloads
def update_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
Pass arguments to update_framework via a request object, either of type UpdateFrameworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::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 update_framework(update_mask: nil, framework: nil, major_revision_id: nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Framework
Pass arguments to update_framework 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. A field mask is used to specify the fields to be overwritten in the framework resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If you don't provide a mask then all fields present in the request will be overwritten.
  • framework (::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash) — Required. The resource that is being updated.
  • major_revision_id (::Integer) — Optional. The major version ID of the framework to update.
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::Config::Rest::Client.new

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

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

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