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- (config) — Configure the Client client.
- config (Client::Configuration)
# 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::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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::CloudControlCreates a custom cloud control in a given parent resource. You can't create built-in cloud controls because those are managed by Google.
def create_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlcreate_cloud_control via a request object, either of type
Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest or an equivalent Hash.
- 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::CloudControlcreate_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).
-
parent (::String) — Required. The parent resource name, in the format
organizations/{organization}/locations/{location}. The only supported location isglobal. -
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudSecurityCompliance::V1::CloudControl)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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::FrameworkCreates a custom framework in a given parent resource. You can't create built-in frameworks because those are managed by Google.
def create_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Frameworkcreate_framework via a request object, either of type
Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest or an equivalent Hash.
- 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::Frameworkcreate_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).
-
parent (::String) — Required. The parent resource name, in the format
organizations/{organization}/locations/{location}. The only supported location isglobal. - 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudSecurityCompliance::V1::Framework)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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::EmptyDeletes 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.
def delete_cloud_control(request, options = nil) -> ::Google::Protobuf::Emptydelete_cloud_control via a request object, either of type
DeleteCloudControlRequest or an equivalent Hash.
- 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::Emptydelete_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).
-
name (::String) — Required. The name of the cloud control to delete, in the format
organizations/{organization}/locations/{location}/CloudControls/{CloudControl}. The only supported location isglobal.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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::EmptyDeletes 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.
def delete_framework(request, options = nil) -> ::Google::Protobuf::Emptydelete_framework via a request object, either of type
DeleteFrameworkRequest or an equivalent Hash.
- 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::Emptydelete_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).
-
name (::String) — Required. The name of the resource, in the format
organizations/{organization}/locations/{location}/frameworks/{framework}. The only supported location isglobal.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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::CloudControlGets 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.
def get_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlget_cloud_control via a request object, either of type
GetCloudControlRequest or an equivalent Hash.
- 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::CloudControlget_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).
-
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 isglobal. -
major_revision_id (::Integer) — Optional. The major version of the cloud control to retrieve. If not
specified, the most recently updated
revision_idis retrieved.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudSecurityCompliance::V1::CloudControl)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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::FrameworkGets 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.
def get_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Frameworkget_framework via a request object, either of type
GetFrameworkRequest or an equivalent Hash.
- 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::Frameworkget_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).
-
name (::String) — Required. The name of the framework to retrieve, in the format
organizations/{organization}/locations/{location}/frameworks/{framework_id}The only supported location isglobal. -
major_revision_id (::Integer) — Optional. The framework major version to retrieve. If not specified, the
most recently updated
revision_idis retrieved.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudSecurityCompliance::V1::Framework)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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| ... } -> ClientCreate a new Config REST client object.
- (config) — Configure the Config client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_cloud_controls(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>list_cloud_controls via a request object, either of type
ListCloudControlsRequest or an equivalent Hash.
- 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>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).
-
parent (::String) — Required. The parent resource name, in the format
organizations/{organization}/locations/{location}. The only supported location isglobal. -
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>)
- (::Google::Cloud::Error) — if the REST call 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::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.
def list_frameworks(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>list_frameworks via a request object, either of type
ListFrameworksRequest or an equivalent Hash.
- 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>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).
-
parent (::String) — Required. The parent resource name, in the format
organizations/{organization}/locations/{location}. The only supported location isglobal. -
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>)
- (::Google::Cloud::Error) — if the REST call 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::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::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (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::CloudControlUpdates 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'scloud_controlbody 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.
def update_cloud_control(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlupdate_cloud_control via a request object, either of type
UpdateCloudControlRequest or an equivalent Hash.
- 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::CloudControlupdate_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).
-
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_maskare 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudSecurityCompliance::V1::CloudControl)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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::FrameworkUpdates 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'sframeworkbody 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.
def update_framework(request, options = nil) -> ::Google::Cloud::CloudSecurityCompliance::V1::Frameworkupdate_framework via a request object, either of type
UpdateFrameworkRequest or an equivalent Hash.
- 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::Frameworkupdate_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).
-
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_maskare 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::CloudSecurityCompliance::V1::Framework)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call 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::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