google-apis-osconfig_v1 0.8.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/google/apis/osconfig_v1/classes.rb +1910 -121
- data/lib/google/apis/osconfig_v1/gem_version.rb +2 -2
- data/lib/google/apis/osconfig_v1/representations.rb +754 -8
- data/lib/google/apis/osconfig_v1/service.rb +552 -28
- data/lib/google/apis/osconfig_v1.rb +1 -1
- metadata +3 -3
@@ -50,12 +50,16 @@ module Google
|
|
50
50
|
@batch_path = 'batch'
|
51
51
|
end
|
52
52
|
|
53
|
-
#
|
54
|
-
#
|
55
|
-
# If the server doesn't support this method, it returns `google.rpc.Code.
|
56
|
-
# UNIMPLEMENTED`.
|
53
|
+
# Get inventory data for the specified VM instance. If the VM has no associated
|
54
|
+
# inventory, the message `NOT_FOUND` is returned.
|
57
55
|
# @param [String] name
|
58
|
-
#
|
56
|
+
# Required. API resource name for inventory resource. Format: `projects/`project`
|
57
|
+
# /locations/`location`/instances/`instance`/inventory` For ``project``, either `
|
58
|
+
# project-number` or `project-id` can be provided. For ``instance``, either
|
59
|
+
# Compute Engine `instance-id` or `instance-name` can be provided.
|
60
|
+
# @param [String] view
|
61
|
+
# Inventory view indicating what information should be included in the inventory
|
62
|
+
# resource. If unspecified, the default view is BASIC.
|
59
63
|
# @param [String] fields
|
60
64
|
# Selector specifying which fields to include in a partial response.
|
61
65
|
# @param [String] quota_user
|
@@ -65,40 +69,135 @@ module Google
|
|
65
69
|
# Request-specific options
|
66
70
|
#
|
67
71
|
# @yield [result, err] Result & error if block supplied
|
68
|
-
# @yieldparam result [Google::Apis::OsconfigV1::
|
72
|
+
# @yieldparam result [Google::Apis::OsconfigV1::Inventory] parsed result object
|
69
73
|
# @yieldparam err [StandardError] error object if request failed
|
70
74
|
#
|
71
|
-
# @return [Google::Apis::OsconfigV1::
|
75
|
+
# @return [Google::Apis::OsconfigV1::Inventory]
|
72
76
|
#
|
73
77
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
74
78
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
75
79
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
76
|
-
def
|
77
|
-
command = make_simple_command(:
|
78
|
-
command.response_representation = Google::Apis::OsconfigV1::
|
79
|
-
command.response_class = Google::Apis::OsconfigV1::
|
80
|
+
def get_project_location_instance_inventory(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
81
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
82
|
+
command.response_representation = Google::Apis::OsconfigV1::Inventory::Representation
|
83
|
+
command.response_class = Google::Apis::OsconfigV1::Inventory
|
80
84
|
command.params['name'] = name unless name.nil?
|
85
|
+
command.query['view'] = view unless view.nil?
|
86
|
+
command.query['fields'] = fields unless fields.nil?
|
87
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
88
|
+
execute_or_queue_command(command, &block)
|
89
|
+
end
|
90
|
+
|
91
|
+
# List inventory data for all VM instances in the specified zone.
|
92
|
+
# @param [String] parent
|
93
|
+
# Required. The parent resource name. Format: `projects/`project`/locations/`
|
94
|
+
# location`/instances/-` For ``project``, either `project-number` or `project-id`
|
95
|
+
# can be provided.
|
96
|
+
# @param [String] filter
|
97
|
+
# If provided, this field specifies the criteria that must be met by a `
|
98
|
+
# Inventory` API resource to be included in the response.
|
99
|
+
# @param [Fixnum] page_size
|
100
|
+
# The maximum number of results to return.
|
101
|
+
# @param [String] page_token
|
102
|
+
# A pagination token returned from a previous call to `ListInventories` that
|
103
|
+
# indicates where this listing should continue from.
|
104
|
+
# @param [String] view
|
105
|
+
# Inventory view indicating what information should be included in the inventory
|
106
|
+
# resource. If unspecified, the default view is BASIC.
|
107
|
+
# @param [String] fields
|
108
|
+
# Selector specifying which fields to include in a partial response.
|
109
|
+
# @param [String] quota_user
|
110
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
111
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
112
|
+
# @param [Google::Apis::RequestOptions] options
|
113
|
+
# Request-specific options
|
114
|
+
#
|
115
|
+
# @yield [result, err] Result & error if block supplied
|
116
|
+
# @yieldparam result [Google::Apis::OsconfigV1::ListInventoriesResponse] parsed result object
|
117
|
+
# @yieldparam err [StandardError] error object if request failed
|
118
|
+
#
|
119
|
+
# @return [Google::Apis::OsconfigV1::ListInventoriesResponse]
|
120
|
+
#
|
121
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
122
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
123
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
124
|
+
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)
|
125
|
+
command = make_simple_command(:get, 'v1/{+parent}/inventories', options)
|
126
|
+
command.response_representation = Google::Apis::OsconfigV1::ListInventoriesResponse::Representation
|
127
|
+
command.response_class = Google::Apis::OsconfigV1::ListInventoriesResponse
|
128
|
+
command.params['parent'] = parent unless parent.nil?
|
129
|
+
command.query['filter'] = filter unless filter.nil?
|
130
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
131
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
132
|
+
command.query['view'] = view unless view.nil?
|
81
133
|
command.query['fields'] = fields unless fields.nil?
|
82
134
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
135
|
execute_or_queue_command(command, &block)
|
84
136
|
end
|
85
137
|
|
86
|
-
#
|
87
|
-
#
|
88
|
-
# binding allows API services to override the binding to use different resource
|
89
|
-
# name schemes, such as `users/*/operations`. To override the binding, API
|
90
|
-
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
91
|
-
# service configuration. For backwards compatibility, the default name includes
|
92
|
-
# the operations collection id, however overriding users must ensure the name
|
93
|
-
# binding is the parent resource, without the operations collection id.
|
138
|
+
# Get the OS policy asssignment report for the specified Compute Engine VM
|
139
|
+
# instance.
|
94
140
|
# @param [String] name
|
95
|
-
#
|
141
|
+
# Required. API resource name for OS policy assignment report. Format: `/
|
142
|
+
# projects/`project`/locations/`location`/instances/`instance`/
|
143
|
+
# osPolicyAssignments/`assignment`/report` For ``project``, either `project-
|
144
|
+
# number` or `project-id` can be provided. For ``instance_id``, either Compute
|
145
|
+
# Engine `instance-id` or `instance-name` can be provided. For ``assignment_id``,
|
146
|
+
# the OSPolicyAssignment id must be provided.
|
147
|
+
# @param [String] fields
|
148
|
+
# Selector specifying which fields to include in a partial response.
|
149
|
+
# @param [String] quota_user
|
150
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
151
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
152
|
+
# @param [Google::Apis::RequestOptions] options
|
153
|
+
# Request-specific options
|
154
|
+
#
|
155
|
+
# @yield [result, err] Result & error if block supplied
|
156
|
+
# @yieldparam result [Google::Apis::OsconfigV1::OsPolicyAssignmentReport] parsed result object
|
157
|
+
# @yieldparam err [StandardError] error object if request failed
|
158
|
+
#
|
159
|
+
# @return [Google::Apis::OsconfigV1::OsPolicyAssignmentReport]
|
160
|
+
#
|
161
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
162
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
163
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
164
|
+
def get_project_location_instance_os_policy_assignment_report(name, fields: nil, quota_user: nil, options: nil, &block)
|
165
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
166
|
+
command.response_representation = Google::Apis::OsconfigV1::OsPolicyAssignmentReport::Representation
|
167
|
+
command.response_class = Google::Apis::OsconfigV1::OsPolicyAssignmentReport
|
168
|
+
command.params['name'] = name unless name.nil?
|
169
|
+
command.query['fields'] = fields unless fields.nil?
|
170
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
171
|
+
execute_or_queue_command(command, &block)
|
172
|
+
end
|
173
|
+
|
174
|
+
# List OS policy asssignment reports for all Compute Engine VM instances in the
|
175
|
+
# specified zone.
|
176
|
+
# @param [String] parent
|
177
|
+
# Required. The parent resource name. Format: `projects/`project`/locations/`
|
178
|
+
# location`/instances/`instance`/osPolicyAssignments/`assignment`/reports` For ``
|
179
|
+
# project``, either `project-number` or `project-id` can be provided. For ``
|
180
|
+
# instance``, either `instance-name`, `instance-id`, or `-` can be provided. If '
|
181
|
+
# -' is provided, the response will include OSPolicyAssignmentReports for all
|
182
|
+
# instances in the project/location. For ``assignment``, either `assignment-id`
|
183
|
+
# or `-` can be provided. If '-' is provided, the response will include
|
184
|
+
# OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location.
|
185
|
+
# Either `instance` or `assignment` must be `-`. For example: `projects/`project`
|
186
|
+
# /locations/`location`/instances/`instance`/osPolicyAssignments/-/reports`
|
187
|
+
# returns all reports for the instance `projects/`project`/locations/`location`/
|
188
|
+
# instances/-/osPolicyAssignments/`assignment-id`/reports` returns all the
|
189
|
+
# reports for the given assignment across all instances. `projects/`project`/
|
190
|
+
# locations/`location`/instances/-/osPolicyAssignments/-/reports` returns all
|
191
|
+
# the reports for all assignments across all instances.
|
96
192
|
# @param [String] filter
|
97
|
-
#
|
193
|
+
# If provided, this field specifies the criteria that must be met by the `
|
194
|
+
# OSPolicyAssignmentReport` API resource that is included in the response.
|
98
195
|
# @param [Fixnum] page_size
|
99
|
-
# The
|
196
|
+
# The maximum number of results to return.
|
100
197
|
# @param [String] page_token
|
101
|
-
#
|
198
|
+
# A pagination token returned from a previous call to the `
|
199
|
+
# ListOSPolicyAssignmentReports` method that indicates where this listing should
|
200
|
+
# continue from.
|
102
201
|
# @param [String] fields
|
103
202
|
# Selector specifying which fields to include in a partial response.
|
104
203
|
# @param [String] quota_user
|
@@ -108,19 +207,97 @@ module Google
|
|
108
207
|
# Request-specific options
|
109
208
|
#
|
110
209
|
# @yield [result, err] Result & error if block supplied
|
111
|
-
# @yieldparam result [Google::Apis::OsconfigV1::
|
210
|
+
# @yieldparam result [Google::Apis::OsconfigV1::ListOsPolicyAssignmentReportsResponse] parsed result object
|
112
211
|
# @yieldparam err [StandardError] error object if request failed
|
113
212
|
#
|
114
|
-
# @return [Google::Apis::OsconfigV1::
|
213
|
+
# @return [Google::Apis::OsconfigV1::ListOsPolicyAssignmentReportsResponse]
|
115
214
|
#
|
116
215
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
117
216
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
118
217
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
119
|
-
def
|
218
|
+
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)
|
219
|
+
command = make_simple_command(:get, 'v1/{+parent}/reports', options)
|
220
|
+
command.response_representation = Google::Apis::OsconfigV1::ListOsPolicyAssignmentReportsResponse::Representation
|
221
|
+
command.response_class = Google::Apis::OsconfigV1::ListOsPolicyAssignmentReportsResponse
|
222
|
+
command.params['parent'] = parent unless parent.nil?
|
223
|
+
command.query['filter'] = filter unless filter.nil?
|
224
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
225
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
226
|
+
command.query['fields'] = fields unless fields.nil?
|
227
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
228
|
+
execute_or_queue_command(command, &block)
|
229
|
+
end
|
230
|
+
|
231
|
+
# Gets the vulnerability report for the specified VM instance. Only VMs with
|
232
|
+
# inventory data have vulnerability reports associated with them.
|
233
|
+
# @param [String] name
|
234
|
+
# Required. API resource name for vulnerability resource. Format: `projects/`
|
235
|
+
# project`/locations/`location`/instances/`instance`/vulnerabilityReport` For ``
|
236
|
+
# project``, either `project-number` or `project-id` can be provided. For ``
|
237
|
+
# instance``, either Compute Engine `instance-id` or `instance-name` can be
|
238
|
+
# provided.
|
239
|
+
# @param [String] fields
|
240
|
+
# Selector specifying which fields to include in a partial response.
|
241
|
+
# @param [String] quota_user
|
242
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
243
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
244
|
+
# @param [Google::Apis::RequestOptions] options
|
245
|
+
# Request-specific options
|
246
|
+
#
|
247
|
+
# @yield [result, err] Result & error if block supplied
|
248
|
+
# @yieldparam result [Google::Apis::OsconfigV1::VulnerabilityReport] parsed result object
|
249
|
+
# @yieldparam err [StandardError] error object if request failed
|
250
|
+
#
|
251
|
+
# @return [Google::Apis::OsconfigV1::VulnerabilityReport]
|
252
|
+
#
|
253
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
254
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
255
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
256
|
+
def get_project_location_instance_vulnerability_report(name, fields: nil, quota_user: nil, options: nil, &block)
|
120
257
|
command = make_simple_command(:get, 'v1/{+name}', options)
|
121
|
-
command.response_representation = Google::Apis::OsconfigV1::
|
122
|
-
command.response_class = Google::Apis::OsconfigV1::
|
258
|
+
command.response_representation = Google::Apis::OsconfigV1::VulnerabilityReport::Representation
|
259
|
+
command.response_class = Google::Apis::OsconfigV1::VulnerabilityReport
|
123
260
|
command.params['name'] = name unless name.nil?
|
261
|
+
command.query['fields'] = fields unless fields.nil?
|
262
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
263
|
+
execute_or_queue_command(command, &block)
|
264
|
+
end
|
265
|
+
|
266
|
+
# List vulnerability reports for all VM instances in the specified zone.
|
267
|
+
# @param [String] parent
|
268
|
+
# Required. The parent resource name. Format: `projects/`project`/locations/`
|
269
|
+
# location`/instances/-` For ``project``, either `project-number` or `project-id`
|
270
|
+
# can be provided.
|
271
|
+
# @param [String] filter
|
272
|
+
# If provided, this field specifies the criteria that must be met by a `
|
273
|
+
# vulnerabilityReport` API resource to be included in the response.
|
274
|
+
# @param [Fixnum] page_size
|
275
|
+
# The maximum number of results to return.
|
276
|
+
# @param [String] page_token
|
277
|
+
# A pagination token returned from a previous call to `ListVulnerabilityReports`
|
278
|
+
# that indicates where this listing should continue from.
|
279
|
+
# @param [String] fields
|
280
|
+
# Selector specifying which fields to include in a partial response.
|
281
|
+
# @param [String] quota_user
|
282
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
283
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
284
|
+
# @param [Google::Apis::RequestOptions] options
|
285
|
+
# Request-specific options
|
286
|
+
#
|
287
|
+
# @yield [result, err] Result & error if block supplied
|
288
|
+
# @yieldparam result [Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse] parsed result object
|
289
|
+
# @yieldparam err [StandardError] error object if request failed
|
290
|
+
#
|
291
|
+
# @return [Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse]
|
292
|
+
#
|
293
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
294
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
295
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
296
|
+
def list_project_location_instance_vulnerability_reports(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
297
|
+
command = make_simple_command(:get, 'v1/{+parent}/vulnerabilityReports', options)
|
298
|
+
command.response_representation = Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse::Representation
|
299
|
+
command.response_class = Google::Apis::OsconfigV1::ListVulnerabilityReportsResponse
|
300
|
+
command.params['parent'] = parent unless parent.nil?
|
124
301
|
command.query['filter'] = filter unless filter.nil?
|
125
302
|
command.query['pageSize'] = page_size unless page_size.nil?
|
126
303
|
command.query['pageToken'] = page_token unless page_token.nil?
|
@@ -129,6 +306,313 @@ module Google
|
|
129
306
|
execute_or_queue_command(command, &block)
|
130
307
|
end
|
131
308
|
|
309
|
+
# Create an OS policy assignment. This method also creates the first revision of
|
310
|
+
# the OS policy assignment. This method returns a long running operation (LRO)
|
311
|
+
# that contains the rollout details. The rollout can be cancelled by cancelling
|
312
|
+
# the LRO. For more information, see [Method: projects.locations.
|
313
|
+
# osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/
|
314
|
+
# osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
|
315
|
+
# @param [String] parent
|
316
|
+
# Required. The parent resource name in the form: projects/`project`/locations/`
|
317
|
+
# location`
|
318
|
+
# @param [Google::Apis::OsconfigV1::OsPolicyAssignment] os_policy_assignment_object
|
319
|
+
# @param [String] os_policy_assignment_id
|
320
|
+
# Required. The logical name of the OS policy assignment in the project with the
|
321
|
+
# following restrictions: * Must contain only lowercase letters, numbers, and
|
322
|
+
# hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must
|
323
|
+
# end with a number or a letter. * Must be unique within the project.
|
324
|
+
# @param [String] fields
|
325
|
+
# Selector specifying which fields to include in a partial response.
|
326
|
+
# @param [String] quota_user
|
327
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
328
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
329
|
+
# @param [Google::Apis::RequestOptions] options
|
330
|
+
# Request-specific options
|
331
|
+
#
|
332
|
+
# @yield [result, err] Result & error if block supplied
|
333
|
+
# @yieldparam result [Google::Apis::OsconfigV1::Operation] parsed result object
|
334
|
+
# @yieldparam err [StandardError] error object if request failed
|
335
|
+
#
|
336
|
+
# @return [Google::Apis::OsconfigV1::Operation]
|
337
|
+
#
|
338
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
339
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
340
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
341
|
+
def create_project_location_os_policy_assignment(parent, os_policy_assignment_object = nil, os_policy_assignment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
342
|
+
command = make_simple_command(:post, 'v1/{+parent}/osPolicyAssignments', options)
|
343
|
+
command.request_representation = Google::Apis::OsconfigV1::OsPolicyAssignment::Representation
|
344
|
+
command.request_object = os_policy_assignment_object
|
345
|
+
command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
|
346
|
+
command.response_class = Google::Apis::OsconfigV1::Operation
|
347
|
+
command.params['parent'] = parent unless parent.nil?
|
348
|
+
command.query['osPolicyAssignmentId'] = os_policy_assignment_id unless os_policy_assignment_id.nil?
|
349
|
+
command.query['fields'] = fields unless fields.nil?
|
350
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
351
|
+
execute_or_queue_command(command, &block)
|
352
|
+
end
|
353
|
+
|
354
|
+
# Delete the OS policy assignment. This method creates a new revision of the OS
|
355
|
+
# policy assignment. This method returns a long running operation (LRO) that
|
356
|
+
# contains the rollout details. The rollout can be cancelled by cancelling the
|
357
|
+
# LRO. If the LRO completes and is not cancelled, all revisions associated with
|
358
|
+
# the OS policy assignment are deleted. For more information, see [Method:
|
359
|
+
# projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.
|
360
|
+
# com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.
|
361
|
+
# operations/cancel).
|
362
|
+
# @param [String] name
|
363
|
+
# Required. The name of the OS policy assignment to be deleted
|
364
|
+
# @param [String] fields
|
365
|
+
# Selector specifying which fields to include in a partial response.
|
366
|
+
# @param [String] quota_user
|
367
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
368
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
369
|
+
# @param [Google::Apis::RequestOptions] options
|
370
|
+
# Request-specific options
|
371
|
+
#
|
372
|
+
# @yield [result, err] Result & error if block supplied
|
373
|
+
# @yieldparam result [Google::Apis::OsconfigV1::Operation] parsed result object
|
374
|
+
# @yieldparam err [StandardError] error object if request failed
|
375
|
+
#
|
376
|
+
# @return [Google::Apis::OsconfigV1::Operation]
|
377
|
+
#
|
378
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
379
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
380
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
381
|
+
def delete_project_location_os_policy_assignment(name, fields: nil, quota_user: nil, options: nil, &block)
|
382
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
383
|
+
command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
|
384
|
+
command.response_class = Google::Apis::OsconfigV1::Operation
|
385
|
+
command.params['name'] = name unless name.nil?
|
386
|
+
command.query['fields'] = fields unless fields.nil?
|
387
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
388
|
+
execute_or_queue_command(command, &block)
|
389
|
+
end
|
390
|
+
|
391
|
+
# Retrieve an existing OS policy assignment. This method always returns the
|
392
|
+
# latest revision. In order to retrieve a previous revision of the assignment,
|
393
|
+
# also provide the revision ID in the `name` parameter.
|
394
|
+
# @param [String] name
|
395
|
+
# Required. The resource name of OS policy assignment. Format: `projects/`
|
396
|
+
# project`/locations/`location`/osPolicyAssignments/`os_policy_assignment`@`
|
397
|
+
# revisionId``
|
398
|
+
# @param [String] fields
|
399
|
+
# Selector specifying which fields to include in a partial response.
|
400
|
+
# @param [String] quota_user
|
401
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
402
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
403
|
+
# @param [Google::Apis::RequestOptions] options
|
404
|
+
# Request-specific options
|
405
|
+
#
|
406
|
+
# @yield [result, err] Result & error if block supplied
|
407
|
+
# @yieldparam result [Google::Apis::OsconfigV1::OsPolicyAssignment] parsed result object
|
408
|
+
# @yieldparam err [StandardError] error object if request failed
|
409
|
+
#
|
410
|
+
# @return [Google::Apis::OsconfigV1::OsPolicyAssignment]
|
411
|
+
#
|
412
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
413
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
414
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
415
|
+
def get_project_location_os_policy_assignment(name, fields: nil, quota_user: nil, options: nil, &block)
|
416
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
417
|
+
command.response_representation = Google::Apis::OsconfigV1::OsPolicyAssignment::Representation
|
418
|
+
command.response_class = Google::Apis::OsconfigV1::OsPolicyAssignment
|
419
|
+
command.params['name'] = name unless name.nil?
|
420
|
+
command.query['fields'] = fields unless fields.nil?
|
421
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
422
|
+
execute_or_queue_command(command, &block)
|
423
|
+
end
|
424
|
+
|
425
|
+
# List the OS policy assignments under the parent resource. For each OS policy
|
426
|
+
# assignment, the latest revision is returned.
|
427
|
+
# @param [String] parent
|
428
|
+
# Required. The parent resource name.
|
429
|
+
# @param [Fixnum] page_size
|
430
|
+
# The maximum number of assignments to return.
|
431
|
+
# @param [String] page_token
|
432
|
+
# A pagination token returned from a previous call to `ListOSPolicyAssignments`
|
433
|
+
# that indicates where this listing should continue from.
|
434
|
+
# @param [String] fields
|
435
|
+
# Selector specifying which fields to include in a partial response.
|
436
|
+
# @param [String] quota_user
|
437
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
438
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
439
|
+
# @param [Google::Apis::RequestOptions] options
|
440
|
+
# Request-specific options
|
441
|
+
#
|
442
|
+
# @yield [result, err] Result & error if block supplied
|
443
|
+
# @yieldparam result [Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse] parsed result object
|
444
|
+
# @yieldparam err [StandardError] error object if request failed
|
445
|
+
#
|
446
|
+
# @return [Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse]
|
447
|
+
#
|
448
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
449
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
450
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
451
|
+
def list_project_location_os_policy_assignments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
452
|
+
command = make_simple_command(:get, 'v1/{+parent}/osPolicyAssignments', options)
|
453
|
+
command.response_representation = Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse::Representation
|
454
|
+
command.response_class = Google::Apis::OsconfigV1::ListOsPolicyAssignmentsResponse
|
455
|
+
command.params['parent'] = parent unless parent.nil?
|
456
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
457
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
458
|
+
command.query['fields'] = fields unless fields.nil?
|
459
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
460
|
+
execute_or_queue_command(command, &block)
|
461
|
+
end
|
462
|
+
|
463
|
+
# List the OS policy assignment revisions for a given OS policy assignment.
|
464
|
+
# @param [String] name
|
465
|
+
# Required. The name of the OS policy assignment to list revisions for.
|
466
|
+
# @param [Fixnum] page_size
|
467
|
+
# The maximum number of revisions to return.
|
468
|
+
# @param [String] page_token
|
469
|
+
# A pagination token returned from a previous call to `
|
470
|
+
# ListOSPolicyAssignmentRevisions` that indicates where this listing should
|
471
|
+
# continue from.
|
472
|
+
# @param [String] fields
|
473
|
+
# Selector specifying which fields to include in a partial response.
|
474
|
+
# @param [String] quota_user
|
475
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
476
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
477
|
+
# @param [Google::Apis::RequestOptions] options
|
478
|
+
# Request-specific options
|
479
|
+
#
|
480
|
+
# @yield [result, err] Result & error if block supplied
|
481
|
+
# @yieldparam result [Google::Apis::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse] parsed result object
|
482
|
+
# @yieldparam err [StandardError] error object if request failed
|
483
|
+
#
|
484
|
+
# @return [Google::Apis::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse]
|
485
|
+
#
|
486
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
487
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
488
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
489
|
+
def list_project_location_os_policy_assignment_revisions(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
490
|
+
command = make_simple_command(:get, 'v1/{+name}:listRevisions', options)
|
491
|
+
command.response_representation = Google::Apis::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse::Representation
|
492
|
+
command.response_class = Google::Apis::OsconfigV1::ListOsPolicyAssignmentRevisionsResponse
|
493
|
+
command.params['name'] = name unless name.nil?
|
494
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
495
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
496
|
+
command.query['fields'] = fields unless fields.nil?
|
497
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
498
|
+
execute_or_queue_command(command, &block)
|
499
|
+
end
|
500
|
+
|
501
|
+
# Update an existing OS policy assignment. This method creates a new revision of
|
502
|
+
# the OS policy assignment. This method returns a long running operation (LRO)
|
503
|
+
# that contains the rollout details. The rollout can be cancelled by cancelling
|
504
|
+
# the LRO. For more information, see [Method: projects.locations.
|
505
|
+
# osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/
|
506
|
+
# osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
|
507
|
+
# @param [String] name
|
508
|
+
# Resource name. Format: `projects/`project_number`/locations/`location`/
|
509
|
+
# osPolicyAssignments/`os_policy_assignment_id`` This field is ignored when you
|
510
|
+
# create an OS policy assignment.
|
511
|
+
# @param [Google::Apis::OsconfigV1::OsPolicyAssignment] os_policy_assignment_object
|
512
|
+
# @param [String] update_mask
|
513
|
+
# Optional. Field mask that controls which fields of the assignment should be
|
514
|
+
# updated.
|
515
|
+
# @param [String] fields
|
516
|
+
# Selector specifying which fields to include in a partial response.
|
517
|
+
# @param [String] quota_user
|
518
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
519
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
520
|
+
# @param [Google::Apis::RequestOptions] options
|
521
|
+
# Request-specific options
|
522
|
+
#
|
523
|
+
# @yield [result, err] Result & error if block supplied
|
524
|
+
# @yieldparam result [Google::Apis::OsconfigV1::Operation] parsed result object
|
525
|
+
# @yieldparam err [StandardError] error object if request failed
|
526
|
+
#
|
527
|
+
# @return [Google::Apis::OsconfigV1::Operation]
|
528
|
+
#
|
529
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
530
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
531
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
532
|
+
def patch_project_location_os_policy_assignment(name, os_policy_assignment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
533
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
534
|
+
command.request_representation = Google::Apis::OsconfigV1::OsPolicyAssignment::Representation
|
535
|
+
command.request_object = os_policy_assignment_object
|
536
|
+
command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
|
537
|
+
command.response_class = Google::Apis::OsconfigV1::Operation
|
538
|
+
command.params['name'] = name unless name.nil?
|
539
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
540
|
+
command.query['fields'] = fields unless fields.nil?
|
541
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
542
|
+
execute_or_queue_command(command, &block)
|
543
|
+
end
|
544
|
+
|
545
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
546
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
547
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
548
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
549
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
550
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
551
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
552
|
+
# corresponding to `Code.CANCELLED`.
|
553
|
+
# @param [String] name
|
554
|
+
# The name of the operation resource to be cancelled.
|
555
|
+
# @param [Google::Apis::OsconfigV1::CancelOperationRequest] cancel_operation_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::OsconfigV1::Empty] parsed result object
|
566
|
+
# @yieldparam err [StandardError] error object if request failed
|
567
|
+
#
|
568
|
+
# @return [Google::Apis::OsconfigV1::Empty]
|
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 cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
574
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
575
|
+
command.request_representation = Google::Apis::OsconfigV1::CancelOperationRequest::Representation
|
576
|
+
command.request_object = cancel_operation_request_object
|
577
|
+
command.response_representation = Google::Apis::OsconfigV1::Empty::Representation
|
578
|
+
command.response_class = Google::Apis::OsconfigV1::Empty
|
579
|
+
command.params['name'] = name unless name.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
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
586
|
+
# to poll the operation result at intervals as recommended by the API service.
|
587
|
+
# @param [String] name
|
588
|
+
# The name of the operation resource.
|
589
|
+
# @param [String] fields
|
590
|
+
# Selector specifying which fields to include in a partial response.
|
591
|
+
# @param [String] quota_user
|
592
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
593
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
594
|
+
# @param [Google::Apis::RequestOptions] options
|
595
|
+
# Request-specific options
|
596
|
+
#
|
597
|
+
# @yield [result, err] Result & error if block supplied
|
598
|
+
# @yieldparam result [Google::Apis::OsconfigV1::Operation] parsed result object
|
599
|
+
# @yieldparam err [StandardError] error object if request failed
|
600
|
+
#
|
601
|
+
# @return [Google::Apis::OsconfigV1::Operation]
|
602
|
+
#
|
603
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
604
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
605
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
606
|
+
def get_project_location_os_policy_assignment_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
607
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
608
|
+
command.response_representation = Google::Apis::OsconfigV1::Operation::Representation
|
609
|
+
command.response_class = Google::Apis::OsconfigV1::Operation
|
610
|
+
command.params['name'] = name unless name.nil?
|
611
|
+
command.query['fields'] = fields unless fields.nil?
|
612
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
613
|
+
execute_or_queue_command(command, &block)
|
614
|
+
end
|
615
|
+
|
132
616
|
# Create an OS Config patch deployment.
|
133
617
|
# @param [String] parent
|
134
618
|
# Required. The project to apply this patch deployment to in the form `projects/*
|
@@ -268,6 +752,46 @@ module Google
|
|
268
752
|
execute_or_queue_command(command, &block)
|
269
753
|
end
|
270
754
|
|
755
|
+
# Update an OS Config patch deployment.
|
756
|
+
# @param [String] name
|
757
|
+
# Unique name for the patch deployment resource in a project. The patch
|
758
|
+
# deployment name is in the form: `projects/`project_id`/patchDeployments/`
|
759
|
+
# patch_deployment_id``. This field is ignored when you create a new patch
|
760
|
+
# deployment.
|
761
|
+
# @param [Google::Apis::OsconfigV1::PatchDeployment] patch_deployment_object
|
762
|
+
# @param [String] update_mask
|
763
|
+
# Optional. Field mask that controls which fields of the patch deployment should
|
764
|
+
# be updated.
|
765
|
+
# @param [String] fields
|
766
|
+
# Selector specifying which fields to include in a partial response.
|
767
|
+
# @param [String] quota_user
|
768
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
769
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
770
|
+
# @param [Google::Apis::RequestOptions] options
|
771
|
+
# Request-specific options
|
772
|
+
#
|
773
|
+
# @yield [result, err] Result & error if block supplied
|
774
|
+
# @yieldparam result [Google::Apis::OsconfigV1::PatchDeployment] parsed result object
|
775
|
+
# @yieldparam err [StandardError] error object if request failed
|
776
|
+
#
|
777
|
+
# @return [Google::Apis::OsconfigV1::PatchDeployment]
|
778
|
+
#
|
779
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
780
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
781
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
782
|
+
def patch_project_patch_deployment(name, patch_deployment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
783
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
784
|
+
command.request_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
|
785
|
+
command.request_object = patch_deployment_object
|
786
|
+
command.response_representation = Google::Apis::OsconfigV1::PatchDeployment::Representation
|
787
|
+
command.response_class = Google::Apis::OsconfigV1::PatchDeployment
|
788
|
+
command.params['name'] = name unless name.nil?
|
789
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
790
|
+
command.query['fields'] = fields unless fields.nil?
|
791
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
792
|
+
execute_or_queue_command(command, &block)
|
793
|
+
end
|
794
|
+
|
271
795
|
# Cancel a patch job. The patch job must be active. Canceled patch jobs cannot
|
272
796
|
# be restarted.
|
273
797
|
# @param [String] name
|
@@ -30,7 +30,7 @@ module Google
|
|
30
30
|
# This is NOT the gem version.
|
31
31
|
VERSION = 'V1'
|
32
32
|
|
33
|
-
# See, edit, configure, and delete your Google Cloud
|
33
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
34
34
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
35
|
end
|
36
36
|
end
|