Class: Google::Apis::OsconfigV1::OSConfigService

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

Overview

OS Config API

OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.

Examples:

require 'google/apis/osconfig_v1'

Osconfig = Google::Apis::OsconfigV1 # Alias the module
service = Osconfig::OSConfigService.new

See Also:

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOSConfigService

Returns a new instance of OSConfigService.



48
49
50
51
52
53
# File 'lib/google/apis/osconfig_v1/service.rb', line 48

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-osconfig_v1',
        client_version: Google::Apis::OsconfigV1::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.



41
42
43
# File 'lib/google/apis/osconfig_v1/service.rb', line 41

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.



46
47
48
# File 'lib/google/apis/osconfig_v1/service.rb', line 46

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::OsconfigV1::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::OsconfigV1::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



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

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::OsconfigV1::CancelOperationRequest::Representation
  command.request_object = cancel_operation_request_object
  command.response_representation = Google::Apis::OsconfigV1::Empty::Representation
  command.response_class = Google::Apis::OsconfigV1::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

#cancel_patch_job(name, cancel_patch_job_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchJob

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Parameters:

  • name (String)

    Required. Name of the patch in the form projects/*/patchJobs/*

  • cancel_patch_job_request_object (Google::Apis::OsconfigV1::CancelPatchJobRequest) (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



987
988
989
990
991
992
993
994
995
996
997
# File 'lib/google/apis/osconfig_v1/service.rb', line 987

def cancel_patch_job(name, cancel_patch_job_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::OsconfigV1::CancelPatchJobRequest::Representation
  command.request_object = cancel_patch_job_request_object
  command.response_representation = Google::Apis::OsconfigV1::PatchJob::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchJob
  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_project_location_os_policy_assignment(parent, os_policy_assignment_object = nil, os_policy_assignment_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::Operation

Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see Method: projects.locations. osPolicyAssignments.operations.cancel.

Parameters:

  • parent (String)

    Required. The parent resource name in the form: projects/project/locations/ location. Note: Specify the zone of your VMs as the location.

  • os_policy_assignment_object (Google::Apis::OsconfigV1::OsPolicyAssignment) (defaults to: nil)
  • os_policy_assignment_id (String) (defaults to: nil)

    Required. The logical name of the OS policy assignment in the project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.

  • request_id (String) (defaults to: nil)

    Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a request_id is provided.

  • 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



426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/google/apis/osconfig_v1/service.rb', line 426

def create_project_location_os_policy_assignment(parent, os_policy_assignment_object = nil, os_policy_assignment_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/osPolicyAssignments', options)
  command.request_representation = Google::Apis::OsconfigV1::OsPolicyAssignment::Representation
  command.request_object = os_policy_assignment_object
  command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
  command.response_class = Google::Apis::OsconfigV1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['osPolicyAssignmentId'] = os_policy_assignment_id unless os_policy_assignment_id.nil?
  command.query['requestId'] = request_id unless request_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_project_patch_deployment(parent, patch_deployment_object = nil, patch_deployment_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchDeployment

Create an OS Config patch deployment.

Parameters:

  • parent (String)

    Required. The project to apply this patch deployment to in the form projects/* .

  • patch_deployment_object (Google::Apis::OsconfigV1::PatchDeployment) (defaults to: nil)
  • patch_deployment_id (String) (defaults to: nil)

    Required. A name for the patch deployment in the project. When creating a name the following rules apply: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.

  • 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



743
744
745
746
747
748
749
750
751
752
753
754
# File 'lib/google/apis/osconfig_v1/service.rb', line 743

def create_project_patch_deployment(parent, patch_deployment_object = nil, patch_deployment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/patchDeployments', options)
  command.request_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
  command.request_object = patch_deployment_object
  command.response_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchDeployment
  command.params['parent'] = parent unless parent.nil?
  command.query['patchDeploymentId'] = patch_deployment_id unless patch_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_project_location_os_policy_assignment(name, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::Operation

Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.

Parameters:

  • name (String)

    Required. The name of the OS policy assignment to be deleted

  • request_id (String) (defaults to: nil)

    Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a request_id is provided.

  • 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



471
472
473
474
475
476
477
478
479
480
# File 'lib/google/apis/osconfig_v1/service.rb', line 471

def delete_project_location_os_policy_assignment(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
  command.response_class = Google::Apis::OsconfigV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['requestId'] = request_id unless request_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_project_patch_deployment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::Empty

Delete an OS Config patch deployment.

Parameters:

  • name (String)

    Required. The resource name of the patch deployment in the form projects/*/ patchDeployments/*.

  • 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



777
778
779
780
781
782
783
784
785
# File 'lib/google/apis/osconfig_v1/service.rb', line 777

def delete_project_patch_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::Empty::Representation
  command.response_class = Google::Apis::OsconfigV1::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

#execute_patch_job(parent, execute_patch_job_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchJob

Patch VM instances by creating and running a patch job.

Parameters:

  • parent (String)

    Required. The project in which to run this patch in the form projects/*

  • execute_patch_job_request_object (Google::Apis::OsconfigV1::ExecutePatchJobRequest) (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



1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
# File 'lib/google/apis/osconfig_v1/service.rb', line 1020

def execute_patch_job(parent, execute_patch_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/patchJobs:execute', options)
  command.request_representation = Google::Apis::OsconfigV1::ExecutePatchJobRequest::Representation
  command.request_object = execute_patch_job_request_object
  command.response_representation = Google::Apis::OsconfigV1::PatchJob::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchJob
  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_project_location_global_project_feature_settings(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ProjectFeatureSettings

GetProjectFeatureSettings returns the VM Manager feature settings for a project.

Parameters:

  • name (String)

    Required. Name specifies the URL for the ProjectFeatureSettings resource: projects/project_id/locations/global/projectFeatureSettings.

  • 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/osconfig_v1/service.rb', line 77

def get_project_location_global_project_feature_settings(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::ProjectFeatureSettings::Representation
  command.response_class = Google::Apis::OsconfigV1::ProjectFeatureSettings
  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_project_location_instance_inventory(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::Inventory

Get inventory data for the specified VM instance. If the VM has no associated inventory, the message NOT_FOUND is returned.

Parameters:

  • name (String)

    Required. API resource name for inventory resource. Format: projects/project /locations/location/instances/instance/inventory For project, either project-number or project-id can be provided. For instance, either Compute Engine instance-id or instance-name can be provided.

  • view (String) (defaults to: nil)

    Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.

  • 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



152
153
154
155
156
157
158
159
160
161
# File 'lib/google/apis/osconfig_v1/service.rb', line 152

def get_project_location_instance_inventory(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::Inventory::Representation
  command.response_class = Google::Apis::OsconfigV1::Inventory
  command.params['name'] = name unless name.nil?
  command.query['view'] = view unless view.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_project_location_instance_os_policy_assignment_report(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::OsPolicyAssignmentReport

Get the OS policy assignment report for the specified Compute Engine VM instance.

Parameters:

  • name (String)

    Required. API resource name for OS policy assignment report. Format: / projects/project/locations/location/instances/instance/ osPolicyAssignments/assignment/report For project, either project- number or project-id can be provided. For instance_id, either Compute Engine instance-id or instance-name can be provided. For assignment_id, the OSPolicyAssignment id must be provided.

  • 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



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

def get_project_location_instance_os_policy_assignment_report(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::OsPolicyAssignmentReport::Representation
  command.response_class = Google::Apis::OsconfigV1::OsPolicyAssignmentReport
  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_project_location_instance_vulnerability_report(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::VulnerabilityReport

Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.

Parameters:

  • name (String)

    Required. API resource name for vulnerability resource. Format: projects/ project/locations/location/instances/instance/vulnerabilityReport For project, either project-number or project-id can be provided. For instance, either Compute Engine instance-id or instance-name can be provided.

  • 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



328
329
330
331
332
333
334
335
336
# File 'lib/google/apis/osconfig_v1/service.rb', line 328

def get_project_location_instance_vulnerability_report(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::VulnerabilityReport::Representation
  command.response_class = Google::Apis::OsconfigV1::VulnerabilityReport
  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_project_location_os_policy_assignment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::OsPolicyAssignment

Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the name parameter.

Parameters:

  • name (String)

    Required. The resource name of OS policy assignment. Format: projects/ project/locations/location/osPolicyAssignments/os_policy_assignment@ revisionId``

  • 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



506
507
508
509
510
511
512
513
514
# File 'lib/google/apis/osconfig_v1/service.rb', line 506

def get_project_location_os_policy_assignment(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::OsPolicyAssignment::Representation
  command.response_class = Google::Apis::OsconfigV1::OsPolicyAssignment
  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_project_location_os_policy_assignment_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::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



706
707
708
709
710
711
712
713
714
# File 'lib/google/apis/osconfig_v1/service.rb', line 706

def get_project_location_os_policy_assignment_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
  command.response_class = Google::Apis::OsconfigV1::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_project_patch_deployment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchDeployment

Get an OS Config patch deployment.

Parameters:

  • name (String)

    Required. The resource name of the patch deployment in the form projects/*/ patchDeployments/*.

  • 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



808
809
810
811
812
813
814
815
816
# File 'lib/google/apis/osconfig_v1/service.rb', line 808

def get_project_patch_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchDeployment
  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_project_patch_job(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchJob

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters:

  • name (String)

    Required. Name of the patch in the form projects/*/patchJobs/*

  • 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



1053
1054
1055
1056
1057
1058
1059
1060
1061
# File 'lib/google/apis/osconfig_v1/service.rb', line 1053

def get_project_patch_job(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::OsconfigV1::PatchJob::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchJob
  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_project_location_instance_inventories(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListInventoriesResponse

List inventory data for all VM instances in the specified zone.

Parameters:

  • parent (String)

    Required. The parent resource name. Format: projects/project/locations/ location/instances/- For project, either project-number or project-id can be provided.

  • filter (String) (defaults to: nil)

    If provided, this field specifies the criteria that must be met by a Inventory API resource to be included in the response.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call to ListInventories that indicates where this listing should continue from.

  • view (String) (defaults to: nil)

    Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.

  • 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



196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/google/apis/osconfig_v1/service.rb', line 196

def list_project_location_instance_inventories(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/inventories', options)
  command.response_representation = Google::Apis::OsconfigV1::ListInventoriesResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListInventoriesResponse
  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['view'] = view unless view.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_project_location_instance_os_policy_assignment_reports(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListOsPolicyAssignmentReportsResponse

List OS policy assignment reports for all Compute Engine VM instances in the specified zone.

Parameters:

  • parent (String)

    Required. The parent resource name. Format: projects/project/locations/ location/instances/instance/osPolicyAssignments/assignment/reports For project, either project-number or project-id can be provided. For instance, either instance-name, instance-id, or - can be provided. If ' -' is provided, the response will include OSPolicyAssignmentReports for all instances in the project/location. For assignment, either assignment-id or - can be provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location. Either instance or assignment must be -. For example: projects/project /locations/location/instances/instance/osPolicyAssignments/-/reports returns all reports for the instance projects/project/locations/location/ instances/-/osPolicyAssignments/assignment-id/reports returns all the reports for the given assignment across all instances. projects/project/ locations/location/instances/-/osPolicyAssignments/-/reports returns all the reports for all assignments across all instances.

  • filter (String) (defaults to: nil)

    If provided, this field specifies the criteria that must be met by the OSPolicyAssignmentReport API resource that is included in the response.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call to the ListOSPolicyAssignmentReports method that indicates where this listing should continue from.

  • 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



290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/google/apis/osconfig_v1/service.rb', line 290

def list_project_location_instance_os_policy_assignment_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::OsconfigV1::ListOsPolicyAssignmentReportsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListOsPolicyAssignmentReportsResponse
  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_project_location_instance_vulnerability_reports(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse

List vulnerability reports for all VM instances in the specified zone.

Parameters:

  • parent (String)

    Required. The parent resource name. Format: projects/project/locations/ location/instances/- For project, either project-number or project-id can be provided.

  • filter (String) (defaults to: nil)

    This field supports filtering by the severity level for the vulnerability. For a list of severity levels, see Severity levels for vulnerabilities. The filter field follows the rules described in the AIP-160 guidelines as follows: + Filter for a specific severity type: you can list reports that contain vulnerabilities that are classified as medium by specifying vulnerabilities. details.severity:MEDIUM. + Filter for a range of severities : you can list reports that have vulnerabilities that are classified as critical or high by specifying vulnerabilities.details.severity:HIGH OR vulnerabilities. details.severity:CRITICAL

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call to ListVulnerabilityReports that indicates where this listing should continue from.

  • 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



377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/google/apis/osconfig_v1/service.rb', line 377

def list_project_location_instance_vulnerability_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}/vulnerabilityReports', options)
  command.response_representation = Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse
  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_project_location_os_policy_assignment_revisions(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse

List the OS policy assignment revisions for a given OS policy assignment.

Parameters:

  • name (String)

    Required. The name of the OS policy assignment to list revisions for.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of revisions to return.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call to ListOSPolicyAssignmentRevisions that indicates where this listing should continue from.

  • 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



580
581
582
583
584
585
586
587
588
589
590
# File 'lib/google/apis/osconfig_v1/service.rb', line 580

def list_project_location_os_policy_assignment_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::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse
  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_project_location_os_policy_assignments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse

List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.

Parameters:

  • parent (String)

    Required. The parent resource name.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of assignments to return.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call to ListOSPolicyAssignments that indicates where this listing should continue from.

  • 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



542
543
544
545
546
547
548
549
550
551
552
# File 'lib/google/apis/osconfig_v1/service.rb', line 542

def list_project_location_os_policy_assignments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/osPolicyAssignments', options)
  command.response_representation = Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse
  command.params['parent'] = parent unless parent.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_project_patch_deployments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListPatchDeploymentsResponse

Get a page of OS Config patch deployments.

Parameters:

  • parent (String)

    Required. The resource name of the parent in the form projects/*.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of patch deployments to return. Default is 100.

  • page_token (String) (defaults to: nil)

    Optional. A pagination token returned from a previous call to ListPatchDeployments that indicates where this listing should continue from.

  • 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



843
844
845
846
847
848
849
850
851
852
853
# File 'lib/google/apis/osconfig_v1/service.rb', line 843

def list_project_patch_deployments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/patchDeployments', options)
  command.response_representation = Google::Apis::OsconfigV1::ListPatchDeploymentsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListPatchDeploymentsResponse
  command.params['parent'] = parent unless parent.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_project_patch_job_instance_details(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListPatchJobInstanceDetailsResponse

Get a list of instance details for a given patch job.

Parameters:

  • parent (String)

    Required. The parent for the instances are in the form of projects/*/ patchJobs/*.

  • filter (String) (defaults to: nil)

    A filter expression that filters results listed in the response. This field supports filtering results by instance zone, name, state, or failure_reason.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of instance details records to return. Default is 100.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call that indicates where this listing should continue from.

  • 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



1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
# File 'lib/google/apis/osconfig_v1/service.rb', line 1134

def list_project_patch_job_instance_details(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/instanceDetails', options)
  command.response_representation = Google::Apis::OsconfigV1::ListPatchJobInstanceDetailsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListPatchJobInstanceDetailsResponse
  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_project_patch_jobs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ListPatchJobsResponse

Get a list of patch jobs.

Parameters:

  • parent (String)

    Required. In the form of projects/*

  • filter (String) (defaults to: nil)

    If provided, this field specifies the criteria that must be met by patch jobs to be included in the response. Currently, filtering is only available on the patch_deployment field.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of instance status to return.

  • page_token (String) (defaults to: nil)

    A pagination token returned from a previous call that indicates where this listing should continue from.

  • 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



1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
# File 'lib/google/apis/osconfig_v1/service.rb', line 1092

def list_project_patch_jobs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/patchJobs', options)
  command.response_representation = Google::Apis::OsconfigV1::ListPatchJobsResponse::Representation
  command.response_class = Google::Apis::OsconfigV1::ListPatchJobsResponse
  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

#patch_project_location_os_policy_assignment(name, os_policy_assignment_object = nil, allow_missing: nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::Operation

Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see Method: projects.locations. osPolicyAssignments.operations.cancel.

Parameters:

  • name (String)

    Resource name. Format: projects/project_number/locations/location/ osPolicyAssignments/os_policy_assignment_id`` This field is ignored when you create an OS policy assignment.

  • os_policy_assignment_object (Google::Apis::OsconfigV1::OsPolicyAssignment) (defaults to: nil)
  • allow_missing (Boolean) (defaults to: nil)

    Optional. If set to true, and the OS policy assignment is not found, a new OS policy assignment will be created. In this situation, update_mask is ignored.

  • request_id (String) (defaults to: nil)

    Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a request_id is provided.

  • update_mask (String) (defaults to: nil)

    Optional. Field mask that controls which fields of the assignment should be updated.

  • 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



630
631
632
633
634
635
636
637
638
639
640
641
642
643
# File 'lib/google/apis/osconfig_v1/service.rb', line 630

def patch_project_location_os_policy_assignment(name, os_policy_assignment_object = nil, allow_missing: nil, request_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::OsconfigV1::OsPolicyAssignment::Representation
  command.request_object = os_policy_assignment_object
  command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
  command.response_class = Google::Apis::OsconfigV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['allowMissing'] = allow_missing unless allow_missing.nil?
  command.query['requestId'] = request_id unless request_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_project_patch_deployment(name, patch_deployment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchDeployment

Update an OS Config patch deployment.

Parameters:

  • name (String)

    Unique name for the patch deployment resource in a project. The patch deployment name is in the form: projects/project_id/patchDeployments/ patch_deployment_id``. This field is ignored when you create a new patch deployment.

  • patch_deployment_object (Google::Apis::OsconfigV1::PatchDeployment) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. Field mask that controls which fields of the patch deployment should be updated.

  • 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



882
883
884
885
886
887
888
889
890
891
892
893
# File 'lib/google/apis/osconfig_v1/service.rb', line 882

def patch_project_patch_deployment(name, patch_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::OsconfigV1::PatchDeployment::Representation
  command.request_object = patch_deployment_object
  command.response_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchDeployment
  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

#pause_patch_deployment(name, pause_patch_deployment_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchDeployment

Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate patch jobs.

Parameters:

  • name (String)

    Required. The resource name of the patch deployment in the form projects/*/ patchDeployments/*.

  • pause_patch_deployment_request_object (Google::Apis::OsconfigV1::PausePatchDeploymentRequest) (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



918
919
920
921
922
923
924
925
926
927
928
# File 'lib/google/apis/osconfig_v1/service.rb', line 918

def pause_patch_deployment(name, pause_patch_deployment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:pause', options)
  command.request_representation = Google::Apis::OsconfigV1::PausePatchDeploymentRequest::Representation
  command.request_object = pause_patch_deployment_request_object
  command.response_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchDeployment
  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

#resume_patch_deployment(name, resume_patch_deployment_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::PatchDeployment

Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues to generate patch jobs.

Parameters:

  • name (String)

    Required. The resource name of the patch deployment in the form projects/*/ patchDeployments/*.

  • resume_patch_deployment_request_object (Google::Apis::OsconfigV1::ResumePatchDeploymentRequest) (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



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

def resume_patch_deployment(name, resume_patch_deployment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:resume', options)
  command.request_representation = Google::Apis::OsconfigV1::ResumePatchDeploymentRequest::Representation
  command.request_object = resume_patch_deployment_request_object
  command.response_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
  command.response_class = Google::Apis::OsconfigV1::PatchDeployment
  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

#update_project_location_global_project_feature_settings(name, project_feature_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OsconfigV1::ProjectFeatureSettings

UpdateProjectFeatureSettings sets the VM Manager features for a project.

Parameters:

  • name (String)

    Required. Immutable. Name specifies the URL for the ProjectFeatureSettings resource: projects/project_id/locations/global/projectFeatureSettings.

  • project_feature_settings_object (Google::Apis::OsconfigV1::ProjectFeatureSettings) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. Field mask that controls which fields of the ProjectFeatureSettings should be updated.

  • 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



112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/google/apis/osconfig_v1/service.rb', line 112

def update_project_location_global_project_feature_settings(name, project_feature_settings_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::OsconfigV1::ProjectFeatureSettings::Representation
  command.request_object = project_feature_settings_object
  command.response_representation = Google::Apis::OsconfigV1::ProjectFeatureSettings::Representation
  command.response_class = Google::Apis::OsconfigV1::ProjectFeatureSettings
  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