google-apis-osconfig_v1beta 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-osconfig_v1beta.rb +15 -0
- data/lib/google/apis/osconfig_v1beta.rb +37 -0
- data/lib/google/apis/osconfig_v1beta/classes.rb +2771 -0
- data/lib/google/apis/osconfig_v1beta/gem_version.rb +28 -0
- data/lib/google/apis/osconfig_v1beta/representations.rb +1169 -0
- data/lib/google/apis/osconfig_v1beta/service.rb +594 -0
- metadata +76 -0
@@ -0,0 +1,594 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module OsconfigV1beta
|
23
|
+
# OS Config API
|
24
|
+
#
|
25
|
+
# OS management tools that can be used for patch management, patch compliance,
|
26
|
+
# and configuration management on VM instances.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/osconfig_v1beta'
|
30
|
+
#
|
31
|
+
# Osconfig = Google::Apis::OsconfigV1beta # Alias the module
|
32
|
+
# service = Osconfig::OSConfigService.new
|
33
|
+
#
|
34
|
+
# @see https://cloud.google.com/compute/docs/manage-os
|
35
|
+
class OSConfigService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://osconfig.googleapis.com/', '',
|
48
|
+
client_name: 'google-apis-osconfig_v1beta',
|
49
|
+
client_version: Google::Apis::OsconfigV1beta::GEM_VERSION)
|
50
|
+
@batch_path = 'batch'
|
51
|
+
end
|
52
|
+
|
53
|
+
# Create an OS Config guest policy.
|
54
|
+
# @param [String] parent
|
55
|
+
# Required. The resource name of the parent using one of the following forms: `
|
56
|
+
# projects/`project_number``.
|
57
|
+
# @param [Google::Apis::OsconfigV1beta::GuestPolicy] guest_policy_object
|
58
|
+
# @param [String] guest_policy_id
|
59
|
+
# Required. The logical name of the guest policy in the project with the
|
60
|
+
# following restrictions: * Must contain only lowercase letters, numbers, and
|
61
|
+
# hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must
|
62
|
+
# end with a number or a letter. * Must be unique within the project.
|
63
|
+
# @param [String] fields
|
64
|
+
# Selector specifying which fields to include in a partial response.
|
65
|
+
# @param [String] quota_user
|
66
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
67
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
68
|
+
# @param [Google::Apis::RequestOptions] options
|
69
|
+
# Request-specific options
|
70
|
+
#
|
71
|
+
# @yield [result, err] Result & error if block supplied
|
72
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::GuestPolicy] parsed result object
|
73
|
+
# @yieldparam err [StandardError] error object if request failed
|
74
|
+
#
|
75
|
+
# @return [Google::Apis::OsconfigV1beta::GuestPolicy]
|
76
|
+
#
|
77
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
78
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
79
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
80
|
+
def create_project_guest_policy(parent, guest_policy_object = nil, guest_policy_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
81
|
+
command = make_simple_command(:post, 'v1beta/{+parent}/guestPolicies', options)
|
82
|
+
command.request_representation = Google::Apis::OsconfigV1beta::GuestPolicy::Representation
|
83
|
+
command.request_object = guest_policy_object
|
84
|
+
command.response_representation = Google::Apis::OsconfigV1beta::GuestPolicy::Representation
|
85
|
+
command.response_class = Google::Apis::OsconfigV1beta::GuestPolicy
|
86
|
+
command.params['parent'] = parent unless parent.nil?
|
87
|
+
command.query['guestPolicyId'] = guest_policy_id unless guest_policy_id.nil?
|
88
|
+
command.query['fields'] = fields unless fields.nil?
|
89
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
90
|
+
execute_or_queue_command(command, &block)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Delete an OS Config guest policy.
|
94
|
+
# @param [String] name
|
95
|
+
# Required. The resource name of the guest policy using one of the following
|
96
|
+
# forms: `projects/`project_number`/guestPolicies/`guest_policy_id``.
|
97
|
+
# @param [String] fields
|
98
|
+
# Selector specifying which fields to include in a partial response.
|
99
|
+
# @param [String] quota_user
|
100
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
101
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
102
|
+
# @param [Google::Apis::RequestOptions] options
|
103
|
+
# Request-specific options
|
104
|
+
#
|
105
|
+
# @yield [result, err] Result & error if block supplied
|
106
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::Empty] parsed result object
|
107
|
+
# @yieldparam err [StandardError] error object if request failed
|
108
|
+
#
|
109
|
+
# @return [Google::Apis::OsconfigV1beta::Empty]
|
110
|
+
#
|
111
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
112
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
113
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
114
|
+
def delete_project_guest_policy(name, fields: nil, quota_user: nil, options: nil, &block)
|
115
|
+
command = make_simple_command(:delete, 'v1beta/{+name}', options)
|
116
|
+
command.response_representation = Google::Apis::OsconfigV1beta::Empty::Representation
|
117
|
+
command.response_class = Google::Apis::OsconfigV1beta::Empty
|
118
|
+
command.params['name'] = name unless name.nil?
|
119
|
+
command.query['fields'] = fields unless fields.nil?
|
120
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
121
|
+
execute_or_queue_command(command, &block)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Get an OS Config guest policy.
|
125
|
+
# @param [String] name
|
126
|
+
# Required. The resource name of the guest policy using one of the following
|
127
|
+
# forms: `projects/`project_number`/guestPolicies/`guest_policy_id``.
|
128
|
+
# @param [String] fields
|
129
|
+
# Selector specifying which fields to include in a partial response.
|
130
|
+
# @param [String] quota_user
|
131
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
132
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
133
|
+
# @param [Google::Apis::RequestOptions] options
|
134
|
+
# Request-specific options
|
135
|
+
#
|
136
|
+
# @yield [result, err] Result & error if block supplied
|
137
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::GuestPolicy] parsed result object
|
138
|
+
# @yieldparam err [StandardError] error object if request failed
|
139
|
+
#
|
140
|
+
# @return [Google::Apis::OsconfigV1beta::GuestPolicy]
|
141
|
+
#
|
142
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
143
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
144
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
145
|
+
def get_project_guest_policy(name, fields: nil, quota_user: nil, options: nil, &block)
|
146
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
147
|
+
command.response_representation = Google::Apis::OsconfigV1beta::GuestPolicy::Representation
|
148
|
+
command.response_class = Google::Apis::OsconfigV1beta::GuestPolicy
|
149
|
+
command.params['name'] = name unless name.nil?
|
150
|
+
command.query['fields'] = fields unless fields.nil?
|
151
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
152
|
+
execute_or_queue_command(command, &block)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Get a page of OS Config guest policies.
|
156
|
+
# @param [String] parent
|
157
|
+
# Required. The resource name of the parent using one of the following forms: `
|
158
|
+
# projects/`project_number``.
|
159
|
+
# @param [Fixnum] page_size
|
160
|
+
# The maximum number of guest policies to return.
|
161
|
+
# @param [String] page_token
|
162
|
+
# A pagination token returned from a previous call to `ListGuestPolicies` that
|
163
|
+
# indicates where this listing should continue from.
|
164
|
+
# @param [String] fields
|
165
|
+
# Selector specifying which fields to include in a partial response.
|
166
|
+
# @param [String] quota_user
|
167
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
168
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
169
|
+
# @param [Google::Apis::RequestOptions] options
|
170
|
+
# Request-specific options
|
171
|
+
#
|
172
|
+
# @yield [result, err] Result & error if block supplied
|
173
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::ListGuestPoliciesResponse] parsed result object
|
174
|
+
# @yieldparam err [StandardError] error object if request failed
|
175
|
+
#
|
176
|
+
# @return [Google::Apis::OsconfigV1beta::ListGuestPoliciesResponse]
|
177
|
+
#
|
178
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
179
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
180
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
181
|
+
def list_project_guest_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
182
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/guestPolicies', options)
|
183
|
+
command.response_representation = Google::Apis::OsconfigV1beta::ListGuestPoliciesResponse::Representation
|
184
|
+
command.response_class = Google::Apis::OsconfigV1beta::ListGuestPoliciesResponse
|
185
|
+
command.params['parent'] = parent unless parent.nil?
|
186
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
187
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
188
|
+
command.query['fields'] = fields unless fields.nil?
|
189
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
190
|
+
execute_or_queue_command(command, &block)
|
191
|
+
end
|
192
|
+
|
193
|
+
# Update an OS Config guest policy.
|
194
|
+
# @param [String] name
|
195
|
+
# Required. Unique name of the resource in this project using one of the
|
196
|
+
# following forms: `projects/`project_number`/guestPolicies/`guest_policy_id``.
|
197
|
+
# @param [Google::Apis::OsconfigV1beta::GuestPolicy] guest_policy_object
|
198
|
+
# @param [String] update_mask
|
199
|
+
# Field mask that controls which fields of the guest policy should be updated.
|
200
|
+
# @param [String] fields
|
201
|
+
# Selector specifying which fields to include in a partial response.
|
202
|
+
# @param [String] quota_user
|
203
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
204
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
205
|
+
# @param [Google::Apis::RequestOptions] options
|
206
|
+
# Request-specific options
|
207
|
+
#
|
208
|
+
# @yield [result, err] Result & error if block supplied
|
209
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::GuestPolicy] parsed result object
|
210
|
+
# @yieldparam err [StandardError] error object if request failed
|
211
|
+
#
|
212
|
+
# @return [Google::Apis::OsconfigV1beta::GuestPolicy]
|
213
|
+
#
|
214
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
215
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
216
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
217
|
+
def patch_project_guest_policy(name, guest_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
218
|
+
command = make_simple_command(:patch, 'v1beta/{+name}', options)
|
219
|
+
command.request_representation = Google::Apis::OsconfigV1beta::GuestPolicy::Representation
|
220
|
+
command.request_object = guest_policy_object
|
221
|
+
command.response_representation = Google::Apis::OsconfigV1beta::GuestPolicy::Representation
|
222
|
+
command.response_class = Google::Apis::OsconfigV1beta::GuestPolicy
|
223
|
+
command.params['name'] = name unless name.nil?
|
224
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
225
|
+
command.query['fields'] = fields unless fields.nil?
|
226
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
227
|
+
execute_or_queue_command(command, &block)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Create an OS Config patch deployment.
|
231
|
+
# @param [String] parent
|
232
|
+
# Required. The project to apply this patch deployment to in the form `projects/*
|
233
|
+
# `.
|
234
|
+
# @param [Google::Apis::OsconfigV1beta::PatchDeployment] patch_deployment_object
|
235
|
+
# @param [String] patch_deployment_id
|
236
|
+
# Required. A name for the patch deployment in the project. When creating a name
|
237
|
+
# the following rules apply: * Must contain only lowercase letters, numbers, and
|
238
|
+
# hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must
|
239
|
+
# end with a number or a letter. * Must be unique within the project.
|
240
|
+
# @param [String] fields
|
241
|
+
# Selector specifying which fields to include in a partial response.
|
242
|
+
# @param [String] quota_user
|
243
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
244
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
245
|
+
# @param [Google::Apis::RequestOptions] options
|
246
|
+
# Request-specific options
|
247
|
+
#
|
248
|
+
# @yield [result, err] Result & error if block supplied
|
249
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::PatchDeployment] parsed result object
|
250
|
+
# @yieldparam err [StandardError] error object if request failed
|
251
|
+
#
|
252
|
+
# @return [Google::Apis::OsconfigV1beta::PatchDeployment]
|
253
|
+
#
|
254
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
255
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
256
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
257
|
+
def create_project_patch_deployment(parent, patch_deployment_object = nil, patch_deployment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
258
|
+
command = make_simple_command(:post, 'v1beta/{+parent}/patchDeployments', options)
|
259
|
+
command.request_representation = Google::Apis::OsconfigV1beta::PatchDeployment::Representation
|
260
|
+
command.request_object = patch_deployment_object
|
261
|
+
command.response_representation = Google::Apis::OsconfigV1beta::PatchDeployment::Representation
|
262
|
+
command.response_class = Google::Apis::OsconfigV1beta::PatchDeployment
|
263
|
+
command.params['parent'] = parent unless parent.nil?
|
264
|
+
command.query['patchDeploymentId'] = patch_deployment_id unless patch_deployment_id.nil?
|
265
|
+
command.query['fields'] = fields unless fields.nil?
|
266
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
267
|
+
execute_or_queue_command(command, &block)
|
268
|
+
end
|
269
|
+
|
270
|
+
# Delete an OS Config patch deployment.
|
271
|
+
# @param [String] name
|
272
|
+
# Required. The resource name of the patch deployment in the form `projects/*/
|
273
|
+
# patchDeployments/*`.
|
274
|
+
# @param [String] fields
|
275
|
+
# Selector specifying which fields to include in a partial response.
|
276
|
+
# @param [String] quota_user
|
277
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
278
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
279
|
+
# @param [Google::Apis::RequestOptions] options
|
280
|
+
# Request-specific options
|
281
|
+
#
|
282
|
+
# @yield [result, err] Result & error if block supplied
|
283
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::Empty] parsed result object
|
284
|
+
# @yieldparam err [StandardError] error object if request failed
|
285
|
+
#
|
286
|
+
# @return [Google::Apis::OsconfigV1beta::Empty]
|
287
|
+
#
|
288
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
289
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
290
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
291
|
+
def delete_project_patch_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
|
292
|
+
command = make_simple_command(:delete, 'v1beta/{+name}', options)
|
293
|
+
command.response_representation = Google::Apis::OsconfigV1beta::Empty::Representation
|
294
|
+
command.response_class = Google::Apis::OsconfigV1beta::Empty
|
295
|
+
command.params['name'] = name unless name.nil?
|
296
|
+
command.query['fields'] = fields unless fields.nil?
|
297
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
298
|
+
execute_or_queue_command(command, &block)
|
299
|
+
end
|
300
|
+
|
301
|
+
# Get an OS Config patch deployment.
|
302
|
+
# @param [String] name
|
303
|
+
# Required. The resource name of the patch deployment in the form `projects/*/
|
304
|
+
# patchDeployments/*`.
|
305
|
+
# @param [String] fields
|
306
|
+
# Selector specifying which fields to include in a partial response.
|
307
|
+
# @param [String] quota_user
|
308
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
309
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
310
|
+
# @param [Google::Apis::RequestOptions] options
|
311
|
+
# Request-specific options
|
312
|
+
#
|
313
|
+
# @yield [result, err] Result & error if block supplied
|
314
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::PatchDeployment] parsed result object
|
315
|
+
# @yieldparam err [StandardError] error object if request failed
|
316
|
+
#
|
317
|
+
# @return [Google::Apis::OsconfigV1beta::PatchDeployment]
|
318
|
+
#
|
319
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
320
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
321
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
322
|
+
def get_project_patch_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
|
323
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
324
|
+
command.response_representation = Google::Apis::OsconfigV1beta::PatchDeployment::Representation
|
325
|
+
command.response_class = Google::Apis::OsconfigV1beta::PatchDeployment
|
326
|
+
command.params['name'] = name unless name.nil?
|
327
|
+
command.query['fields'] = fields unless fields.nil?
|
328
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
329
|
+
execute_or_queue_command(command, &block)
|
330
|
+
end
|
331
|
+
|
332
|
+
# Get a page of OS Config patch deployments.
|
333
|
+
# @param [String] parent
|
334
|
+
# Required. The resource name of the parent in the form `projects/*`.
|
335
|
+
# @param [Fixnum] page_size
|
336
|
+
# Optional. The maximum number of patch deployments to return. Default is 100.
|
337
|
+
# @param [String] page_token
|
338
|
+
# Optional. A pagination token returned from a previous call to
|
339
|
+
# ListPatchDeployments that indicates where this listing should continue from.
|
340
|
+
# @param [String] fields
|
341
|
+
# Selector specifying which fields to include in a partial response.
|
342
|
+
# @param [String] quota_user
|
343
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
344
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
345
|
+
# @param [Google::Apis::RequestOptions] options
|
346
|
+
# Request-specific options
|
347
|
+
#
|
348
|
+
# @yield [result, err] Result & error if block supplied
|
349
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::ListPatchDeploymentsResponse] parsed result object
|
350
|
+
# @yieldparam err [StandardError] error object if request failed
|
351
|
+
#
|
352
|
+
# @return [Google::Apis::OsconfigV1beta::ListPatchDeploymentsResponse]
|
353
|
+
#
|
354
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
355
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
356
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
357
|
+
def list_project_patch_deployments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
358
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/patchDeployments', options)
|
359
|
+
command.response_representation = Google::Apis::OsconfigV1beta::ListPatchDeploymentsResponse::Representation
|
360
|
+
command.response_class = Google::Apis::OsconfigV1beta::ListPatchDeploymentsResponse
|
361
|
+
command.params['parent'] = parent unless parent.nil?
|
362
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
363
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
364
|
+
command.query['fields'] = fields unless fields.nil?
|
365
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
366
|
+
execute_or_queue_command(command, &block)
|
367
|
+
end
|
368
|
+
|
369
|
+
# Cancel a patch job. The patch job must be active. Canceled patch jobs cannot
|
370
|
+
# be restarted.
|
371
|
+
# @param [String] name
|
372
|
+
# Required. Name of the patch in the form `projects/*/patchJobs/*`
|
373
|
+
# @param [Google::Apis::OsconfigV1beta::CancelPatchJobRequest] cancel_patch_job_request_object
|
374
|
+
# @param [String] fields
|
375
|
+
# Selector specifying which fields to include in a partial response.
|
376
|
+
# @param [String] quota_user
|
377
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
378
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
379
|
+
# @param [Google::Apis::RequestOptions] options
|
380
|
+
# Request-specific options
|
381
|
+
#
|
382
|
+
# @yield [result, err] Result & error if block supplied
|
383
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::PatchJob] parsed result object
|
384
|
+
# @yieldparam err [StandardError] error object if request failed
|
385
|
+
#
|
386
|
+
# @return [Google::Apis::OsconfigV1beta::PatchJob]
|
387
|
+
#
|
388
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
389
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
390
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
391
|
+
def cancel_patch_job(name, cancel_patch_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
392
|
+
command = make_simple_command(:post, 'v1beta/{+name}:cancel', options)
|
393
|
+
command.request_representation = Google::Apis::OsconfigV1beta::CancelPatchJobRequest::Representation
|
394
|
+
command.request_object = cancel_patch_job_request_object
|
395
|
+
command.response_representation = Google::Apis::OsconfigV1beta::PatchJob::Representation
|
396
|
+
command.response_class = Google::Apis::OsconfigV1beta::PatchJob
|
397
|
+
command.params['name'] = name unless name.nil?
|
398
|
+
command.query['fields'] = fields unless fields.nil?
|
399
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
400
|
+
execute_or_queue_command(command, &block)
|
401
|
+
end
|
402
|
+
|
403
|
+
# Patch VM instances by creating and running a patch job.
|
404
|
+
# @param [String] parent
|
405
|
+
# Required. The project in which to run this patch in the form `projects/*`
|
406
|
+
# @param [Google::Apis::OsconfigV1beta::ExecutePatchJobRequest] execute_patch_job_request_object
|
407
|
+
# @param [String] fields
|
408
|
+
# Selector specifying which fields to include in a partial response.
|
409
|
+
# @param [String] quota_user
|
410
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
411
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
412
|
+
# @param [Google::Apis::RequestOptions] options
|
413
|
+
# Request-specific options
|
414
|
+
#
|
415
|
+
# @yield [result, err] Result & error if block supplied
|
416
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::PatchJob] parsed result object
|
417
|
+
# @yieldparam err [StandardError] error object if request failed
|
418
|
+
#
|
419
|
+
# @return [Google::Apis::OsconfigV1beta::PatchJob]
|
420
|
+
#
|
421
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
422
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
423
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
424
|
+
def execute_patch_job(parent, execute_patch_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
425
|
+
command = make_simple_command(:post, 'v1beta/{+parent}/patchJobs:execute', options)
|
426
|
+
command.request_representation = Google::Apis::OsconfigV1beta::ExecutePatchJobRequest::Representation
|
427
|
+
command.request_object = execute_patch_job_request_object
|
428
|
+
command.response_representation = Google::Apis::OsconfigV1beta::PatchJob::Representation
|
429
|
+
command.response_class = Google::Apis::OsconfigV1beta::PatchJob
|
430
|
+
command.params['parent'] = parent unless parent.nil?
|
431
|
+
command.query['fields'] = fields unless fields.nil?
|
432
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
433
|
+
execute_or_queue_command(command, &block)
|
434
|
+
end
|
435
|
+
|
436
|
+
# Get the patch job. This can be used to track the progress of an ongoing patch
|
437
|
+
# job or review the details of completed jobs.
|
438
|
+
# @param [String] name
|
439
|
+
# Required. Name of the patch in the form `projects/*/patchJobs/*`
|
440
|
+
# @param [String] fields
|
441
|
+
# Selector specifying which fields to include in a partial response.
|
442
|
+
# @param [String] quota_user
|
443
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
444
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
445
|
+
# @param [Google::Apis::RequestOptions] options
|
446
|
+
# Request-specific options
|
447
|
+
#
|
448
|
+
# @yield [result, err] Result & error if block supplied
|
449
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::PatchJob] parsed result object
|
450
|
+
# @yieldparam err [StandardError] error object if request failed
|
451
|
+
#
|
452
|
+
# @return [Google::Apis::OsconfigV1beta::PatchJob]
|
453
|
+
#
|
454
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
455
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
456
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
457
|
+
def get_project_patch_job(name, fields: nil, quota_user: nil, options: nil, &block)
|
458
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
459
|
+
command.response_representation = Google::Apis::OsconfigV1beta::PatchJob::Representation
|
460
|
+
command.response_class = Google::Apis::OsconfigV1beta::PatchJob
|
461
|
+
command.params['name'] = name unless name.nil?
|
462
|
+
command.query['fields'] = fields unless fields.nil?
|
463
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
464
|
+
execute_or_queue_command(command, &block)
|
465
|
+
end
|
466
|
+
|
467
|
+
# Get a list of patch jobs.
|
468
|
+
# @param [String] parent
|
469
|
+
# Required. In the form of `projects/*`
|
470
|
+
# @param [String] filter
|
471
|
+
# If provided, this field specifies the criteria that must be met by patch jobs
|
472
|
+
# to be included in the response. Currently, filtering is only available on the
|
473
|
+
# patch_deployment field.
|
474
|
+
# @param [Fixnum] page_size
|
475
|
+
# The maximum number of instance status to return.
|
476
|
+
# @param [String] page_token
|
477
|
+
# A pagination token returned from a previous call that indicates where this
|
478
|
+
# listing should continue from.
|
479
|
+
# @param [String] fields
|
480
|
+
# Selector specifying which fields to include in a partial response.
|
481
|
+
# @param [String] quota_user
|
482
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
483
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
484
|
+
# @param [Google::Apis::RequestOptions] options
|
485
|
+
# Request-specific options
|
486
|
+
#
|
487
|
+
# @yield [result, err] Result & error if block supplied
|
488
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::ListPatchJobsResponse] parsed result object
|
489
|
+
# @yieldparam err [StandardError] error object if request failed
|
490
|
+
#
|
491
|
+
# @return [Google::Apis::OsconfigV1beta::ListPatchJobsResponse]
|
492
|
+
#
|
493
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
494
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
495
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
496
|
+
def list_project_patch_jobs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
497
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/patchJobs', options)
|
498
|
+
command.response_representation = Google::Apis::OsconfigV1beta::ListPatchJobsResponse::Representation
|
499
|
+
command.response_class = Google::Apis::OsconfigV1beta::ListPatchJobsResponse
|
500
|
+
command.params['parent'] = parent unless parent.nil?
|
501
|
+
command.query['filter'] = filter unless filter.nil?
|
502
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
503
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
504
|
+
command.query['fields'] = fields unless fields.nil?
|
505
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
506
|
+
execute_or_queue_command(command, &block)
|
507
|
+
end
|
508
|
+
|
509
|
+
# Get a list of instance details for a given patch job.
|
510
|
+
# @param [String] parent
|
511
|
+
# Required. The parent for the instances are in the form of `projects/*/
|
512
|
+
# patchJobs/*`.
|
513
|
+
# @param [String] filter
|
514
|
+
# A filter expression that filters results listed in the response. This field
|
515
|
+
# supports filtering results by instance zone, name, state, or `failure_reason`.
|
516
|
+
# @param [Fixnum] page_size
|
517
|
+
# The maximum number of instance details records to return. Default is 100.
|
518
|
+
# @param [String] page_token
|
519
|
+
# A pagination token returned from a previous call that indicates where this
|
520
|
+
# listing should continue from.
|
521
|
+
# @param [String] fields
|
522
|
+
# Selector specifying which fields to include in a partial response.
|
523
|
+
# @param [String] quota_user
|
524
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
525
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
526
|
+
# @param [Google::Apis::RequestOptions] options
|
527
|
+
# Request-specific options
|
528
|
+
#
|
529
|
+
# @yield [result, err] Result & error if block supplied
|
530
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::ListPatchJobInstanceDetailsResponse] parsed result object
|
531
|
+
# @yieldparam err [StandardError] error object if request failed
|
532
|
+
#
|
533
|
+
# @return [Google::Apis::OsconfigV1beta::ListPatchJobInstanceDetailsResponse]
|
534
|
+
#
|
535
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
536
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
537
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
538
|
+
def list_project_patch_job_instance_details(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
539
|
+
command = make_simple_command(:get, 'v1beta/{+parent}/instanceDetails', options)
|
540
|
+
command.response_representation = Google::Apis::OsconfigV1beta::ListPatchJobInstanceDetailsResponse::Representation
|
541
|
+
command.response_class = Google::Apis::OsconfigV1beta::ListPatchJobInstanceDetailsResponse
|
542
|
+
command.params['parent'] = parent unless parent.nil?
|
543
|
+
command.query['filter'] = filter unless filter.nil?
|
544
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
545
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
546
|
+
command.query['fields'] = fields unless fields.nil?
|
547
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
548
|
+
execute_or_queue_command(command, &block)
|
549
|
+
end
|
550
|
+
|
551
|
+
# Lookup the effective guest policy that applies to a VM instance. This lookup
|
552
|
+
# merges all policies that are assigned to the instance ancestry.
|
553
|
+
# @param [String] instance
|
554
|
+
# Required. The VM instance whose policies are being looked up.
|
555
|
+
# @param [Google::Apis::OsconfigV1beta::LookupEffectiveGuestPolicyRequest] lookup_effective_guest_policy_request_object
|
556
|
+
# @param [String] fields
|
557
|
+
# Selector specifying which fields to include in a partial response.
|
558
|
+
# @param [String] quota_user
|
559
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
560
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
561
|
+
# @param [Google::Apis::RequestOptions] options
|
562
|
+
# Request-specific options
|
563
|
+
#
|
564
|
+
# @yield [result, err] Result & error if block supplied
|
565
|
+
# @yieldparam result [Google::Apis::OsconfigV1beta::EffectiveGuestPolicy] parsed result object
|
566
|
+
# @yieldparam err [StandardError] error object if request failed
|
567
|
+
#
|
568
|
+
# @return [Google::Apis::OsconfigV1beta::EffectiveGuestPolicy]
|
569
|
+
#
|
570
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
571
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
572
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
573
|
+
def lookup_instance_effective_guest_policy(instance, lookup_effective_guest_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
574
|
+
command = make_simple_command(:post, 'v1beta/{+instance}:lookupEffectiveGuestPolicy', options)
|
575
|
+
command.request_representation = Google::Apis::OsconfigV1beta::LookupEffectiveGuestPolicyRequest::Representation
|
576
|
+
command.request_object = lookup_effective_guest_policy_request_object
|
577
|
+
command.response_representation = Google::Apis::OsconfigV1beta::EffectiveGuestPolicy::Representation
|
578
|
+
command.response_class = Google::Apis::OsconfigV1beta::EffectiveGuestPolicy
|
579
|
+
command.params['instance'] = instance unless instance.nil?
|
580
|
+
command.query['fields'] = fields unless fields.nil?
|
581
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
582
|
+
execute_or_queue_command(command, &block)
|
583
|
+
end
|
584
|
+
|
585
|
+
protected
|
586
|
+
|
587
|
+
def apply_command_defaults(command)
|
588
|
+
command.query['key'] = key unless key.nil?
|
589
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
590
|
+
end
|
591
|
+
end
|
592
|
+
end
|
593
|
+
end
|
594
|
+
end
|