Class: Google::Apis::SecuritypostureV1::SecurityPostureService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/securityposture_v1/service.rb

Overview

Security Posture API

Defines, assesses, and monitors the overall status of your security in Google Cloud. You can use security postures to evaluate your current cloud security against defined benchmarks and help maintain the level of security that your organization requires.

Examples:

require 'google/apis/securityposture_v1'

Securityposture = Google::Apis::SecuritypostureV1 # Alias the module
service = Securityposture::SecurityPostureService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://securityposture.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSecurityPostureService

Returns a new instance of SecurityPostureService.



50
51
52
53
54
55
# File 'lib/google/apis/securityposture_v1/service.rb', line 50

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-securityposture_v1',
        client_version: Google::Apis::SecuritypostureV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



43
44
45
# File 'lib/google/apis/securityposture_v1/service.rb', line 43

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



48
49
50
# File 'lib/google/apis/securityposture_v1/service.rb', line 48

def quota_user
  @quota_user
end

Instance Method Details

#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Empty

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1 , corresponding to Code.CANCELLED.

Parameters:

  • name (String)

    The name of the operation resource to be cancelled.

  • cancel_operation_request_object (Google::Apis::SecuritypostureV1::CancelOperationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



171
172
173
174
175
176
177
178
179
180
181
# File 'lib/google/apis/securityposture_v1/service.rb', line 171

def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.request_representation = Google::Apis::SecuritypostureV1::CancelOperationRequest::Representation
  command.request_object = cancel_operation_request_object
  command.response_representation = Google::Apis::SecuritypostureV1::Empty::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_ia_c_validation_report(parent, create_ia_c_validation_report_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Validates a specified infrastructure-as-code (IaC) configuration, and creates a Report with the validation results. Only Terraform configurations are supported. Only modified assets are validated.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • create_ia_c_validation_report_request_object (Google::Apis::SecuritypostureV1::CreateIaCValidationReportRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



878
879
880
881
882
883
884
885
886
887
888
# File 'lib/google/apis/securityposture_v1/service.rb', line 878

def create_ia_c_validation_report(parent, create_ia_c_validation_report_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/reports:createIaCValidationReport', options)
  command.request_representation = Google::Apis::SecuritypostureV1::CreateIaCValidationReportRequest::Representation
  command.request_object = create_ia_c_validation_report_request_object
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_organization_location_posture(parent, posture_object = nil, posture_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Creates a new Posture.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • posture_object (Google::Apis::SecuritypostureV1::Posture) (defaults to: nil)
  • posture_id (String) (defaults to: nil)

    Required. An identifier for the posture.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/google/apis/securityposture_v1/service.rb', line 596

def create_organization_location_posture(parent, posture_object = nil, posture_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/postures', options)
  command.request_representation = Google::Apis::SecuritypostureV1::Posture::Representation
  command.request_object = posture_object
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['postureId'] = posture_id unless posture_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_organization_location_posture_deployment(parent, posture_deployment_object = nil, posture_deployment_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Creates a new PostureDeployment in a given project and location.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • posture_deployment_object (Google::Apis::SecuritypostureV1::PostureDeployment) (defaults to: nil)
  • posture_deployment_id (String) (defaults to: nil)

    Required. An identifier for the posture deployment.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/google/apis/securityposture_v1/service.rb', line 320

def create_organization_location_posture_deployment(parent, posture_deployment_object = nil, posture_deployment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/postureDeployments', options)
  command.request_representation = Google::Apis::SecuritypostureV1::PostureDeployment::Representation
  command.request_object = posture_deployment_object
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['postureDeploymentId'] = posture_deployment_id unless posture_deployment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_organization_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Empty

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code. UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation resource to be deleted.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



206
207
208
209
210
211
212
213
214
# File 'lib/google/apis/securityposture_v1/service.rb', line 206

def delete_organization_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Empty::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_organization_location_posture(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Deletes all revisions of a Posture. You can only delete a posture if none of its revisions are deployed.

Parameters:

  • name (String)

    Required. The name of the Posture, in the format organizations/organization/ locations/global/postures/posture_id``.

  • etag (String) (defaults to: nil)

    Optional. An opaque identifier for the current version of the posture. 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 error. If you omit this value, then the posture is deleted regardless of its current etag value.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



636
637
638
639
640
641
642
643
644
645
# File 'lib/google/apis/securityposture_v1/service.rb', line 636

def delete_organization_location_posture(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['etag'] = etag unless etag.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_organization_location_posture_deployment(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Deletes a PostureDeployment.

Parameters:

  • name (String)

    Required. The name of the posture deployment, in the format organizations/ organization/locations/global/postureDeployments/posture_id``.

  • etag (String) (defaults to: nil)

    Optional. An opaque identifier for the current version of the posture deployment. 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 error. If you omit this value, then the posture deployment is deleted regardless of its current etag value.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



360
361
362
363
364
365
366
367
368
369
# File 'lib/google/apis/securityposture_v1/service.rb', line 360

def delete_organization_location_posture_deployment(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['etag'] = etag unless etag.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#extract_posture(parent, extract_posture_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Extracts existing policies from an organization, folder, or project, and applies them to another organization, folder, or project as a Posture. If the other organization, folder, or project already has a posture, then the result of the long-running operation is an ALREADY_EXISTS error.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • extract_posture_request_object (Google::Apis::SecuritypostureV1::ExtractPostureRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



672
673
674
675
676
677
678
679
680
681
682
# File 'lib/google/apis/securityposture_v1/service.rb', line 672

def extract_posture(parent, extract_posture_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/postures:extract', options)
  command.request_representation = Google::Apis::SecuritypostureV1::ExtractPostureRequest::Representation
  command.request_object = extract_posture_request_object
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_organization_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Location

Gets information about a location.

Parameters:

  • name (String)

    Resource name for the location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



77
78
79
80
81
82
83
84
85
# File 'lib/google/apis/securityposture_v1/service.rb', line 77

def get_organization_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Location::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Location
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_organization_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



237
238
239
240
241
242
243
244
245
# File 'lib/google/apis/securityposture_v1/service.rb', line 237

def get_organization_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_organization_location_posture(name, revision_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Posture

Gets a single revision of a Posture.

Parameters:

  • name (String)

    Required. The name of the Posture, in the format organizations/organization/ locations/global/postures/posture_id``.

  • revision_id (String) (defaults to: nil)

    Optional. The posture revision to retrieve. If not specified, the most recently updated revision is retrieved.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



708
709
710
711
712
713
714
715
716
717
# File 'lib/google/apis/securityposture_v1/service.rb', line 708

def get_organization_location_posture(name, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Posture::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Posture
  command.params['name'] = name unless name.nil?
  command.query['revisionId'] = revision_id unless revision_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_organization_location_posture_deployment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::PostureDeployment

Gets details for a PostureDeployment.

Parameters:

  • name (String)

    Required. The name of the PostureDeployment, in the format organizations/ organization/locations/global/postureDeployments/posture_deployment_id``.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



392
393
394
395
396
397
398
399
400
# File 'lib/google/apis/securityposture_v1/service.rb', line 392

def get_organization_location_posture_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::PostureDeployment::Representation
  command.response_class = Google::Apis::SecuritypostureV1::PostureDeployment
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_organization_location_posture_template(name, revision_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::PostureTemplate

Gets a single revision of a PostureTemplate.

Parameters:

  • name (String)

    Required. The name of the PostureTemplate, in the format organizations/ organization/locations/global/postureTemplates/posture_template``.

  • revision_id (String) (defaults to: nil)

    Optional. The posture template revision to retrieve. If not specified, the most recently updated revision is retrieved.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



517
518
519
520
521
522
523
524
525
526
# File 'lib/google/apis/securityposture_v1/service.rb', line 517

def get_organization_location_posture_template(name, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::PostureTemplate::Representation
  command.response_class = Google::Apis::SecuritypostureV1::PostureTemplate
  command.params['name'] = name unless name.nil?
  command.query['revisionId'] = revision_id unless revision_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_organization_location_report(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Report

Gets details for a Report.

Parameters:

  • name (String)

    Required. The name of the report, in the format organizations/organization/ locations/global/reports/report_id``.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



911
912
913
914
915
916
917
918
919
# File 'lib/google/apis/securityposture_v1/service.rb', line 911

def get_organization_location_report(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::SecuritypostureV1::Report::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Report
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • return_partial_success (Boolean) (defaults to: nil)

    When set to true, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse. unreachable field. This can only be true when reading across collections. For example, when parent is set to "projects/example/locations/-". This field is not supported by default and will result in an UNIMPLEMENTED error if set unless explicitly documented otherwise in service or product specific documentation.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/google/apis/securityposture_v1/service.rb', line 282

def list_organization_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}/operations', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListOperationsResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_location_posture_deployments(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse

Lists every PostureDeployment in a project and location.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • filter (String) (defaults to: nil)

    Optional. A filter to apply to the list of postures, in the format defined in AIP-160: Filtering.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of posture deployments 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) (defaults to: nil)

    Optional. A pagination token returned from a previous request to list posture deployments. Provide this token to retrieve the next page of results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/google/apis/securityposture_v1/service.rb', line 433

def list_organization_location_posture_deployments(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/postureDeployments', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListPostureDeploymentsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_location_posture_revisions(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse

Lists all revisions of a single Posture.

Parameters:

  • name (String)

    Required. The name of the Posture, in the format organizations/organization/ locations/global/postures/posture_id``.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of posture revisions 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) (defaults to: nil)

    Optional. A pagination token from a previous request to list posture revisions. Provide this token to retrieve the next page of results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/apis/securityposture_v1/service.rb', line 791

def list_organization_location_posture_revisions(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}:listRevisions', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListPostureRevisionsResponse
  command.params['name'] = name unless name.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_location_posture_templates(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse

Lists every PostureTemplate in a given organization and location.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • filter (String) (defaults to: nil)

    Optional. A filter to apply to the list of postures, in the format defined in AIP-160: Filtering.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of posture templates 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) (defaults to: nil)

    Optional. A pagination token returned from a previous request to list posture templates. Provide this token to retrieve the next page of results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/google/apis/securityposture_v1/service.rb', line 559

def list_organization_location_posture_templates(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/postureTemplates', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListPostureTemplatesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_location_postures(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListPosturesResponse

Lists the most recent revisions of all Posture resources in a specified organization and location.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • filter (String) (defaults to: nil)

    Optional. A filter to apply to the list of postures, in the format defined in AIP-160: Filtering.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of postures 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) (defaults to: nil)

    A pagination token returned from a previous request to list postures. Provide this token to retrieve the next page of results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



750
751
752
753
754
755
756
757
758
759
760
761
# File 'lib/google/apis/securityposture_v1/service.rb', line 750

def list_organization_location_postures(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/postures', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListPosturesResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListPosturesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_location_reports(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListReportsResponse

Lists every Report in a given organization and location.

Parameters:

  • parent (String)

    Required. The parent resource name, in the format organizations/organization /locations/global.

  • filter (String) (defaults to: nil)

    Optional. A filter to apply to the list of reports, in the format defined in AIP-160: Filtering.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of reports 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) (defaults to: nil)

    Optional. A pagination token returned from a previous request to list reports. Provide this token to retrieve the next page of results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



952
953
954
955
956
957
958
959
960
961
962
963
# File 'lib/google/apis/securityposture_v1/service.rb', line 952

def list_organization_location_reports(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/reports', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListReportsResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListReportsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_organization_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::ListLocationsResponse

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project- specific locations: If name follows the format projects/project`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as thename` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.

Parameters:

  • name (String)

    The resource that owns the locations collection, if applicable.

  • extra_location_types (Array<String>, String) (defaults to: nil)

    Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage.

  • filter (String) (defaults to: nil)

    A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return. If not set, the service selects a default.

  • page_token (String) (defaults to: nil)

    A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/google/apis/securityposture_v1/service.rb', line 129

def list_organization_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}/locations', options)
  command.response_representation = Google::Apis::SecuritypostureV1::ListLocationsResponse::Representation
  command.response_class = Google::Apis::SecuritypostureV1::ListLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_organization_location_posture(name, posture_object = nil, revision_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Updates a revision of an existing Posture. If the posture revision that you update is currently deployed, then a new revision of the posture is created. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture: 1. Call GetPosture to get the current version of the posture. 2. Update the fields in the posture as needed. 3. Call UpdatePosture to update the posture. Ensure that your request includes the etag value from the GetPosture response. Important: If you omit the etag when you call UpdatePosture, then the updated posture unconditionally overwrites the existing posture.

Parameters:

  • name (String)

    Required. Identifier. The name of the posture, in the format organizations/ organization/locations/global/postures/posture_id``.

  • posture_object (Google::Apis::SecuritypostureV1::Posture) (defaults to: nil)
  • revision_id (String) (defaults to: nil)

    Required. The revision ID of the posture to update. If the posture revision that you update is currently deployed, then a new revision of the posture is created.

  • update_mask (String) (defaults to: nil)

    Required. The fields in the Posture to update. You can update only the following fields: * Posture.description * Posture.policy_sets * Posture.state

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/google/apis/securityposture_v1/service.rb', line 840

def patch_organization_location_posture(name, posture_object = nil, revision_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::SecuritypostureV1::Posture::Representation
  command.request_object = posture_object
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['revisionId'] = revision_id unless revision_id.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_organization_location_posture_deployment(name, posture_deployment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecuritypostureV1::Operation

Updates an existing PostureDeployment. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture deployment: 1. Call GetPostureDeployment to get the current version of the deployment. 2. Update the fields in the deployment as needed. 3. Call UpdatePostureDeployment to update the deployment. Ensure that your request includes the etag value from the GetPostureDeployment response. ** Important:** If you omit the etag when you call UpdatePostureDeployment, then the updated deployment unconditionally overwrites the existing deployment.

Parameters:

  • name (String)

    Required. Identifier. The name of the posture deployment, in the format organizations/organization/locations/global/postureDeployments/ deployment_id``.

  • posture_deployment_object (Google::Apis::SecuritypostureV1::PostureDeployment) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. The fields in the PostureDeployment to update. You can update only the following fields: * PostureDeployment.posture_id * PostureDeployment. posture_revision_id

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/google/apis/securityposture_v1/service.rb', line 480

def patch_organization_location_posture_deployment(name, posture_deployment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::SecuritypostureV1::PostureDeployment::Representation
  command.request_object = posture_deployment_object
  command.response_representation = Google::Apis::SecuritypostureV1::Operation::Representation
  command.response_class = Google::Apis::SecuritypostureV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end