google-apis-osconfig_v2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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_v2/classes.rb +1872 -0
- data/lib/google/apis/osconfig_v2/gem_version.rb +28 -0
- data/lib/google/apis/osconfig_v2/representations.rb +800 -0
- data/lib/google/apis/osconfig_v2/service.rb +1180 -0
- data/lib/google/apis/osconfig_v2.rb +37 -0
- data/lib/google-apis-osconfig_v2.rb +15 -0
- metadata +79 -0
@@ -0,0 +1,1872 @@
|
|
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 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module OsconfigV2
|
24
|
+
|
25
|
+
# The request message for Operations.CancelOperation.
|
26
|
+
class CancelOperationRequest
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
def initialize(**args)
|
30
|
+
update!(**args)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Update properties of this object
|
34
|
+
def update!(**args)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
39
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
40
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
41
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
42
|
+
class Empty
|
43
|
+
include Google::Apis::Core::Hashable
|
44
|
+
|
45
|
+
def initialize(**args)
|
46
|
+
update!(**args)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Update properties of this object
|
50
|
+
def update!(**args)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Message encapsulating a value that can be either absolute ("fixed") or
|
55
|
+
# relative ("percent") to a value.
|
56
|
+
class FixedOrPercent
|
57
|
+
include Google::Apis::Core::Hashable
|
58
|
+
|
59
|
+
# Specifies a fixed value.
|
60
|
+
# Corresponds to the JSON property `fixed`
|
61
|
+
# @return [Fixnum]
|
62
|
+
attr_accessor :fixed
|
63
|
+
|
64
|
+
# Specifies the relative value defined as a percentage, which will be multiplied
|
65
|
+
# by a reference value.
|
66
|
+
# Corresponds to the JSON property `percent`
|
67
|
+
# @return [Fixnum]
|
68
|
+
attr_accessor :percent
|
69
|
+
|
70
|
+
def initialize(**args)
|
71
|
+
update!(**args)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Update properties of this object
|
75
|
+
def update!(**args)
|
76
|
+
@fixed = args[:fixed] if args.key?(:fixed)
|
77
|
+
@percent = args[:percent] if args.key?(:percent)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# OS policy assignment operation metadata provided by OS policy assignment API
|
82
|
+
# methods that return long running operations.
|
83
|
+
class GoogleCloudOsconfigV1OsPolicyAssignmentOperationMetadata
|
84
|
+
include Google::Apis::Core::Hashable
|
85
|
+
|
86
|
+
# The OS policy assignment API method.
|
87
|
+
# Corresponds to the JSON property `apiMethod`
|
88
|
+
# @return [String]
|
89
|
+
attr_accessor :api_method
|
90
|
+
|
91
|
+
# Reference to the `OSPolicyAssignment` API resource. Format: `projects/`
|
92
|
+
# project_number`/locations/`location`/osPolicyAssignments/`
|
93
|
+
# os_policy_assignment_id@revision_id``
|
94
|
+
# Corresponds to the JSON property `osPolicyAssignment`
|
95
|
+
# @return [String]
|
96
|
+
attr_accessor :os_policy_assignment
|
97
|
+
|
98
|
+
# Rollout start time
|
99
|
+
# Corresponds to the JSON property `rolloutStartTime`
|
100
|
+
# @return [String]
|
101
|
+
attr_accessor :rollout_start_time
|
102
|
+
|
103
|
+
# State of the rollout
|
104
|
+
# Corresponds to the JSON property `rolloutState`
|
105
|
+
# @return [String]
|
106
|
+
attr_accessor :rollout_state
|
107
|
+
|
108
|
+
# Rollout update time
|
109
|
+
# Corresponds to the JSON property `rolloutUpdateTime`
|
110
|
+
# @return [String]
|
111
|
+
attr_accessor :rollout_update_time
|
112
|
+
|
113
|
+
def initialize(**args)
|
114
|
+
update!(**args)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Update properties of this object
|
118
|
+
def update!(**args)
|
119
|
+
@api_method = args[:api_method] if args.key?(:api_method)
|
120
|
+
@os_policy_assignment = args[:os_policy_assignment] if args.key?(:os_policy_assignment)
|
121
|
+
@rollout_start_time = args[:rollout_start_time] if args.key?(:rollout_start_time)
|
122
|
+
@rollout_state = args[:rollout_state] if args.key?(:rollout_state)
|
123
|
+
@rollout_update_time = args[:rollout_update_time] if args.key?(:rollout_update_time)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Selector containing locations in scope.
|
128
|
+
class GoogleCloudOsconfigV2OrchestrationScopeLocationSelector
|
129
|
+
include Google::Apis::Core::Hashable
|
130
|
+
|
131
|
+
# Optional. Names of the locations in scope. Format: `us-central1-a`
|
132
|
+
# Corresponds to the JSON property `includedLocations`
|
133
|
+
# @return [Array<String>]
|
134
|
+
attr_accessor :included_locations
|
135
|
+
|
136
|
+
def initialize(**args)
|
137
|
+
update!(**args)
|
138
|
+
end
|
139
|
+
|
140
|
+
# Update properties of this object
|
141
|
+
def update!(**args)
|
142
|
+
@included_locations = args[:included_locations] if args.key?(:included_locations)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Selector containing Cloud Resource Manager resource hierarchy nodes.
|
147
|
+
class GoogleCloudOsconfigV2OrchestrationScopeResourceHierarchySelector
|
148
|
+
include Google::Apis::Core::Hashable
|
149
|
+
|
150
|
+
# Optional. Names of the folders in scope. Format: `folders/`folder_id``
|
151
|
+
# Corresponds to the JSON property `includedFolders`
|
152
|
+
# @return [Array<String>]
|
153
|
+
attr_accessor :included_folders
|
154
|
+
|
155
|
+
# Optional. Names of the projects in scope. Format: `projects/`project_number``
|
156
|
+
# Corresponds to the JSON property `includedProjects`
|
157
|
+
# @return [Array<String>]
|
158
|
+
attr_accessor :included_projects
|
159
|
+
|
160
|
+
def initialize(**args)
|
161
|
+
update!(**args)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Update properties of this object
|
165
|
+
def update!(**args)
|
166
|
+
@included_folders = args[:included_folders] if args.key?(:included_folders)
|
167
|
+
@included_projects = args[:included_projects] if args.key?(:included_projects)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Selector for the resources in scope of orchestration.
|
172
|
+
class GoogleCloudOsconfigV2OrchestrationScopeSelector
|
173
|
+
include Google::Apis::Core::Hashable
|
174
|
+
|
175
|
+
# Selector containing locations in scope.
|
176
|
+
# Corresponds to the JSON property `locationSelector`
|
177
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestrationScopeLocationSelector]
|
178
|
+
attr_accessor :location_selector
|
179
|
+
|
180
|
+
# Selector containing Cloud Resource Manager resource hierarchy nodes.
|
181
|
+
# Corresponds to the JSON property `resourceHierarchySelector`
|
182
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestrationScopeResourceHierarchySelector]
|
183
|
+
attr_accessor :resource_hierarchy_selector
|
184
|
+
|
185
|
+
def initialize(**args)
|
186
|
+
update!(**args)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Update properties of this object
|
190
|
+
def update!(**args)
|
191
|
+
@location_selector = args[:location_selector] if args.key?(:location_selector)
|
192
|
+
@resource_hierarchy_selector = args[:resource_hierarchy_selector] if args.key?(:resource_hierarchy_selector)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Describes the state of a single iteration of the orchestrator.
|
197
|
+
class GoogleCloudOsconfigV2PolicyOrchestratorIterationState
|
198
|
+
include Google::Apis::Core::Hashable
|
199
|
+
|
200
|
+
# The `Status` type defines a logical error model that is suitable for different
|
201
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
202
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
203
|
+
# data: error code, error message, and error details. You can find out more
|
204
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
205
|
+
# //cloud.google.com/apis/design/errors).
|
206
|
+
# Corresponds to the JSON property `error`
|
207
|
+
# @return [Google::Apis::OsconfigV2::Status]
|
208
|
+
attr_accessor :error
|
209
|
+
|
210
|
+
# Output only. Number of orchestration actions which failed so far. For more
|
211
|
+
# details, query the Cloud Logs.
|
212
|
+
# Corresponds to the JSON property `failedActions`
|
213
|
+
# @return [Fixnum]
|
214
|
+
attr_accessor :failed_actions
|
215
|
+
|
216
|
+
# Output only. Finish time of the wave iteration.
|
217
|
+
# Corresponds to the JSON property `finishTime`
|
218
|
+
# @return [String]
|
219
|
+
attr_accessor :finish_time
|
220
|
+
|
221
|
+
# Output only. Unique identifier of the iteration.
|
222
|
+
# Corresponds to the JSON property `iterationId`
|
223
|
+
# @return [String]
|
224
|
+
attr_accessor :iteration_id
|
225
|
+
|
226
|
+
# Output only. Overall number of actions done by the orchestrator so far.
|
227
|
+
# Corresponds to the JSON property `performedActions`
|
228
|
+
# @return [Fixnum]
|
229
|
+
attr_accessor :performed_actions
|
230
|
+
|
231
|
+
# Output only. An estimated percentage of the progress. Number between 0 and 100.
|
232
|
+
# Corresponds to the JSON property `progress`
|
233
|
+
# @return [Float]
|
234
|
+
attr_accessor :progress
|
235
|
+
|
236
|
+
# Output only. Start time of the wave iteration.
|
237
|
+
# Corresponds to the JSON property `startTime`
|
238
|
+
# @return [String]
|
239
|
+
attr_accessor :start_time
|
240
|
+
|
241
|
+
# Output only. State of the iteration.
|
242
|
+
# Corresponds to the JSON property `state`
|
243
|
+
# @return [String]
|
244
|
+
attr_accessor :state
|
245
|
+
|
246
|
+
def initialize(**args)
|
247
|
+
update!(**args)
|
248
|
+
end
|
249
|
+
|
250
|
+
# Update properties of this object
|
251
|
+
def update!(**args)
|
252
|
+
@error = args[:error] if args.key?(:error)
|
253
|
+
@failed_actions = args[:failed_actions] if args.key?(:failed_actions)
|
254
|
+
@finish_time = args[:finish_time] if args.key?(:finish_time)
|
255
|
+
@iteration_id = args[:iteration_id] if args.key?(:iteration_id)
|
256
|
+
@performed_actions = args[:performed_actions] if args.key?(:performed_actions)
|
257
|
+
@progress = args[:progress] if args.key?(:progress)
|
258
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
259
|
+
@state = args[:state] if args.key?(:state)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Describes the state of the orchestration process.
|
264
|
+
class GoogleCloudOsconfigV2PolicyOrchestratorOrchestrationState
|
265
|
+
include Google::Apis::Core::Hashable
|
266
|
+
|
267
|
+
# Describes the state of a single iteration of the orchestrator.
|
268
|
+
# Corresponds to the JSON property `currentIterationState`
|
269
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestratorIterationState]
|
270
|
+
attr_accessor :current_iteration_state
|
271
|
+
|
272
|
+
# Describes the state of a single iteration of the orchestrator.
|
273
|
+
# Corresponds to the JSON property `previousIterationState`
|
274
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestratorIterationState]
|
275
|
+
attr_accessor :previous_iteration_state
|
276
|
+
|
277
|
+
def initialize(**args)
|
278
|
+
update!(**args)
|
279
|
+
end
|
280
|
+
|
281
|
+
# Update properties of this object
|
282
|
+
def update!(**args)
|
283
|
+
@current_iteration_state = args[:current_iteration_state] if args.key?(:current_iteration_state)
|
284
|
+
@previous_iteration_state = args[:previous_iteration_state] if args.key?(:previous_iteration_state)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# Response for the list policy orchestrator resources.
|
289
|
+
class GoogleCloudOsconfigV2ListPolicyOrchestratorsResponse
|
290
|
+
include Google::Apis::Core::Hashable
|
291
|
+
|
292
|
+
# A token, which can be sent as `page_token` to retrieve the next page. If this
|
293
|
+
# field is omitted, there are no subsequent pages.
|
294
|
+
# Corresponds to the JSON property `nextPageToken`
|
295
|
+
# @return [String]
|
296
|
+
attr_accessor :next_page_token
|
297
|
+
|
298
|
+
# The policy orchestrators for the specified parent resource.
|
299
|
+
# Corresponds to the JSON property `policyOrchestrators`
|
300
|
+
# @return [Array<Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestrator>]
|
301
|
+
attr_accessor :policy_orchestrators
|
302
|
+
|
303
|
+
# Locations that could not be reached.
|
304
|
+
# Corresponds to the JSON property `unreachable`
|
305
|
+
# @return [Array<String>]
|
306
|
+
attr_accessor :unreachable
|
307
|
+
|
308
|
+
def initialize(**args)
|
309
|
+
update!(**args)
|
310
|
+
end
|
311
|
+
|
312
|
+
# Update properties of this object
|
313
|
+
def update!(**args)
|
314
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
315
|
+
@policy_orchestrators = args[:policy_orchestrators] if args.key?(:policy_orchestrators)
|
316
|
+
@unreachable = args[:unreachable] if args.key?(:unreachable)
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
# Represents the metadata of the long-running operation.
|
321
|
+
class GoogleCloudOsconfigV2OperationMetadata
|
322
|
+
include Google::Apis::Core::Hashable
|
323
|
+
|
324
|
+
# Output only. API version used to start the operation.
|
325
|
+
# Corresponds to the JSON property `apiVersion`
|
326
|
+
# @return [String]
|
327
|
+
attr_accessor :api_version
|
328
|
+
|
329
|
+
# Output only. The time the operation was created.
|
330
|
+
# Corresponds to the JSON property `createTime`
|
331
|
+
# @return [String]
|
332
|
+
attr_accessor :create_time
|
333
|
+
|
334
|
+
# Output only. The time the operation finished running.
|
335
|
+
# Corresponds to the JSON property `endTime`
|
336
|
+
# @return [String]
|
337
|
+
attr_accessor :end_time
|
338
|
+
|
339
|
+
# Output only. Identifies whether the user has requested cancellation of the
|
340
|
+
# operation. Operations that have been cancelled successfully have Operation.
|
341
|
+
# error value with a google.rpc.Status.code of 1, corresponding to `Code.
|
342
|
+
# CANCELLED`.
|
343
|
+
# Corresponds to the JSON property `requestedCancellation`
|
344
|
+
# @return [Boolean]
|
345
|
+
attr_accessor :requested_cancellation
|
346
|
+
alias_method :requested_cancellation?, :requested_cancellation
|
347
|
+
|
348
|
+
# Output only. Human-readable status of the operation, if any.
|
349
|
+
# Corresponds to the JSON property `statusMessage`
|
350
|
+
# @return [String]
|
351
|
+
attr_accessor :status_message
|
352
|
+
|
353
|
+
# Output only. Server-defined resource path for the target of the operation.
|
354
|
+
# Corresponds to the JSON property `target`
|
355
|
+
# @return [String]
|
356
|
+
attr_accessor :target
|
357
|
+
|
358
|
+
# Output only. Name of the verb executed by the operation.
|
359
|
+
# Corresponds to the JSON property `verb`
|
360
|
+
# @return [String]
|
361
|
+
attr_accessor :verb
|
362
|
+
|
363
|
+
def initialize(**args)
|
364
|
+
update!(**args)
|
365
|
+
end
|
366
|
+
|
367
|
+
# Update properties of this object
|
368
|
+
def update!(**args)
|
369
|
+
@api_version = args[:api_version] if args.key?(:api_version)
|
370
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
371
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
372
|
+
@requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
|
373
|
+
@status_message = args[:status_message] if args.key?(:status_message)
|
374
|
+
@target = args[:target] if args.key?(:target)
|
375
|
+
@verb = args[:verb] if args.key?(:verb)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
# Represents a resource that is being orchestrated by the policy orchestrator.
|
380
|
+
class GoogleCloudOsconfigV2OrchestratedResource
|
381
|
+
include Google::Apis::Core::Hashable
|
382
|
+
|
383
|
+
# Optional. ID of the resource to be used while generating set of affected
|
384
|
+
# resources. For UPSERT action the value is auto-generated during
|
385
|
+
# PolicyOrchestrator creation when not set. When the value is set it should
|
386
|
+
# following next restrictions: * Must contain only lowercase letters, numbers,
|
387
|
+
# and hyphens. * Must start with a letter. * Must be between 1-63 characters. *
|
388
|
+
# Must end with a number or a letter. * Must be unique within the project. For
|
389
|
+
# DELETE action, ID must be specified explicitly during PolicyOrchestrator
|
390
|
+
# creation.
|
391
|
+
# Corresponds to the JSON property `id`
|
392
|
+
# @return [String]
|
393
|
+
attr_accessor :id
|
394
|
+
|
395
|
+
# OS policy assignment is an API resource that is used to apply a set of OS
|
396
|
+
# policies to a dynamically targeted group of Compute Engine VM instances. An OS
|
397
|
+
# policy is used to define the desired state configuration for a Compute Engine
|
398
|
+
# VM instance through a set of configuration resources that provide capabilities
|
399
|
+
# such as installing or removing software packages, or executing a script. For
|
400
|
+
# more information about the OS policy resource definitions and examples, see [
|
401
|
+
# OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-
|
402
|
+
# configuration-management/working-with-os-policies).
|
403
|
+
# Corresponds to the JSON property `osPolicyAssignmentV1Payload`
|
404
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyAssignment]
|
405
|
+
attr_accessor :os_policy_assignment_v1_payload
|
406
|
+
|
407
|
+
def initialize(**args)
|
408
|
+
update!(**args)
|
409
|
+
end
|
410
|
+
|
411
|
+
# Update properties of this object
|
412
|
+
def update!(**args)
|
413
|
+
@id = args[:id] if args.key?(:id)
|
414
|
+
@os_policy_assignment_v1_payload = args[:os_policy_assignment_v1_payload] if args.key?(:os_policy_assignment_v1_payload)
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
418
|
+
# Defines a set of selectors which drive which resources are in scope of policy
|
419
|
+
# orchestration.
|
420
|
+
class GoogleCloudOsconfigV2OrchestrationScope
|
421
|
+
include Google::Apis::Core::Hashable
|
422
|
+
|
423
|
+
# Optional. Selectors of the orchestration scope. There is a logical AND between
|
424
|
+
# each selector defined. When there is no explicit `ResourceHierarchySelector`
|
425
|
+
# selector specified, the scope is by default bounded to the parent of the
|
426
|
+
# policy orchestrator resource.
|
427
|
+
# Corresponds to the JSON property `selectors`
|
428
|
+
# @return [Array<Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestrationScopeSelector>]
|
429
|
+
attr_accessor :selectors
|
430
|
+
|
431
|
+
def initialize(**args)
|
432
|
+
update!(**args)
|
433
|
+
end
|
434
|
+
|
435
|
+
# Update properties of this object
|
436
|
+
def update!(**args)
|
437
|
+
@selectors = args[:selectors] if args.key?(:selectors)
|
438
|
+
end
|
439
|
+
end
|
440
|
+
|
441
|
+
# PolicyOrchestrator helps managing project+zone level policy resources (e.g. OS
|
442
|
+
# Policy Assignments), by providing tools to create, update and delete them
|
443
|
+
# across projects and locations, at scale. Policy orchestrator functions as an
|
444
|
+
# endless loop. Each iteration orchestrator computes a set of resources that
|
445
|
+
# should be affected, then progressively applies changes to them. If for some
|
446
|
+
# reason this set of resources changes over time (e.g. new projects are added),
|
447
|
+
# the future loop iterations will address that. Orchestrator can either upsert
|
448
|
+
# or delete policy resources. For more details, see the description of the `
|
449
|
+
# action`, and `orchestrated_resource` fields. Note that policy orchestrator do
|
450
|
+
# not "manage" the resources it creates. Every iteration is independent and only
|
451
|
+
# minimal history of past actions is retained (apart from Cloud Logging). If
|
452
|
+
# orchestrator gets deleted, it does not affect the resources it created in the
|
453
|
+
# past. Those will remain where they were. Same applies if projects are removed
|
454
|
+
# from the orchestrator's scope.
|
455
|
+
class GoogleCloudOsconfigV2PolicyOrchestrator
|
456
|
+
include Google::Apis::Core::Hashable
|
457
|
+
|
458
|
+
# Required. Action to be done by the orchestrator in `projects/`project_id`/
|
459
|
+
# zones/`zone_id`` locations defined by the `orchestration_scope`. Allowed
|
460
|
+
# values: - `UPSERT` - Orchestrator will create or update target resources. - `
|
461
|
+
# DELETE` - Orchestrator will delete target resources, if they exist
|
462
|
+
# Corresponds to the JSON property `action`
|
463
|
+
# @return [String]
|
464
|
+
attr_accessor :action
|
465
|
+
|
466
|
+
# Output only. Timestamp when the policy orchestrator resource was created.
|
467
|
+
# Corresponds to the JSON property `createTime`
|
468
|
+
# @return [String]
|
469
|
+
attr_accessor :create_time
|
470
|
+
|
471
|
+
# Optional. Freeform text describing the purpose of the resource.
|
472
|
+
# Corresponds to the JSON property `description`
|
473
|
+
# @return [String]
|
474
|
+
attr_accessor :description
|
475
|
+
|
476
|
+
# Output only. This checksum is computed by the server based on the value of
|
477
|
+
# other fields, and may be sent on update and delete requests to ensure the
|
478
|
+
# client has an up-to-date value before proceeding.
|
479
|
+
# Corresponds to the JSON property `etag`
|
480
|
+
# @return [String]
|
481
|
+
attr_accessor :etag
|
482
|
+
|
483
|
+
# Optional. Labels as key value pairs
|
484
|
+
# Corresponds to the JSON property `labels`
|
485
|
+
# @return [Hash<String,String>]
|
486
|
+
attr_accessor :labels
|
487
|
+
|
488
|
+
# Immutable. Identifier. In form of * `organizations/`organization_id`/locations/
|
489
|
+
# global/policyOrchestrators/`orchestrator_id`` * `folders/`folder_id`/locations/
|
490
|
+
# global/policyOrchestrators/`orchestrator_id`` * `projects/`
|
491
|
+
# project_id_or_number`/locations/global/policyOrchestrators/`orchestrator_id``
|
492
|
+
# Corresponds to the JSON property `name`
|
493
|
+
# @return [String]
|
494
|
+
attr_accessor :name
|
495
|
+
|
496
|
+
# Represents a resource that is being orchestrated by the policy orchestrator.
|
497
|
+
# Corresponds to the JSON property `orchestratedResource`
|
498
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestratedResource]
|
499
|
+
attr_accessor :orchestrated_resource
|
500
|
+
|
501
|
+
# Defines a set of selectors which drive which resources are in scope of policy
|
502
|
+
# orchestration.
|
503
|
+
# Corresponds to the JSON property `orchestrationScope`
|
504
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2OrchestrationScope]
|
505
|
+
attr_accessor :orchestration_scope
|
506
|
+
|
507
|
+
# Describes the state of the orchestration process.
|
508
|
+
# Corresponds to the JSON property `orchestrationState`
|
509
|
+
# @return [Google::Apis::OsconfigV2::GoogleCloudOsconfigV2PolicyOrchestratorOrchestrationState]
|
510
|
+
attr_accessor :orchestration_state
|
511
|
+
|
512
|
+
# Output only. Set to true, if the there are ongoing changes being applied by
|
513
|
+
# the orchestrator.
|
514
|
+
# Corresponds to the JSON property `reconciling`
|
515
|
+
# @return [Boolean]
|
516
|
+
attr_accessor :reconciling
|
517
|
+
alias_method :reconciling?, :reconciling
|
518
|
+
|
519
|
+
# Optional. State of the orchestrator. Can be updated to change orchestrator
|
520
|
+
# behaviour. Allowed values: - `ACTIVE` - orchestrator is actively looking for
|
521
|
+
# actions to be taken. - `STOPPED` - orchestrator won't make any changes. Note:
|
522
|
+
# There might be more states added in the future. We use string here instead of
|
523
|
+
# an enum, to avoid the need of propagating new states to all the client code.
|
524
|
+
# Corresponds to the JSON property `state`
|
525
|
+
# @return [String]
|
526
|
+
attr_accessor :state
|
527
|
+
|
528
|
+
# Output only. Timestamp when the policy orchestrator resource was last modified.
|
529
|
+
# Corresponds to the JSON property `updateTime`
|
530
|
+
# @return [String]
|
531
|
+
attr_accessor :update_time
|
532
|
+
|
533
|
+
def initialize(**args)
|
534
|
+
update!(**args)
|
535
|
+
end
|
536
|
+
|
537
|
+
# Update properties of this object
|
538
|
+
def update!(**args)
|
539
|
+
@action = args[:action] if args.key?(:action)
|
540
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
541
|
+
@description = args[:description] if args.key?(:description)
|
542
|
+
@etag = args[:etag] if args.key?(:etag)
|
543
|
+
@labels = args[:labels] if args.key?(:labels)
|
544
|
+
@name = args[:name] if args.key?(:name)
|
545
|
+
@orchestrated_resource = args[:orchestrated_resource] if args.key?(:orchestrated_resource)
|
546
|
+
@orchestration_scope = args[:orchestration_scope] if args.key?(:orchestration_scope)
|
547
|
+
@orchestration_state = args[:orchestration_state] if args.key?(:orchestration_state)
|
548
|
+
@reconciling = args[:reconciling] if args.key?(:reconciling)
|
549
|
+
@state = args[:state] if args.key?(:state)
|
550
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
# Represents the metadata of the long-running operation.
|
555
|
+
class GoogleCloudOsconfigV2betaOperationMetadata
|
556
|
+
include Google::Apis::Core::Hashable
|
557
|
+
|
558
|
+
# Output only. API version used to start the operation.
|
559
|
+
# Corresponds to the JSON property `apiVersion`
|
560
|
+
# @return [String]
|
561
|
+
attr_accessor :api_version
|
562
|
+
|
563
|
+
# Output only. The time the operation was created.
|
564
|
+
# Corresponds to the JSON property `createTime`
|
565
|
+
# @return [String]
|
566
|
+
attr_accessor :create_time
|
567
|
+
|
568
|
+
# Output only. The time the operation finished running.
|
569
|
+
# Corresponds to the JSON property `endTime`
|
570
|
+
# @return [String]
|
571
|
+
attr_accessor :end_time
|
572
|
+
|
573
|
+
# Output only. Identifies whether the user has requested cancellation of the
|
574
|
+
# operation. Operations that have been cancelled successfully have Operation.
|
575
|
+
# error value with a google.rpc.Status.code of 1, corresponding to `Code.
|
576
|
+
# CANCELLED`.
|
577
|
+
# Corresponds to the JSON property `requestedCancellation`
|
578
|
+
# @return [Boolean]
|
579
|
+
attr_accessor :requested_cancellation
|
580
|
+
alias_method :requested_cancellation?, :requested_cancellation
|
581
|
+
|
582
|
+
# Output only. Human-readable status of the operation, if any.
|
583
|
+
# Corresponds to the JSON property `statusMessage`
|
584
|
+
# @return [String]
|
585
|
+
attr_accessor :status_message
|
586
|
+
|
587
|
+
# Output only. Server-defined resource path for the target of the operation.
|
588
|
+
# Corresponds to the JSON property `target`
|
589
|
+
# @return [String]
|
590
|
+
attr_accessor :target
|
591
|
+
|
592
|
+
# Output only. Name of the verb executed by the operation.
|
593
|
+
# Corresponds to the JSON property `verb`
|
594
|
+
# @return [String]
|
595
|
+
attr_accessor :verb
|
596
|
+
|
597
|
+
def initialize(**args)
|
598
|
+
update!(**args)
|
599
|
+
end
|
600
|
+
|
601
|
+
# Update properties of this object
|
602
|
+
def update!(**args)
|
603
|
+
@api_version = args[:api_version] if args.key?(:api_version)
|
604
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
605
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
606
|
+
@requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
|
607
|
+
@status_message = args[:status_message] if args.key?(:status_message)
|
608
|
+
@target = args[:target] if args.key?(:target)
|
609
|
+
@verb = args[:verb] if args.key?(:verb)
|
610
|
+
end
|
611
|
+
end
|
612
|
+
|
613
|
+
# The response message for Operations.ListOperations.
|
614
|
+
class ListOperationsResponse
|
615
|
+
include Google::Apis::Core::Hashable
|
616
|
+
|
617
|
+
# The standard List next-page token.
|
618
|
+
# Corresponds to the JSON property `nextPageToken`
|
619
|
+
# @return [String]
|
620
|
+
attr_accessor :next_page_token
|
621
|
+
|
622
|
+
# A list of operations that matches the specified filter in the request.
|
623
|
+
# Corresponds to the JSON property `operations`
|
624
|
+
# @return [Array<Google::Apis::OsconfigV2::Operation>]
|
625
|
+
attr_accessor :operations
|
626
|
+
|
627
|
+
def initialize(**args)
|
628
|
+
update!(**args)
|
629
|
+
end
|
630
|
+
|
631
|
+
# Update properties of this object
|
632
|
+
def update!(**args)
|
633
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
634
|
+
@operations = args[:operations] if args.key?(:operations)
|
635
|
+
end
|
636
|
+
end
|
637
|
+
|
638
|
+
# An OS policy defines the desired state configuration for a VM.
|
639
|
+
class OsPolicy
|
640
|
+
include Google::Apis::Core::Hashable
|
641
|
+
|
642
|
+
# This flag determines the OS policy compliance status when none of the resource
|
643
|
+
# groups within the policy are applicable for a VM. Set this value to `true` if
|
644
|
+
# the policy needs to be reported as compliant even if the policy has nothing to
|
645
|
+
# validate or enforce.
|
646
|
+
# Corresponds to the JSON property `allowNoResourceGroupMatch`
|
647
|
+
# @return [Boolean]
|
648
|
+
attr_accessor :allow_no_resource_group_match
|
649
|
+
alias_method :allow_no_resource_group_match?, :allow_no_resource_group_match
|
650
|
+
|
651
|
+
# Policy description. Length of the description is limited to 1024 characters.
|
652
|
+
# Corresponds to the JSON property `description`
|
653
|
+
# @return [String]
|
654
|
+
attr_accessor :description
|
655
|
+
|
656
|
+
# Required. The id of the OS policy with the following restrictions: * Must
|
657
|
+
# contain only lowercase letters, numbers, and hyphens. * Must start with a
|
658
|
+
# letter. * Must be between 1-63 characters. * Must end with a number or a
|
659
|
+
# letter. * Must be unique within the assignment.
|
660
|
+
# Corresponds to the JSON property `id`
|
661
|
+
# @return [String]
|
662
|
+
attr_accessor :id
|
663
|
+
|
664
|
+
# Required. Policy mode
|
665
|
+
# Corresponds to the JSON property `mode`
|
666
|
+
# @return [String]
|
667
|
+
attr_accessor :mode
|
668
|
+
|
669
|
+
# Required. List of resource groups for the policy. For a particular VM,
|
670
|
+
# resource groups are evaluated in the order specified and the first resource
|
671
|
+
# group that is applicable is selected and the rest are ignored. If none of the
|
672
|
+
# resource groups are applicable for a VM, the VM is considered to be non-
|
673
|
+
# compliant w.r.t this policy. This behavior can be toggled by the flag `
|
674
|
+
# allow_no_resource_group_match`
|
675
|
+
# Corresponds to the JSON property `resourceGroups`
|
676
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicyResourceGroup>]
|
677
|
+
attr_accessor :resource_groups
|
678
|
+
|
679
|
+
def initialize(**args)
|
680
|
+
update!(**args)
|
681
|
+
end
|
682
|
+
|
683
|
+
# Update properties of this object
|
684
|
+
def update!(**args)
|
685
|
+
@allow_no_resource_group_match = args[:allow_no_resource_group_match] if args.key?(:allow_no_resource_group_match)
|
686
|
+
@description = args[:description] if args.key?(:description)
|
687
|
+
@id = args[:id] if args.key?(:id)
|
688
|
+
@mode = args[:mode] if args.key?(:mode)
|
689
|
+
@resource_groups = args[:resource_groups] if args.key?(:resource_groups)
|
690
|
+
end
|
691
|
+
end
|
692
|
+
|
693
|
+
# OS policy assignment is an API resource that is used to apply a set of OS
|
694
|
+
# policies to a dynamically targeted group of Compute Engine VM instances. An OS
|
695
|
+
# policy is used to define the desired state configuration for a Compute Engine
|
696
|
+
# VM instance through a set of configuration resources that provide capabilities
|
697
|
+
# such as installing or removing software packages, or executing a script. For
|
698
|
+
# more information about the OS policy resource definitions and examples, see [
|
699
|
+
# OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-
|
700
|
+
# configuration-management/working-with-os-policies).
|
701
|
+
class OsPolicyAssignment
|
702
|
+
include Google::Apis::Core::Hashable
|
703
|
+
|
704
|
+
# Output only. Indicates that this revision has been successfully rolled out in
|
705
|
+
# this zone and new VMs will be assigned OS policies from this revision. For a
|
706
|
+
# given OS policy assignment, there is only one revision with a value of `true`
|
707
|
+
# for this field.
|
708
|
+
# Corresponds to the JSON property `baseline`
|
709
|
+
# @return [Boolean]
|
710
|
+
attr_accessor :baseline
|
711
|
+
alias_method :baseline?, :baseline
|
712
|
+
|
713
|
+
# Output only. Indicates that this revision deletes the OS policy assignment.
|
714
|
+
# Corresponds to the JSON property `deleted`
|
715
|
+
# @return [Boolean]
|
716
|
+
attr_accessor :deleted
|
717
|
+
alias_method :deleted?, :deleted
|
718
|
+
|
719
|
+
# OS policy assignment description. Length of the description is limited to 1024
|
720
|
+
# characters.
|
721
|
+
# Corresponds to the JSON property `description`
|
722
|
+
# @return [String]
|
723
|
+
attr_accessor :description
|
724
|
+
|
725
|
+
# The etag for this OS policy assignment. If this is provided on update, it must
|
726
|
+
# match the server's etag.
|
727
|
+
# Corresponds to the JSON property `etag`
|
728
|
+
# @return [String]
|
729
|
+
attr_accessor :etag
|
730
|
+
|
731
|
+
# Filters to select target VMs for an assignment. If more than one filter
|
732
|
+
# criteria is specified below, a VM will be selected if and only if it satisfies
|
733
|
+
# all of them.
|
734
|
+
# Corresponds to the JSON property `instanceFilter`
|
735
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyAssignmentInstanceFilter]
|
736
|
+
attr_accessor :instance_filter
|
737
|
+
|
738
|
+
# Resource name. Format: `projects/`project_number`/locations/`location`/
|
739
|
+
# osPolicyAssignments/`os_policy_assignment_id`` This field is ignored when you
|
740
|
+
# create an OS policy assignment.
|
741
|
+
# Corresponds to the JSON property `name`
|
742
|
+
# @return [String]
|
743
|
+
attr_accessor :name
|
744
|
+
|
745
|
+
# Required. List of OS policies to be applied to the VMs.
|
746
|
+
# Corresponds to the JSON property `osPolicies`
|
747
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicy>]
|
748
|
+
attr_accessor :os_policies
|
749
|
+
|
750
|
+
# Output only. Indicates that reconciliation is in progress for the revision.
|
751
|
+
# This value is `true` when the `rollout_state` is one of: * IN_PROGRESS *
|
752
|
+
# CANCELLING
|
753
|
+
# Corresponds to the JSON property `reconciling`
|
754
|
+
# @return [Boolean]
|
755
|
+
attr_accessor :reconciling
|
756
|
+
alias_method :reconciling?, :reconciling
|
757
|
+
|
758
|
+
# Output only. The timestamp that the revision was created.
|
759
|
+
# Corresponds to the JSON property `revisionCreateTime`
|
760
|
+
# @return [String]
|
761
|
+
attr_accessor :revision_create_time
|
762
|
+
|
763
|
+
# Output only. The assignment revision ID A new revision is committed whenever a
|
764
|
+
# rollout is triggered for a OS policy assignment
|
765
|
+
# Corresponds to the JSON property `revisionId`
|
766
|
+
# @return [String]
|
767
|
+
attr_accessor :revision_id
|
768
|
+
|
769
|
+
# Message to configure the rollout at the zonal level for the OS policy
|
770
|
+
# assignment.
|
771
|
+
# Corresponds to the JSON property `rollout`
|
772
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyAssignmentRollout]
|
773
|
+
attr_accessor :rollout
|
774
|
+
|
775
|
+
# Output only. OS policy assignment rollout state
|
776
|
+
# Corresponds to the JSON property `rolloutState`
|
777
|
+
# @return [String]
|
778
|
+
attr_accessor :rollout_state
|
779
|
+
|
780
|
+
# Output only. Server generated unique id for the OS policy assignment resource.
|
781
|
+
# Corresponds to the JSON property `uid`
|
782
|
+
# @return [String]
|
783
|
+
attr_accessor :uid
|
784
|
+
|
785
|
+
def initialize(**args)
|
786
|
+
update!(**args)
|
787
|
+
end
|
788
|
+
|
789
|
+
# Update properties of this object
|
790
|
+
def update!(**args)
|
791
|
+
@baseline = args[:baseline] if args.key?(:baseline)
|
792
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
793
|
+
@description = args[:description] if args.key?(:description)
|
794
|
+
@etag = args[:etag] if args.key?(:etag)
|
795
|
+
@instance_filter = args[:instance_filter] if args.key?(:instance_filter)
|
796
|
+
@name = args[:name] if args.key?(:name)
|
797
|
+
@os_policies = args[:os_policies] if args.key?(:os_policies)
|
798
|
+
@reconciling = args[:reconciling] if args.key?(:reconciling)
|
799
|
+
@revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)
|
800
|
+
@revision_id = args[:revision_id] if args.key?(:revision_id)
|
801
|
+
@rollout = args[:rollout] if args.key?(:rollout)
|
802
|
+
@rollout_state = args[:rollout_state] if args.key?(:rollout_state)
|
803
|
+
@uid = args[:uid] if args.key?(:uid)
|
804
|
+
end
|
805
|
+
end
|
806
|
+
|
807
|
+
# Filters to select target VMs for an assignment. If more than one filter
|
808
|
+
# criteria is specified below, a VM will be selected if and only if it satisfies
|
809
|
+
# all of them.
|
810
|
+
class OsPolicyAssignmentInstanceFilter
|
811
|
+
include Google::Apis::Core::Hashable
|
812
|
+
|
813
|
+
# Target all VMs in the project. If true, no other criteria is permitted.
|
814
|
+
# Corresponds to the JSON property `all`
|
815
|
+
# @return [Boolean]
|
816
|
+
attr_accessor :all
|
817
|
+
alias_method :all?, :all
|
818
|
+
|
819
|
+
# List of label sets used for VM exclusion. If the list has more than one label
|
820
|
+
# set, the VM is excluded if any of the label sets are applicable for the VM.
|
821
|
+
# Corresponds to the JSON property `exclusionLabels`
|
822
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicyAssignmentLabelSet>]
|
823
|
+
attr_accessor :exclusion_labels
|
824
|
+
|
825
|
+
# List of label sets used for VM inclusion. If the list has more than one `
|
826
|
+
# LabelSet`, the VM is included if any of the label sets are applicable for the
|
827
|
+
# VM.
|
828
|
+
# Corresponds to the JSON property `inclusionLabels`
|
829
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicyAssignmentLabelSet>]
|
830
|
+
attr_accessor :inclusion_labels
|
831
|
+
|
832
|
+
# List of inventories to select VMs. A VM is selected if its inventory data
|
833
|
+
# matches at least one of the following inventories.
|
834
|
+
# Corresponds to the JSON property `inventories`
|
835
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicyAssignmentInstanceFilterInventory>]
|
836
|
+
attr_accessor :inventories
|
837
|
+
|
838
|
+
def initialize(**args)
|
839
|
+
update!(**args)
|
840
|
+
end
|
841
|
+
|
842
|
+
# Update properties of this object
|
843
|
+
def update!(**args)
|
844
|
+
@all = args[:all] if args.key?(:all)
|
845
|
+
@exclusion_labels = args[:exclusion_labels] if args.key?(:exclusion_labels)
|
846
|
+
@inclusion_labels = args[:inclusion_labels] if args.key?(:inclusion_labels)
|
847
|
+
@inventories = args[:inventories] if args.key?(:inventories)
|
848
|
+
end
|
849
|
+
end
|
850
|
+
|
851
|
+
# VM inventory details.
|
852
|
+
class OsPolicyAssignmentInstanceFilterInventory
|
853
|
+
include Google::Apis::Core::Hashable
|
854
|
+
|
855
|
+
# Required. The OS short name
|
856
|
+
# Corresponds to the JSON property `osShortName`
|
857
|
+
# @return [String]
|
858
|
+
attr_accessor :os_short_name
|
859
|
+
|
860
|
+
# The OS version Prefix matches are supported if asterisk(*) is provided as the
|
861
|
+
# last character. For example, to match all versions with a major version of `7`,
|
862
|
+
# specify the following value for this field `7.*` An empty string matches all
|
863
|
+
# OS versions.
|
864
|
+
# Corresponds to the JSON property `osVersion`
|
865
|
+
# @return [String]
|
866
|
+
attr_accessor :os_version
|
867
|
+
|
868
|
+
def initialize(**args)
|
869
|
+
update!(**args)
|
870
|
+
end
|
871
|
+
|
872
|
+
# Update properties of this object
|
873
|
+
def update!(**args)
|
874
|
+
@os_short_name = args[:os_short_name] if args.key?(:os_short_name)
|
875
|
+
@os_version = args[:os_version] if args.key?(:os_version)
|
876
|
+
end
|
877
|
+
end
|
878
|
+
|
879
|
+
# Message representing label set. * A label is a key value pair set for a VM. *
|
880
|
+
# A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other
|
881
|
+
# words, a LabelSet is applicable for a VM only if it matches all the labels in
|
882
|
+
# the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=
|
883
|
+
# webserver` will only be applicable for those VMs with both labels present.
|
884
|
+
class OsPolicyAssignmentLabelSet
|
885
|
+
include Google::Apis::Core::Hashable
|
886
|
+
|
887
|
+
# Labels are identified by key/value pairs in this map. A VM should contain all
|
888
|
+
# the key/value pairs specified in this map to be selected.
|
889
|
+
# Corresponds to the JSON property `labels`
|
890
|
+
# @return [Hash<String,String>]
|
891
|
+
attr_accessor :labels
|
892
|
+
|
893
|
+
def initialize(**args)
|
894
|
+
update!(**args)
|
895
|
+
end
|
896
|
+
|
897
|
+
# Update properties of this object
|
898
|
+
def update!(**args)
|
899
|
+
@labels = args[:labels] if args.key?(:labels)
|
900
|
+
end
|
901
|
+
end
|
902
|
+
|
903
|
+
# OS policy assignment operation metadata provided by OS policy assignment API
|
904
|
+
# methods that return long running operations.
|
905
|
+
class OsPolicyAssignmentOperationMetadata
|
906
|
+
include Google::Apis::Core::Hashable
|
907
|
+
|
908
|
+
# The OS policy assignment API method.
|
909
|
+
# Corresponds to the JSON property `apiMethod`
|
910
|
+
# @return [String]
|
911
|
+
attr_accessor :api_method
|
912
|
+
|
913
|
+
# Reference to the `OSPolicyAssignment` API resource. Format: `projects/`
|
914
|
+
# project_number`/locations/`location`/osPolicyAssignments/`
|
915
|
+
# os_policy_assignment_id@revision_id``
|
916
|
+
# Corresponds to the JSON property `osPolicyAssignment`
|
917
|
+
# @return [String]
|
918
|
+
attr_accessor :os_policy_assignment
|
919
|
+
|
920
|
+
# Rollout start time
|
921
|
+
# Corresponds to the JSON property `rolloutStartTime`
|
922
|
+
# @return [String]
|
923
|
+
attr_accessor :rollout_start_time
|
924
|
+
|
925
|
+
# State of the rollout
|
926
|
+
# Corresponds to the JSON property `rolloutState`
|
927
|
+
# @return [String]
|
928
|
+
attr_accessor :rollout_state
|
929
|
+
|
930
|
+
# Rollout update time
|
931
|
+
# Corresponds to the JSON property `rolloutUpdateTime`
|
932
|
+
# @return [String]
|
933
|
+
attr_accessor :rollout_update_time
|
934
|
+
|
935
|
+
def initialize(**args)
|
936
|
+
update!(**args)
|
937
|
+
end
|
938
|
+
|
939
|
+
# Update properties of this object
|
940
|
+
def update!(**args)
|
941
|
+
@api_method = args[:api_method] if args.key?(:api_method)
|
942
|
+
@os_policy_assignment = args[:os_policy_assignment] if args.key?(:os_policy_assignment)
|
943
|
+
@rollout_start_time = args[:rollout_start_time] if args.key?(:rollout_start_time)
|
944
|
+
@rollout_state = args[:rollout_state] if args.key?(:rollout_state)
|
945
|
+
@rollout_update_time = args[:rollout_update_time] if args.key?(:rollout_update_time)
|
946
|
+
end
|
947
|
+
end
|
948
|
+
|
949
|
+
# Message to configure the rollout at the zonal level for the OS policy
|
950
|
+
# assignment.
|
951
|
+
class OsPolicyAssignmentRollout
|
952
|
+
include Google::Apis::Core::Hashable
|
953
|
+
|
954
|
+
# Message encapsulating a value that can be either absolute ("fixed") or
|
955
|
+
# relative ("percent") to a value.
|
956
|
+
# Corresponds to the JSON property `disruptionBudget`
|
957
|
+
# @return [Google::Apis::OsconfigV2::FixedOrPercent]
|
958
|
+
attr_accessor :disruption_budget
|
959
|
+
|
960
|
+
# Required. This determines the minimum duration of time to wait after the
|
961
|
+
# configuration changes are applied through the current rollout. A VM continues
|
962
|
+
# to count towards the `disruption_budget` at least until this duration of time
|
963
|
+
# has passed after configuration changes are applied.
|
964
|
+
# Corresponds to the JSON property `minWaitDuration`
|
965
|
+
# @return [String]
|
966
|
+
attr_accessor :min_wait_duration
|
967
|
+
|
968
|
+
def initialize(**args)
|
969
|
+
update!(**args)
|
970
|
+
end
|
971
|
+
|
972
|
+
# Update properties of this object
|
973
|
+
def update!(**args)
|
974
|
+
@disruption_budget = args[:disruption_budget] if args.key?(:disruption_budget)
|
975
|
+
@min_wait_duration = args[:min_wait_duration] if args.key?(:min_wait_duration)
|
976
|
+
end
|
977
|
+
end
|
978
|
+
|
979
|
+
# Filtering criteria to select VMs based on inventory details.
|
980
|
+
class OsPolicyInventoryFilter
|
981
|
+
include Google::Apis::Core::Hashable
|
982
|
+
|
983
|
+
# Required. The OS short name
|
984
|
+
# Corresponds to the JSON property `osShortName`
|
985
|
+
# @return [String]
|
986
|
+
attr_accessor :os_short_name
|
987
|
+
|
988
|
+
# The OS version Prefix matches are supported if asterisk(*) is provided as the
|
989
|
+
# last character. For example, to match all versions with a major version of `7`,
|
990
|
+
# specify the following value for this field `7.*` An empty string matches all
|
991
|
+
# OS versions.
|
992
|
+
# Corresponds to the JSON property `osVersion`
|
993
|
+
# @return [String]
|
994
|
+
attr_accessor :os_version
|
995
|
+
|
996
|
+
def initialize(**args)
|
997
|
+
update!(**args)
|
998
|
+
end
|
999
|
+
|
1000
|
+
# Update properties of this object
|
1001
|
+
def update!(**args)
|
1002
|
+
@os_short_name = args[:os_short_name] if args.key?(:os_short_name)
|
1003
|
+
@os_version = args[:os_version] if args.key?(:os_version)
|
1004
|
+
end
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
# An OS policy resource is used to define the desired state configuration and
|
1008
|
+
# provides a specific functionality like installing/removing packages, executing
|
1009
|
+
# a script etc. The system ensures that resources are always in their desired
|
1010
|
+
# state by taking necessary actions if they have drifted from their desired
|
1011
|
+
# state.
|
1012
|
+
class OsPolicyResource
|
1013
|
+
include Google::Apis::Core::Hashable
|
1014
|
+
|
1015
|
+
# A resource that allows executing scripts on the VM. The `ExecResource` has 2
|
1016
|
+
# stages: `validate` and `enforce` and both stages accept a script as an
|
1017
|
+
# argument to execute. When the `ExecResource` is applied by the agent, it first
|
1018
|
+
# executes the script in the `validate` stage. The `validate` stage can signal
|
1019
|
+
# that the `ExecResource` is already in the desired state by returning an exit
|
1020
|
+
# code of `100`. If the `ExecResource` is not in the desired state, it should
|
1021
|
+
# return an exit code of `101`. Any other exit code returned by this stage is
|
1022
|
+
# considered an error. If the `ExecResource` is not in the desired state based
|
1023
|
+
# on the exit code from the `validate` stage, the agent proceeds to execute the
|
1024
|
+
# script from the `enforce` stage. If the `ExecResource` is already in the
|
1025
|
+
# desired state, the `enforce` stage will not be run. Similar to `validate`
|
1026
|
+
# stage, the `enforce` stage should return an exit code of `100` to indicate
|
1027
|
+
# that the resource in now in its desired state. Any other exit code is
|
1028
|
+
# considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101`
|
1029
|
+
# vs `1`) to have an explicit indicator of `in desired state`, `not in desired
|
1030
|
+
# state` and errors. Because, for example, Powershell will always return an exit
|
1031
|
+
# code of `0` unless an `exit` statement is provided in the script. So, for
|
1032
|
+
# reasons of consistency and being explicit, exit codes `100` and `101` were
|
1033
|
+
# chosen.
|
1034
|
+
# Corresponds to the JSON property `exec`
|
1035
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceExecResource]
|
1036
|
+
attr_accessor :exec
|
1037
|
+
|
1038
|
+
# A resource that manages the state of a file.
|
1039
|
+
# Corresponds to the JSON property `file`
|
1040
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFileResource]
|
1041
|
+
attr_accessor :file
|
1042
|
+
|
1043
|
+
# Required. The id of the resource with the following restrictions: * Must
|
1044
|
+
# contain only lowercase letters, numbers, and hyphens. * Must start with a
|
1045
|
+
# letter. * Must be between 1-63 characters. * Must end with a number or a
|
1046
|
+
# letter. * Must be unique within the OS policy.
|
1047
|
+
# Corresponds to the JSON property `id`
|
1048
|
+
# @return [String]
|
1049
|
+
attr_accessor :id
|
1050
|
+
|
1051
|
+
# A resource that manages a system package.
|
1052
|
+
# Corresponds to the JSON property `pkg`
|
1053
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResource]
|
1054
|
+
attr_accessor :pkg
|
1055
|
+
|
1056
|
+
# A resource that manages a package repository.
|
1057
|
+
# Corresponds to the JSON property `repository`
|
1058
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceRepositoryResource]
|
1059
|
+
attr_accessor :repository
|
1060
|
+
|
1061
|
+
def initialize(**args)
|
1062
|
+
update!(**args)
|
1063
|
+
end
|
1064
|
+
|
1065
|
+
# Update properties of this object
|
1066
|
+
def update!(**args)
|
1067
|
+
@exec = args[:exec] if args.key?(:exec)
|
1068
|
+
@file = args[:file] if args.key?(:file)
|
1069
|
+
@id = args[:id] if args.key?(:id)
|
1070
|
+
@pkg = args[:pkg] if args.key?(:pkg)
|
1071
|
+
@repository = args[:repository] if args.key?(:repository)
|
1072
|
+
end
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# A resource that allows executing scripts on the VM. The `ExecResource` has 2
|
1076
|
+
# stages: `validate` and `enforce` and both stages accept a script as an
|
1077
|
+
# argument to execute. When the `ExecResource` is applied by the agent, it first
|
1078
|
+
# executes the script in the `validate` stage. The `validate` stage can signal
|
1079
|
+
# that the `ExecResource` is already in the desired state by returning an exit
|
1080
|
+
# code of `100`. If the `ExecResource` is not in the desired state, it should
|
1081
|
+
# return an exit code of `101`. Any other exit code returned by this stage is
|
1082
|
+
# considered an error. If the `ExecResource` is not in the desired state based
|
1083
|
+
# on the exit code from the `validate` stage, the agent proceeds to execute the
|
1084
|
+
# script from the `enforce` stage. If the `ExecResource` is already in the
|
1085
|
+
# desired state, the `enforce` stage will not be run. Similar to `validate`
|
1086
|
+
# stage, the `enforce` stage should return an exit code of `100` to indicate
|
1087
|
+
# that the resource in now in its desired state. Any other exit code is
|
1088
|
+
# considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101`
|
1089
|
+
# vs `1`) to have an explicit indicator of `in desired state`, `not in desired
|
1090
|
+
# state` and errors. Because, for example, Powershell will always return an exit
|
1091
|
+
# code of `0` unless an `exit` statement is provided in the script. So, for
|
1092
|
+
# reasons of consistency and being explicit, exit codes `100` and `101` were
|
1093
|
+
# chosen.
|
1094
|
+
class OsPolicyResourceExecResource
|
1095
|
+
include Google::Apis::Core::Hashable
|
1096
|
+
|
1097
|
+
# A file or script to execute.
|
1098
|
+
# Corresponds to the JSON property `enforce`
|
1099
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceExecResourceExec]
|
1100
|
+
attr_accessor :enforce
|
1101
|
+
|
1102
|
+
# A file or script to execute.
|
1103
|
+
# Corresponds to the JSON property `validate`
|
1104
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceExecResourceExec]
|
1105
|
+
attr_accessor :validate
|
1106
|
+
|
1107
|
+
def initialize(**args)
|
1108
|
+
update!(**args)
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
# Update properties of this object
|
1112
|
+
def update!(**args)
|
1113
|
+
@enforce = args[:enforce] if args.key?(:enforce)
|
1114
|
+
@validate = args[:validate] if args.key?(:validate)
|
1115
|
+
end
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
# A file or script to execute.
|
1119
|
+
class OsPolicyResourceExecResourceExec
|
1120
|
+
include Google::Apis::Core::Hashable
|
1121
|
+
|
1122
|
+
# Optional arguments to pass to the source during execution.
|
1123
|
+
# Corresponds to the JSON property `args`
|
1124
|
+
# @return [Array<String>]
|
1125
|
+
attr_accessor :args
|
1126
|
+
|
1127
|
+
# A remote or local file.
|
1128
|
+
# Corresponds to the JSON property `file`
|
1129
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFile]
|
1130
|
+
attr_accessor :file
|
1131
|
+
|
1132
|
+
# Required. The script interpreter to use.
|
1133
|
+
# Corresponds to the JSON property `interpreter`
|
1134
|
+
# @return [String]
|
1135
|
+
attr_accessor :interpreter
|
1136
|
+
|
1137
|
+
# Only recorded for enforce Exec. Path to an output file (that is created by
|
1138
|
+
# this Exec) whose content will be recorded in OSPolicyResourceCompliance after
|
1139
|
+
# a successful run. Absence or failure to read this file will result in this
|
1140
|
+
# ExecResource being non-compliant. Output file size is limited to 500K bytes.
|
1141
|
+
# Corresponds to the JSON property `outputFilePath`
|
1142
|
+
# @return [String]
|
1143
|
+
attr_accessor :output_file_path
|
1144
|
+
|
1145
|
+
# An inline script. The size of the script is limited to 32KiB.
|
1146
|
+
# Corresponds to the JSON property `script`
|
1147
|
+
# @return [String]
|
1148
|
+
attr_accessor :script
|
1149
|
+
|
1150
|
+
def initialize(**args)
|
1151
|
+
update!(**args)
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
# Update properties of this object
|
1155
|
+
def update!(**args)
|
1156
|
+
@args = args[:args] if args.key?(:args)
|
1157
|
+
@file = args[:file] if args.key?(:file)
|
1158
|
+
@interpreter = args[:interpreter] if args.key?(:interpreter)
|
1159
|
+
@output_file_path = args[:output_file_path] if args.key?(:output_file_path)
|
1160
|
+
@script = args[:script] if args.key?(:script)
|
1161
|
+
end
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# A remote or local file.
|
1165
|
+
class OsPolicyResourceFile
|
1166
|
+
include Google::Apis::Core::Hashable
|
1167
|
+
|
1168
|
+
# Defaults to false. When false, files are subject to validations based on the
|
1169
|
+
# file type: Remote: A checksum must be specified. Cloud Storage: An object
|
1170
|
+
# generation number must be specified.
|
1171
|
+
# Corresponds to the JSON property `allowInsecure`
|
1172
|
+
# @return [Boolean]
|
1173
|
+
attr_accessor :allow_insecure
|
1174
|
+
alias_method :allow_insecure?, :allow_insecure
|
1175
|
+
|
1176
|
+
# Specifies a file available as a Cloud Storage Object.
|
1177
|
+
# Corresponds to the JSON property `gcs`
|
1178
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFileGcs]
|
1179
|
+
attr_accessor :gcs
|
1180
|
+
|
1181
|
+
# A local path within the VM to use.
|
1182
|
+
# Corresponds to the JSON property `localPath`
|
1183
|
+
# @return [String]
|
1184
|
+
attr_accessor :local_path
|
1185
|
+
|
1186
|
+
# Specifies a file available via some URI.
|
1187
|
+
# Corresponds to the JSON property `remote`
|
1188
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFileRemote]
|
1189
|
+
attr_accessor :remote
|
1190
|
+
|
1191
|
+
def initialize(**args)
|
1192
|
+
update!(**args)
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
# Update properties of this object
|
1196
|
+
def update!(**args)
|
1197
|
+
@allow_insecure = args[:allow_insecure] if args.key?(:allow_insecure)
|
1198
|
+
@gcs = args[:gcs] if args.key?(:gcs)
|
1199
|
+
@local_path = args[:local_path] if args.key?(:local_path)
|
1200
|
+
@remote = args[:remote] if args.key?(:remote)
|
1201
|
+
end
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Specifies a file available as a Cloud Storage Object.
|
1205
|
+
class OsPolicyResourceFileGcs
|
1206
|
+
include Google::Apis::Core::Hashable
|
1207
|
+
|
1208
|
+
# Required. Bucket of the Cloud Storage object.
|
1209
|
+
# Corresponds to the JSON property `bucket`
|
1210
|
+
# @return [String]
|
1211
|
+
attr_accessor :bucket
|
1212
|
+
|
1213
|
+
# Generation number of the Cloud Storage object.
|
1214
|
+
# Corresponds to the JSON property `generation`
|
1215
|
+
# @return [Fixnum]
|
1216
|
+
attr_accessor :generation
|
1217
|
+
|
1218
|
+
# Required. Name of the Cloud Storage object.
|
1219
|
+
# Corresponds to the JSON property `object`
|
1220
|
+
# @return [String]
|
1221
|
+
attr_accessor :object
|
1222
|
+
|
1223
|
+
def initialize(**args)
|
1224
|
+
update!(**args)
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
# Update properties of this object
|
1228
|
+
def update!(**args)
|
1229
|
+
@bucket = args[:bucket] if args.key?(:bucket)
|
1230
|
+
@generation = args[:generation] if args.key?(:generation)
|
1231
|
+
@object = args[:object] if args.key?(:object)
|
1232
|
+
end
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
# Specifies a file available via some URI.
|
1236
|
+
class OsPolicyResourceFileRemote
|
1237
|
+
include Google::Apis::Core::Hashable
|
1238
|
+
|
1239
|
+
# SHA256 checksum of the remote file.
|
1240
|
+
# Corresponds to the JSON property `sha256Checksum`
|
1241
|
+
# @return [String]
|
1242
|
+
attr_accessor :sha256_checksum
|
1243
|
+
|
1244
|
+
# Required. URI from which to fetch the object. It should contain both the
|
1245
|
+
# protocol and path following the format ``protocol`://`location``.
|
1246
|
+
# Corresponds to the JSON property `uri`
|
1247
|
+
# @return [String]
|
1248
|
+
attr_accessor :uri
|
1249
|
+
|
1250
|
+
def initialize(**args)
|
1251
|
+
update!(**args)
|
1252
|
+
end
|
1253
|
+
|
1254
|
+
# Update properties of this object
|
1255
|
+
def update!(**args)
|
1256
|
+
@sha256_checksum = args[:sha256_checksum] if args.key?(:sha256_checksum)
|
1257
|
+
@uri = args[:uri] if args.key?(:uri)
|
1258
|
+
end
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
# A resource that manages the state of a file.
|
1262
|
+
class OsPolicyResourceFileResource
|
1263
|
+
include Google::Apis::Core::Hashable
|
1264
|
+
|
1265
|
+
# A a file with this content. The size of the content is limited to 32KiB.
|
1266
|
+
# Corresponds to the JSON property `content`
|
1267
|
+
# @return [String]
|
1268
|
+
attr_accessor :content
|
1269
|
+
|
1270
|
+
# A remote or local file.
|
1271
|
+
# Corresponds to the JSON property `file`
|
1272
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFile]
|
1273
|
+
attr_accessor :file
|
1274
|
+
|
1275
|
+
# Required. The absolute path of the file within the VM.
|
1276
|
+
# Corresponds to the JSON property `path`
|
1277
|
+
# @return [String]
|
1278
|
+
attr_accessor :path
|
1279
|
+
|
1280
|
+
# Consists of three octal digits which represent, in order, the permissions of
|
1281
|
+
# the owner, group, and other users for the file (similarly to the numeric mode
|
1282
|
+
# used in the linux chmod utility). Each digit represents a three bit number
|
1283
|
+
# with the 4 bit corresponding to the read permissions, the 2 bit corresponds to
|
1284
|
+
# the write bit, and the one bit corresponds to the execute permission. Default
|
1285
|
+
# behavior is 755. Below are some examples of permissions and their associated
|
1286
|
+
# values: read, write, and execute: 7 read and execute: 5 read and write: 6 read
|
1287
|
+
# only: 4
|
1288
|
+
# Corresponds to the JSON property `permissions`
|
1289
|
+
# @return [String]
|
1290
|
+
attr_accessor :permissions
|
1291
|
+
|
1292
|
+
# Required. Desired state of the file.
|
1293
|
+
# Corresponds to the JSON property `state`
|
1294
|
+
# @return [String]
|
1295
|
+
attr_accessor :state
|
1296
|
+
|
1297
|
+
def initialize(**args)
|
1298
|
+
update!(**args)
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
# Update properties of this object
|
1302
|
+
def update!(**args)
|
1303
|
+
@content = args[:content] if args.key?(:content)
|
1304
|
+
@file = args[:file] if args.key?(:file)
|
1305
|
+
@path = args[:path] if args.key?(:path)
|
1306
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1307
|
+
@state = args[:state] if args.key?(:state)
|
1308
|
+
end
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
# Resource groups provide a mechanism to group OS policy resources. Resource
|
1312
|
+
# groups enable OS policy authors to create a single OS policy to be applied to
|
1313
|
+
# VMs running different operating Systems. When the OS policy is applied to a
|
1314
|
+
# target VM, the appropriate resource group within the OS policy is selected
|
1315
|
+
# based on the `OSFilter` specified within the resource group.
|
1316
|
+
class OsPolicyResourceGroup
|
1317
|
+
include Google::Apis::Core::Hashable
|
1318
|
+
|
1319
|
+
# List of inventory filters for the resource group. The resources in this
|
1320
|
+
# resource group are applied to the target VM if it satisfies at least one of
|
1321
|
+
# the following inventory filters. For example, to apply this resource group to
|
1322
|
+
# VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for
|
1323
|
+
# the list with following values: inventory_filters[0].os_short_name='rhel' and
|
1324
|
+
# inventory_filters[1].os_short_name='centos' If the list is empty, this
|
1325
|
+
# resource group will be applied to the target VM unconditionally.
|
1326
|
+
# Corresponds to the JSON property `inventoryFilters`
|
1327
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicyInventoryFilter>]
|
1328
|
+
attr_accessor :inventory_filters
|
1329
|
+
|
1330
|
+
# Required. List of resources configured for this resource group. The resources
|
1331
|
+
# are executed in the exact order specified here.
|
1332
|
+
# Corresponds to the JSON property `resources`
|
1333
|
+
# @return [Array<Google::Apis::OsconfigV2::OsPolicyResource>]
|
1334
|
+
attr_accessor :resources
|
1335
|
+
|
1336
|
+
def initialize(**args)
|
1337
|
+
update!(**args)
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
# Update properties of this object
|
1341
|
+
def update!(**args)
|
1342
|
+
@inventory_filters = args[:inventory_filters] if args.key?(:inventory_filters)
|
1343
|
+
@resources = args[:resources] if args.key?(:resources)
|
1344
|
+
end
|
1345
|
+
end
|
1346
|
+
|
1347
|
+
# A resource that manages a system package.
|
1348
|
+
class OsPolicyResourcePackageResource
|
1349
|
+
include Google::Apis::Core::Hashable
|
1350
|
+
|
1351
|
+
# A package managed by APT. - install: `apt-get update && apt-get -y install [
|
1352
|
+
# name]` - remove: `apt-get -y remove [name]`
|
1353
|
+
# Corresponds to the JSON property `apt`
|
1354
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceApt]
|
1355
|
+
attr_accessor :apt
|
1356
|
+
|
1357
|
+
# A deb package file. dpkg packages only support INSTALLED state.
|
1358
|
+
# Corresponds to the JSON property `deb`
|
1359
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceDeb]
|
1360
|
+
attr_accessor :deb
|
1361
|
+
|
1362
|
+
# Required. The desired state the agent should maintain for this package.
|
1363
|
+
# Corresponds to the JSON property `desiredState`
|
1364
|
+
# @return [String]
|
1365
|
+
attr_accessor :desired_state
|
1366
|
+
|
1367
|
+
# A package managed by GooGet. - install: `googet -noconfirm install package` -
|
1368
|
+
# remove: `googet -noconfirm remove package`
|
1369
|
+
# Corresponds to the JSON property `googet`
|
1370
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceGooGet]
|
1371
|
+
attr_accessor :googet
|
1372
|
+
|
1373
|
+
# An MSI package. MSI packages only support INSTALLED state.
|
1374
|
+
# Corresponds to the JSON property `msi`
|
1375
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceMsi]
|
1376
|
+
attr_accessor :msi
|
1377
|
+
|
1378
|
+
# An RPM package file. RPM packages only support INSTALLED state.
|
1379
|
+
# Corresponds to the JSON property `rpm`
|
1380
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceRpm]
|
1381
|
+
attr_accessor :rpm
|
1382
|
+
|
1383
|
+
# A package managed by YUM. - install: `yum -y install package` - remove: `yum -
|
1384
|
+
# y remove package`
|
1385
|
+
# Corresponds to the JSON property `yum`
|
1386
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceYum]
|
1387
|
+
attr_accessor :yum
|
1388
|
+
|
1389
|
+
# A package managed by Zypper. - install: `zypper -y install package` - remove: `
|
1390
|
+
# zypper -y rm package`
|
1391
|
+
# Corresponds to the JSON property `zypper`
|
1392
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourcePackageResourceZypper]
|
1393
|
+
attr_accessor :zypper
|
1394
|
+
|
1395
|
+
def initialize(**args)
|
1396
|
+
update!(**args)
|
1397
|
+
end
|
1398
|
+
|
1399
|
+
# Update properties of this object
|
1400
|
+
def update!(**args)
|
1401
|
+
@apt = args[:apt] if args.key?(:apt)
|
1402
|
+
@deb = args[:deb] if args.key?(:deb)
|
1403
|
+
@desired_state = args[:desired_state] if args.key?(:desired_state)
|
1404
|
+
@googet = args[:googet] if args.key?(:googet)
|
1405
|
+
@msi = args[:msi] if args.key?(:msi)
|
1406
|
+
@rpm = args[:rpm] if args.key?(:rpm)
|
1407
|
+
@yum = args[:yum] if args.key?(:yum)
|
1408
|
+
@zypper = args[:zypper] if args.key?(:zypper)
|
1409
|
+
end
|
1410
|
+
end
|
1411
|
+
|
1412
|
+
# A package managed by APT. - install: `apt-get update && apt-get -y install [
|
1413
|
+
# name]` - remove: `apt-get -y remove [name]`
|
1414
|
+
class OsPolicyResourcePackageResourceApt
|
1415
|
+
include Google::Apis::Core::Hashable
|
1416
|
+
|
1417
|
+
# Required. Package name.
|
1418
|
+
# Corresponds to the JSON property `name`
|
1419
|
+
# @return [String]
|
1420
|
+
attr_accessor :name
|
1421
|
+
|
1422
|
+
def initialize(**args)
|
1423
|
+
update!(**args)
|
1424
|
+
end
|
1425
|
+
|
1426
|
+
# Update properties of this object
|
1427
|
+
def update!(**args)
|
1428
|
+
@name = args[:name] if args.key?(:name)
|
1429
|
+
end
|
1430
|
+
end
|
1431
|
+
|
1432
|
+
# A deb package file. dpkg packages only support INSTALLED state.
|
1433
|
+
class OsPolicyResourcePackageResourceDeb
|
1434
|
+
include Google::Apis::Core::Hashable
|
1435
|
+
|
1436
|
+
# Whether dependencies should also be installed. - install when false: `dpkg -i
|
1437
|
+
# package` - install when true: `apt-get update && apt-get -y install package.
|
1438
|
+
# deb`
|
1439
|
+
# Corresponds to the JSON property `pullDeps`
|
1440
|
+
# @return [Boolean]
|
1441
|
+
attr_accessor :pull_deps
|
1442
|
+
alias_method :pull_deps?, :pull_deps
|
1443
|
+
|
1444
|
+
# A remote or local file.
|
1445
|
+
# Corresponds to the JSON property `source`
|
1446
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFile]
|
1447
|
+
attr_accessor :source
|
1448
|
+
|
1449
|
+
def initialize(**args)
|
1450
|
+
update!(**args)
|
1451
|
+
end
|
1452
|
+
|
1453
|
+
# Update properties of this object
|
1454
|
+
def update!(**args)
|
1455
|
+
@pull_deps = args[:pull_deps] if args.key?(:pull_deps)
|
1456
|
+
@source = args[:source] if args.key?(:source)
|
1457
|
+
end
|
1458
|
+
end
|
1459
|
+
|
1460
|
+
# A package managed by GooGet. - install: `googet -noconfirm install package` -
|
1461
|
+
# remove: `googet -noconfirm remove package`
|
1462
|
+
class OsPolicyResourcePackageResourceGooGet
|
1463
|
+
include Google::Apis::Core::Hashable
|
1464
|
+
|
1465
|
+
# Required. Package name.
|
1466
|
+
# Corresponds to the JSON property `name`
|
1467
|
+
# @return [String]
|
1468
|
+
attr_accessor :name
|
1469
|
+
|
1470
|
+
def initialize(**args)
|
1471
|
+
update!(**args)
|
1472
|
+
end
|
1473
|
+
|
1474
|
+
# Update properties of this object
|
1475
|
+
def update!(**args)
|
1476
|
+
@name = args[:name] if args.key?(:name)
|
1477
|
+
end
|
1478
|
+
end
|
1479
|
+
|
1480
|
+
# An MSI package. MSI packages only support INSTALLED state.
|
1481
|
+
class OsPolicyResourcePackageResourceMsi
|
1482
|
+
include Google::Apis::Core::Hashable
|
1483
|
+
|
1484
|
+
# Additional properties to use during installation. This should be in the format
|
1485
|
+
# of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=
|
1486
|
+
# ReallySuppress`.
|
1487
|
+
# Corresponds to the JSON property `properties`
|
1488
|
+
# @return [Array<String>]
|
1489
|
+
attr_accessor :properties
|
1490
|
+
|
1491
|
+
# A remote or local file.
|
1492
|
+
# Corresponds to the JSON property `source`
|
1493
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFile]
|
1494
|
+
attr_accessor :source
|
1495
|
+
|
1496
|
+
def initialize(**args)
|
1497
|
+
update!(**args)
|
1498
|
+
end
|
1499
|
+
|
1500
|
+
# Update properties of this object
|
1501
|
+
def update!(**args)
|
1502
|
+
@properties = args[:properties] if args.key?(:properties)
|
1503
|
+
@source = args[:source] if args.key?(:source)
|
1504
|
+
end
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
# An RPM package file. RPM packages only support INSTALLED state.
|
1508
|
+
class OsPolicyResourcePackageResourceRpm
|
1509
|
+
include Google::Apis::Core::Hashable
|
1510
|
+
|
1511
|
+
# Whether dependencies should also be installed. - install when false: `rpm --
|
1512
|
+
# upgrade --replacepkgs package.rpm` - install when true: `yum -y install
|
1513
|
+
# package.rpm` or `zypper -y install package.rpm`
|
1514
|
+
# Corresponds to the JSON property `pullDeps`
|
1515
|
+
# @return [Boolean]
|
1516
|
+
attr_accessor :pull_deps
|
1517
|
+
alias_method :pull_deps?, :pull_deps
|
1518
|
+
|
1519
|
+
# A remote or local file.
|
1520
|
+
# Corresponds to the JSON property `source`
|
1521
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceFile]
|
1522
|
+
attr_accessor :source
|
1523
|
+
|
1524
|
+
def initialize(**args)
|
1525
|
+
update!(**args)
|
1526
|
+
end
|
1527
|
+
|
1528
|
+
# Update properties of this object
|
1529
|
+
def update!(**args)
|
1530
|
+
@pull_deps = args[:pull_deps] if args.key?(:pull_deps)
|
1531
|
+
@source = args[:source] if args.key?(:source)
|
1532
|
+
end
|
1533
|
+
end
|
1534
|
+
|
1535
|
+
# A package managed by YUM. - install: `yum -y install package` - remove: `yum -
|
1536
|
+
# y remove package`
|
1537
|
+
class OsPolicyResourcePackageResourceYum
|
1538
|
+
include Google::Apis::Core::Hashable
|
1539
|
+
|
1540
|
+
# Required. Package name.
|
1541
|
+
# Corresponds to the JSON property `name`
|
1542
|
+
# @return [String]
|
1543
|
+
attr_accessor :name
|
1544
|
+
|
1545
|
+
def initialize(**args)
|
1546
|
+
update!(**args)
|
1547
|
+
end
|
1548
|
+
|
1549
|
+
# Update properties of this object
|
1550
|
+
def update!(**args)
|
1551
|
+
@name = args[:name] if args.key?(:name)
|
1552
|
+
end
|
1553
|
+
end
|
1554
|
+
|
1555
|
+
# A package managed by Zypper. - install: `zypper -y install package` - remove: `
|
1556
|
+
# zypper -y rm package`
|
1557
|
+
class OsPolicyResourcePackageResourceZypper
|
1558
|
+
include Google::Apis::Core::Hashable
|
1559
|
+
|
1560
|
+
# Required. Package name.
|
1561
|
+
# Corresponds to the JSON property `name`
|
1562
|
+
# @return [String]
|
1563
|
+
attr_accessor :name
|
1564
|
+
|
1565
|
+
def initialize(**args)
|
1566
|
+
update!(**args)
|
1567
|
+
end
|
1568
|
+
|
1569
|
+
# Update properties of this object
|
1570
|
+
def update!(**args)
|
1571
|
+
@name = args[:name] if args.key?(:name)
|
1572
|
+
end
|
1573
|
+
end
|
1574
|
+
|
1575
|
+
# A resource that manages a package repository.
|
1576
|
+
class OsPolicyResourceRepositoryResource
|
1577
|
+
include Google::Apis::Core::Hashable
|
1578
|
+
|
1579
|
+
# Represents a single apt package repository. These will be added to a repo file
|
1580
|
+
# that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.
|
1581
|
+
# Corresponds to the JSON property `apt`
|
1582
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceRepositoryResourceAptRepository]
|
1583
|
+
attr_accessor :apt
|
1584
|
+
|
1585
|
+
# Represents a Goo package repository. These are added to a repo file that is
|
1586
|
+
# managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
|
1587
|
+
# Corresponds to the JSON property `goo`
|
1588
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceRepositoryResourceGooRepository]
|
1589
|
+
attr_accessor :goo
|
1590
|
+
|
1591
|
+
# Represents a single yum package repository. These are added to a repo file
|
1592
|
+
# that is managed at `/etc/yum.repos.d/google_osconfig.repo`.
|
1593
|
+
# Corresponds to the JSON property `yum`
|
1594
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceRepositoryResourceYumRepository]
|
1595
|
+
attr_accessor :yum
|
1596
|
+
|
1597
|
+
# Represents a single zypper package repository. These are added to a repo file
|
1598
|
+
# that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.
|
1599
|
+
# Corresponds to the JSON property `zypper`
|
1600
|
+
# @return [Google::Apis::OsconfigV2::OsPolicyResourceRepositoryResourceZypperRepository]
|
1601
|
+
attr_accessor :zypper
|
1602
|
+
|
1603
|
+
def initialize(**args)
|
1604
|
+
update!(**args)
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# Update properties of this object
|
1608
|
+
def update!(**args)
|
1609
|
+
@apt = args[:apt] if args.key?(:apt)
|
1610
|
+
@goo = args[:goo] if args.key?(:goo)
|
1611
|
+
@yum = args[:yum] if args.key?(:yum)
|
1612
|
+
@zypper = args[:zypper] if args.key?(:zypper)
|
1613
|
+
end
|
1614
|
+
end
|
1615
|
+
|
1616
|
+
# Represents a single apt package repository. These will be added to a repo file
|
1617
|
+
# that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.
|
1618
|
+
class OsPolicyResourceRepositoryResourceAptRepository
|
1619
|
+
include Google::Apis::Core::Hashable
|
1620
|
+
|
1621
|
+
# Required. Type of archive files in this repository.
|
1622
|
+
# Corresponds to the JSON property `archiveType`
|
1623
|
+
# @return [String]
|
1624
|
+
attr_accessor :archive_type
|
1625
|
+
|
1626
|
+
# Required. List of components for this repository. Must contain at least one
|
1627
|
+
# item.
|
1628
|
+
# Corresponds to the JSON property `components`
|
1629
|
+
# @return [Array<String>]
|
1630
|
+
attr_accessor :components
|
1631
|
+
|
1632
|
+
# Required. Distribution of this repository.
|
1633
|
+
# Corresponds to the JSON property `distribution`
|
1634
|
+
# @return [String]
|
1635
|
+
attr_accessor :distribution
|
1636
|
+
|
1637
|
+
# URI of the key file for this repository. The agent maintains a keyring at `/
|
1638
|
+
# etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
|
1639
|
+
# Corresponds to the JSON property `gpgKey`
|
1640
|
+
# @return [String]
|
1641
|
+
attr_accessor :gpg_key
|
1642
|
+
|
1643
|
+
# Required. URI for this repository.
|
1644
|
+
# Corresponds to the JSON property `uri`
|
1645
|
+
# @return [String]
|
1646
|
+
attr_accessor :uri
|
1647
|
+
|
1648
|
+
def initialize(**args)
|
1649
|
+
update!(**args)
|
1650
|
+
end
|
1651
|
+
|
1652
|
+
# Update properties of this object
|
1653
|
+
def update!(**args)
|
1654
|
+
@archive_type = args[:archive_type] if args.key?(:archive_type)
|
1655
|
+
@components = args[:components] if args.key?(:components)
|
1656
|
+
@distribution = args[:distribution] if args.key?(:distribution)
|
1657
|
+
@gpg_key = args[:gpg_key] if args.key?(:gpg_key)
|
1658
|
+
@uri = args[:uri] if args.key?(:uri)
|
1659
|
+
end
|
1660
|
+
end
|
1661
|
+
|
1662
|
+
# Represents a Goo package repository. These are added to a repo file that is
|
1663
|
+
# managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
|
1664
|
+
class OsPolicyResourceRepositoryResourceGooRepository
|
1665
|
+
include Google::Apis::Core::Hashable
|
1666
|
+
|
1667
|
+
# Required. The name of the repository.
|
1668
|
+
# Corresponds to the JSON property `name`
|
1669
|
+
# @return [String]
|
1670
|
+
attr_accessor :name
|
1671
|
+
|
1672
|
+
# Required. The url of the repository.
|
1673
|
+
# Corresponds to the JSON property `url`
|
1674
|
+
# @return [String]
|
1675
|
+
attr_accessor :url
|
1676
|
+
|
1677
|
+
def initialize(**args)
|
1678
|
+
update!(**args)
|
1679
|
+
end
|
1680
|
+
|
1681
|
+
# Update properties of this object
|
1682
|
+
def update!(**args)
|
1683
|
+
@name = args[:name] if args.key?(:name)
|
1684
|
+
@url = args[:url] if args.key?(:url)
|
1685
|
+
end
|
1686
|
+
end
|
1687
|
+
|
1688
|
+
# Represents a single yum package repository. These are added to a repo file
|
1689
|
+
# that is managed at `/etc/yum.repos.d/google_osconfig.repo`.
|
1690
|
+
class OsPolicyResourceRepositoryResourceYumRepository
|
1691
|
+
include Google::Apis::Core::Hashable
|
1692
|
+
|
1693
|
+
# Required. The location of the repository directory.
|
1694
|
+
# Corresponds to the JSON property `baseUrl`
|
1695
|
+
# @return [String]
|
1696
|
+
attr_accessor :base_url
|
1697
|
+
|
1698
|
+
# The display name of the repository.
|
1699
|
+
# Corresponds to the JSON property `displayName`
|
1700
|
+
# @return [String]
|
1701
|
+
attr_accessor :display_name
|
1702
|
+
|
1703
|
+
# URIs of GPG keys.
|
1704
|
+
# Corresponds to the JSON property `gpgKeys`
|
1705
|
+
# @return [Array<String>]
|
1706
|
+
attr_accessor :gpg_keys
|
1707
|
+
|
1708
|
+
# Required. A one word, unique name for this repository. This is the `repo id`
|
1709
|
+
# in the yum config file and also the `display_name` if `display_name` is
|
1710
|
+
# omitted. This id is also used as the unique identifier when checking for
|
1711
|
+
# resource conflicts.
|
1712
|
+
# Corresponds to the JSON property `id`
|
1713
|
+
# @return [String]
|
1714
|
+
attr_accessor :id
|
1715
|
+
|
1716
|
+
def initialize(**args)
|
1717
|
+
update!(**args)
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
# Update properties of this object
|
1721
|
+
def update!(**args)
|
1722
|
+
@base_url = args[:base_url] if args.key?(:base_url)
|
1723
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1724
|
+
@gpg_keys = args[:gpg_keys] if args.key?(:gpg_keys)
|
1725
|
+
@id = args[:id] if args.key?(:id)
|
1726
|
+
end
|
1727
|
+
end
|
1728
|
+
|
1729
|
+
# Represents a single zypper package repository. These are added to a repo file
|
1730
|
+
# that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.
|
1731
|
+
class OsPolicyResourceRepositoryResourceZypperRepository
|
1732
|
+
include Google::Apis::Core::Hashable
|
1733
|
+
|
1734
|
+
# Required. The location of the repository directory.
|
1735
|
+
# Corresponds to the JSON property `baseUrl`
|
1736
|
+
# @return [String]
|
1737
|
+
attr_accessor :base_url
|
1738
|
+
|
1739
|
+
# The display name of the repository.
|
1740
|
+
# Corresponds to the JSON property `displayName`
|
1741
|
+
# @return [String]
|
1742
|
+
attr_accessor :display_name
|
1743
|
+
|
1744
|
+
# URIs of GPG keys.
|
1745
|
+
# Corresponds to the JSON property `gpgKeys`
|
1746
|
+
# @return [Array<String>]
|
1747
|
+
attr_accessor :gpg_keys
|
1748
|
+
|
1749
|
+
# Required. A one word, unique name for this repository. This is the `repo id`
|
1750
|
+
# in the zypper config file and also the `display_name` if `display_name` is
|
1751
|
+
# omitted. This id is also used as the unique identifier when checking for
|
1752
|
+
# GuestPolicy conflicts.
|
1753
|
+
# Corresponds to the JSON property `id`
|
1754
|
+
# @return [String]
|
1755
|
+
attr_accessor :id
|
1756
|
+
|
1757
|
+
def initialize(**args)
|
1758
|
+
update!(**args)
|
1759
|
+
end
|
1760
|
+
|
1761
|
+
# Update properties of this object
|
1762
|
+
def update!(**args)
|
1763
|
+
@base_url = args[:base_url] if args.key?(:base_url)
|
1764
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1765
|
+
@gpg_keys = args[:gpg_keys] if args.key?(:gpg_keys)
|
1766
|
+
@id = args[:id] if args.key?(:id)
|
1767
|
+
end
|
1768
|
+
end
|
1769
|
+
|
1770
|
+
# This resource represents a long-running operation that is the result of a
|
1771
|
+
# network API call.
|
1772
|
+
class Operation
|
1773
|
+
include Google::Apis::Core::Hashable
|
1774
|
+
|
1775
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
1776
|
+
# , the operation is completed, and either `error` or `response` is available.
|
1777
|
+
# Corresponds to the JSON property `done`
|
1778
|
+
# @return [Boolean]
|
1779
|
+
attr_accessor :done
|
1780
|
+
alias_method :done?, :done
|
1781
|
+
|
1782
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1783
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1784
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1785
|
+
# data: error code, error message, and error details. You can find out more
|
1786
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1787
|
+
# //cloud.google.com/apis/design/errors).
|
1788
|
+
# Corresponds to the JSON property `error`
|
1789
|
+
# @return [Google::Apis::OsconfigV2::Status]
|
1790
|
+
attr_accessor :error
|
1791
|
+
|
1792
|
+
# Service-specific metadata associated with the operation. It typically contains
|
1793
|
+
# progress information and common metadata such as create time. Some services
|
1794
|
+
# might not provide such metadata. Any method that returns a long-running
|
1795
|
+
# operation should document the metadata type, if any.
|
1796
|
+
# Corresponds to the JSON property `metadata`
|
1797
|
+
# @return [Hash<String,Object>]
|
1798
|
+
attr_accessor :metadata
|
1799
|
+
|
1800
|
+
# The server-assigned name, which is only unique within the same service that
|
1801
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
1802
|
+
# be a resource name ending with `operations/`unique_id``.
|
1803
|
+
# Corresponds to the JSON property `name`
|
1804
|
+
# @return [String]
|
1805
|
+
attr_accessor :name
|
1806
|
+
|
1807
|
+
# The normal, successful response of the operation. If the original method
|
1808
|
+
# returns no data on success, such as `Delete`, the response is `google.protobuf.
|
1809
|
+
# Empty`. If the original method is standard `Get`/`Create`/`Update`, the
|
1810
|
+
# response should be the resource. For other methods, the response should have
|
1811
|
+
# the type `XxxResponse`, where `Xxx` is the original method name. For example,
|
1812
|
+
# if the original method name is `TakeSnapshot()`, the inferred response type is
|
1813
|
+
# `TakeSnapshotResponse`.
|
1814
|
+
# Corresponds to the JSON property `response`
|
1815
|
+
# @return [Hash<String,Object>]
|
1816
|
+
attr_accessor :response
|
1817
|
+
|
1818
|
+
def initialize(**args)
|
1819
|
+
update!(**args)
|
1820
|
+
end
|
1821
|
+
|
1822
|
+
# Update properties of this object
|
1823
|
+
def update!(**args)
|
1824
|
+
@done = args[:done] if args.key?(:done)
|
1825
|
+
@error = args[:error] if args.key?(:error)
|
1826
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1827
|
+
@name = args[:name] if args.key?(:name)
|
1828
|
+
@response = args[:response] if args.key?(:response)
|
1829
|
+
end
|
1830
|
+
end
|
1831
|
+
|
1832
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1833
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1834
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1835
|
+
# data: error code, error message, and error details. You can find out more
|
1836
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1837
|
+
# //cloud.google.com/apis/design/errors).
|
1838
|
+
class Status
|
1839
|
+
include Google::Apis::Core::Hashable
|
1840
|
+
|
1841
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1842
|
+
# Corresponds to the JSON property `code`
|
1843
|
+
# @return [Fixnum]
|
1844
|
+
attr_accessor :code
|
1845
|
+
|
1846
|
+
# A list of messages that carry the error details. There is a common set of
|
1847
|
+
# message types for APIs to use.
|
1848
|
+
# Corresponds to the JSON property `details`
|
1849
|
+
# @return [Array<Hash<String,Object>>]
|
1850
|
+
attr_accessor :details
|
1851
|
+
|
1852
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1853
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1854
|
+
# field, or localized by the client.
|
1855
|
+
# Corresponds to the JSON property `message`
|
1856
|
+
# @return [String]
|
1857
|
+
attr_accessor :message
|
1858
|
+
|
1859
|
+
def initialize(**args)
|
1860
|
+
update!(**args)
|
1861
|
+
end
|
1862
|
+
|
1863
|
+
# Update properties of this object
|
1864
|
+
def update!(**args)
|
1865
|
+
@code = args[:code] if args.key?(:code)
|
1866
|
+
@details = args[:details] if args.key?(:details)
|
1867
|
+
@message = args[:message] if args.key?(:message)
|
1868
|
+
end
|
1869
|
+
end
|
1870
|
+
end
|
1871
|
+
end
|
1872
|
+
end
|