google-apis-orgpolicy_v2 0.11.0 → 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3e107bb05cf848ff56cbcc332172ca4102b6710fe19b453ddc29e738fd5eef5
4
- data.tar.gz: 35c53b5da0091256168d061f4a1148318db60505ae26a2ef7c9efe6abac876d8
3
+ metadata.gz: dd6535884a09f6736909c7613988167da9b52eb9156ecd5a0f7a6f24e9bacaf0
4
+ data.tar.gz: 67c1094a5f110ccaf6f8d9df6d6dcad69cc356804a470eeb62cd831cfa3c6903
5
5
  SHA512:
6
- metadata.gz: 79898add4a6b78cbc09e5ba576f0fa06cb4772223efcb338e84d4eb79c2514ec1e61fa1f41fd56bd0f58e89344db42676a48337e0e09ea02af0b0c0cd263358e
7
- data.tar.gz: a7698cc7bea154c4079c826d758bd3ad06653c7e781be0508b921df46aa872ac8b4e8e3b5496fa336480c19a602cff7c41151a2ef79d6a08d5960295360c11b6
6
+ metadata.gz: 869370a84ed0001c028e39698a78917fe4ce8b7c22085946a2c7b0210cf809e38703db4168a2c653be11846ac9982d7dd7fcd17a70853cd002d502e0f9abfdac
7
+ data.tar.gz: 07b55e8e84e185d42e129e9ba58b75a99963b0bd107e5b873213b8f5cdbab1e2e4f202f2f617b856e6a592aeccbdcc2be8ea621040cce88ea267b15148682f86
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Release history for google-apis-orgpolicy_v2
2
2
 
3
+ ### v0.14.0 (2022-03-22)
4
+
5
+ * Regenerated from discovery document revision 20220319
6
+
7
+ ### v0.13.0 (2022-02-01)
8
+
9
+ * Regenerated from discovery document revision 20220129
10
+ * Regenerated using generator version 0.4.1
11
+
12
+ ### v0.12.0 (2022-01-11)
13
+
14
+ * Regenerated from discovery document revision 20220107
15
+
3
16
  ### v0.11.0 (2021-12-14)
4
17
 
5
18
  * Unspecified changes
@@ -22,6 +22,34 @@ module Google
22
22
  module Apis
23
23
  module OrgpolicyV2
24
24
 
25
+ # Similar to PolicySpec but with an extra 'launch' field for launch reference.
26
+ # The PolicySpec here is specific for dry-run/darklaunch.
27
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # Reference to the launch that will be used while audit logging and to control
31
+ # the launch. Should be set only in the alternate policy.
32
+ # Corresponds to the JSON property `launch`
33
+ # @return [String]
34
+ attr_accessor :launch
35
+
36
+ # Defines a Cloud Organization `PolicySpec` which is used to specify `
37
+ # Constraints` for configurations of Cloud Platform resources.
38
+ # Corresponds to the JSON property `spec`
39
+ # @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpec]
40
+ attr_accessor :spec
41
+
42
+ def initialize(**args)
43
+ update!(**args)
44
+ end
45
+
46
+ # Update properties of this object
47
+ def update!(**args)
48
+ @launch = args[:launch] if args.key?(:launch)
49
+ @spec = args[:spec] if args.key?(:spec)
50
+ end
51
+ end
52
+
25
53
  # A `constraint` describes a way to restrict resource's configuration. For
26
54
  # example, you could enforce a constraint that controls which cloud services can
27
55
  # be activated across an organization, or whether a Compute Engine instance can
@@ -137,69 +165,6 @@ module Google
137
165
  end
138
166
  end
139
167
 
140
- # A custom constraint defined by customers which can *only* be applied to the
141
- # given resource types and organization. By creating a custom constraint,
142
- # customers can applied policies of this custom constraint. *Creating a custom
143
- # constraint itself does NOT apply any policy enforcement*.
144
- class GoogleCloudOrgpolicyV2CustomConstraint
145
- include Google::Apis::Core::Hashable
146
-
147
- # Allow or deny type.
148
- # Corresponds to the JSON property `actionType`
149
- # @return [String]
150
- attr_accessor :action_type
151
-
152
- # Org policy condition/expression. For example: `resource.instanceName.matches("[
153
- # production|test]_.*_(\d)+")'` or, `resource.management.auto_upgrade == true`
154
- # Corresponds to the JSON property `condition`
155
- # @return [String]
156
- attr_accessor :condition
157
-
158
- # Detailed information about this custom policy constraint.
159
- # Corresponds to the JSON property `description`
160
- # @return [String]
161
- attr_accessor :description
162
-
163
- # One line display name for the UI.
164
- # Corresponds to the JSON property `displayName`
165
- # @return [String]
166
- attr_accessor :display_name
167
-
168
- # All the operations being applied for this constraint.
169
- # Corresponds to the JSON property `methodTypes`
170
- # @return [Array<String>]
171
- attr_accessor :method_types
172
-
173
- # Immutable. Name of the constraint. This is unique within the organization.
174
- # Format of the name should be * `organizations/`organization_id`/
175
- # customConstraints/`custom_constraint_id`` Example : "organizations/123/
176
- # customConstraints/custom.createOnlyE2TypeVms"
177
- # Corresponds to the JSON property `name`
178
- # @return [String]
179
- attr_accessor :name
180
-
181
- # Immutable. The Resource Instance type on which this policy applies to. Format
182
- # will be of the form : "/" Example: * `compute.googleapis.com/Instance`.
183
- # Corresponds to the JSON property `resourceTypes`
184
- # @return [Array<String>]
185
- attr_accessor :resource_types
186
-
187
- def initialize(**args)
188
- update!(**args)
189
- end
190
-
191
- # Update properties of this object
192
- def update!(**args)
193
- @action_type = args[:action_type] if args.key?(:action_type)
194
- @condition = args[:condition] if args.key?(:condition)
195
- @description = args[:description] if args.key?(:description)
196
- @display_name = args[:display_name] if args.key?(:display_name)
197
- @method_types = args[:method_types] if args.key?(:method_types)
198
- @name = args[:name] if args.key?(:name)
199
- @resource_types = args[:resource_types] if args.key?(:resource_types)
200
- end
201
- end
202
-
203
168
  # The response returned from the ListConstraints method.
204
169
  class GoogleCloudOrgpolicyV2ListConstraintsResponse
205
170
  include Google::Apis::Core::Hashable
@@ -258,6 +223,12 @@ module Google
258
223
  class GoogleCloudOrgpolicyV2Policy
259
224
  include Google::Apis::Core::Hashable
260
225
 
226
+ # Similar to PolicySpec but with an extra 'launch' field for launch reference.
227
+ # The PolicySpec here is specific for dry-run/darklaunch.
228
+ # Corresponds to the JSON property `alternate`
229
+ # @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2AlternatePolicySpec]
230
+ attr_accessor :alternate
231
+
261
232
  # Immutable. The resource name of the Policy. Must be one of the following forms,
262
233
  # where constraint_name is the name of the constraint which this Policy
263
234
  # configures: * `projects/`project_number`/policies/`constraint_name`` * `
@@ -282,6 +253,7 @@ module Google
282
253
 
283
254
  # Update properties of this object
284
255
  def update!(**args)
256
+ @alternate = args[:alternate] if args.key?(:alternate)
285
257
  @name = args[:name] if args.key?(:name)
286
258
  @spec = args[:spec] if args.key?(:spec)
287
259
  end
@@ -463,8 +435,7 @@ module Google
463
435
  # A generic empty message that you can re-use to avoid defining duplicated empty
464
436
  # messages in your APIs. A typical example is to use it as the request or the
465
437
  # response type of an API method. For instance: service Foo ` rpc Bar(google.
466
- # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
467
- # `Empty` is empty JSON object ````.
438
+ # protobuf.Empty) returns (google.protobuf.Empty); `
468
439
  class GoogleProtobufEmpty
469
440
  include Google::Apis::Core::Hashable
470
441
 
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module OrgpolicyV2
18
18
  # Version of the google-apis-orgpolicy_v2 gem
19
- GEM_VERSION = "0.11.0"
19
+ GEM_VERSION = "0.14.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.4.0"
22
+ GENERATOR_VERSION = "0.4.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20211130"
25
+ REVISION = "20220319"
26
26
  end
27
27
  end
28
28
  end
@@ -22,25 +22,25 @@ module Google
22
22
  module Apis
23
23
  module OrgpolicyV2
24
24
 
25
- class GoogleCloudOrgpolicyV2Constraint
25
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
26
26
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
27
 
28
28
  include Google::Apis::Core::JsonObjectSupport
29
29
  end
30
30
 
31
- class GoogleCloudOrgpolicyV2ConstraintBooleanConstraint
31
+ class GoogleCloudOrgpolicyV2Constraint
32
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
33
 
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
- class GoogleCloudOrgpolicyV2ConstraintListConstraint
37
+ class GoogleCloudOrgpolicyV2ConstraintBooleanConstraint
38
38
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
39
 
40
40
  include Google::Apis::Core::JsonObjectSupport
41
41
  end
42
42
 
43
- class GoogleCloudOrgpolicyV2CustomConstraint
43
+ class GoogleCloudOrgpolicyV2ConstraintListConstraint
44
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
45
 
46
46
  include Google::Apis::Core::JsonObjectSupport
@@ -94,6 +94,15 @@ module Google
94
94
  include Google::Apis::Core::JsonObjectSupport
95
95
  end
96
96
 
97
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
98
+ # @private
99
+ class Representation < Google::Apis::Core::JsonRepresentation
100
+ property :launch, as: 'launch'
101
+ property :spec, as: 'spec', class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpec, decorator: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpec::Representation
102
+
103
+ end
104
+ end
105
+
97
106
  class GoogleCloudOrgpolicyV2Constraint
98
107
  # @private
99
108
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -122,19 +131,6 @@ module Google
122
131
  end
123
132
  end
124
133
 
125
- class GoogleCloudOrgpolicyV2CustomConstraint
126
- # @private
127
- class Representation < Google::Apis::Core::JsonRepresentation
128
- property :action_type, as: 'actionType'
129
- property :condition, as: 'condition'
130
- property :description, as: 'description'
131
- property :display_name, as: 'displayName'
132
- collection :method_types, as: 'methodTypes'
133
- property :name, as: 'name'
134
- collection :resource_types, as: 'resourceTypes'
135
- end
136
- end
137
-
138
134
  class GoogleCloudOrgpolicyV2ListConstraintsResponse
139
135
  # @private
140
136
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -156,6 +152,8 @@ module Google
156
152
  class GoogleCloudOrgpolicyV2Policy
157
153
  # @private
158
154
  class Representation < Google::Apis::Core::JsonRepresentation
155
+ property :alternate, as: 'alternate', class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2AlternatePolicySpec, decorator: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2AlternatePolicySpec::Representation
156
+
159
157
  property :name, as: 'name'
160
158
  property :spec, as: 'spec', class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpec, decorator: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpec::Representation
161
159
 
@@ -350,44 +350,6 @@ module Google
350
350
  execute_or_queue_command(command, &block)
351
351
  end
352
352
 
353
- # Updates a Custom Constraint. Returns a `google.rpc.Status` with `google.rpc.
354
- # Code.NOT_FOUND` if the constraint does not exist. Note: the supplied policy
355
- # will perform a full overwrite of all fields.
356
- # @param [String] name
357
- # Immutable. Name of the constraint. This is unique within the organization.
358
- # Format of the name should be * `organizations/`organization_id`/
359
- # customConstraints/`custom_constraint_id`` Example : "organizations/123/
360
- # customConstraints/custom.createOnlyE2TypeVms"
361
- # @param [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint] google_cloud_orgpolicy_v2_custom_constraint_object
362
- # @param [String] fields
363
- # Selector specifying which fields to include in a partial response.
364
- # @param [String] quota_user
365
- # Available to use for quota purposes for server-side applications. Can be any
366
- # arbitrary string assigned to a user, but should not exceed 40 characters.
367
- # @param [Google::Apis::RequestOptions] options
368
- # Request-specific options
369
- #
370
- # @yield [result, err] Result & error if block supplied
371
- # @yieldparam result [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint] parsed result object
372
- # @yieldparam err [StandardError] error object if request failed
373
- #
374
- # @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint]
375
- #
376
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
377
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
378
- # @raise [Google::Apis::AuthorizationError] Authorization is required
379
- def patch_organization_custom_constraint(name, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil, &block)
380
- command = make_simple_command(:patch, 'v2/{+name}', options)
381
- command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation
382
- command.request_object = google_cloud_orgpolicy_v2_custom_constraint_object
383
- command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation
384
- command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
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
353
  # Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.
392
354
  # NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status`
393
355
  # with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-orgpolicy_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-10 00:00:00.000000000 Z
11
+ date: 2022-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-orgpolicy_v2/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-orgpolicy_v2/v0.11.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-orgpolicy_v2/v0.14.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-orgpolicy_v2
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.3.4
78
+ rubygems_version: 3.3.5
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Organization Policy API V2