google-apis-orgpolicy_v2 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/google/apis/orgpolicy_v2/classes.rb +63 -0
- data/lib/google/apis/orgpolicy_v2/gem_version.rb +2 -2
- data/lib/google/apis/orgpolicy_v2/representations.rb +19 -0
- data/lib/google/apis/orgpolicy_v2/service.rb +39 -1
- data/lib/google/apis/orgpolicy_v2.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d38993f0fedc50770e8cc15e43cac0ef33bdf84bc1109ae19f1d274469ed502a
|
4
|
+
data.tar.gz: 5d224035e10245865726e8c228e789a14bffcb4365ddbce76485999ec197f6be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de0c9a3b7710ae06b3dcf1496f9db8062de1f6263fe5787437a2e106f8941467d3b48efd2820926a3afc9898bab69540f46ed3d608af4a5bf54d5ecf2c226588
|
7
|
+
data.tar.gz: 4d40fccece552680da8134202836f9f852d40db16a4ea1b0157dc20e6771ae6627b88fc90c60aa1132e225faf16c0f36dc97f0f9a7cd7784b10232be32dec2bc
|
data/CHANGELOG.md
CHANGED
@@ -137,6 +137,69 @@ module Google
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
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
|
+
|
140
203
|
# The response returned from the ListConstraints method.
|
141
204
|
class GoogleCloudOrgpolicyV2ListConstraintsResponse
|
142
205
|
include Google::Apis::Core::Hashable
|
@@ -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.
|
19
|
+
GEM_VERSION = "0.10.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
22
|
GENERATOR_VERSION = "0.4.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20211130"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -40,6 +40,12 @@ module Google
|
|
40
40
|
include Google::Apis::Core::JsonObjectSupport
|
41
41
|
end
|
42
42
|
|
43
|
+
class GoogleCloudOrgpolicyV2CustomConstraint
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
43
49
|
class GoogleCloudOrgpolicyV2ListConstraintsResponse
|
44
50
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
51
|
|
@@ -116,6 +122,19 @@ module Google
|
|
116
122
|
end
|
117
123
|
end
|
118
124
|
|
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
|
+
|
119
138
|
class GoogleCloudOrgpolicyV2ListConstraintsResponse
|
120
139
|
# @private
|
121
140
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -22,7 +22,7 @@ module Google
|
|
22
22
|
module OrgpolicyV2
|
23
23
|
# Organization Policy API
|
24
24
|
#
|
25
|
-
# The Org Policy API allows users to configure governance
|
25
|
+
# The Org Policy API allows users to configure governance rules on their GCP
|
26
26
|
# resources across the Cloud Resource Hierarchy.
|
27
27
|
#
|
28
28
|
# @example
|
@@ -350,6 +350,44 @@ 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
|
+
|
353
391
|
# Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.
|
354
392
|
# NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status`
|
355
393
|
# with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the
|
@@ -21,7 +21,7 @@ module Google
|
|
21
21
|
module Apis
|
22
22
|
# Organization Policy API
|
23
23
|
#
|
24
|
-
# The Org Policy API allows users to configure governance
|
24
|
+
# The Org Policy API allows users to configure governance rules on their GCP
|
25
25
|
# resources across the Cloud Resource Hierarchy.
|
26
26
|
#
|
27
27
|
# @see https://cloud.google.com/orgpolicy/docs/reference/rest/index.html
|
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.
|
4
|
+
version: 0.10.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: 2021-
|
11
|
+
date: 2021-12-06 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.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-orgpolicy_v2/v0.10.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: []
|