google-apis-orgpolicy_v2 0.7.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/OVERVIEW.md +3 -3
- data/lib/google/apis/orgpolicy_v2/classes.rb +68 -5
- 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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3e107bb05cf848ff56cbcc332172ca4102b6710fe19b453ddc29e738fd5eef5
|
4
|
+
data.tar.gz: 35c53b5da0091256168d061f4a1148318db60505ae26a2ef7c9efe6abac876d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79898add4a6b78cbc09e5ba576f0fa06cb4772223efcb338e84d4eb79c2514ec1e61fa1f41fd56bd0f58e89344db42676a48337e0e09ea02af0b0c0cd263358e
|
7
|
+
data.tar.gz: a7698cc7bea154c4079c826d758bd3ad06653c7e781be0508b921df46aa872ac8b4e8e3b5496fa336480c19a602cff7c41151a2ef79d6a08d5960295360c11b6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Release history for google-apis-orgpolicy_v2
|
2
2
|
|
3
|
+
### v0.11.0 (2021-12-14)
|
4
|
+
|
5
|
+
* Unspecified changes
|
6
|
+
|
7
|
+
### v0.10.0 (2021-12-02)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20211130
|
10
|
+
|
11
|
+
### v0.9.0 (2021-10-21)
|
12
|
+
|
13
|
+
* Unspecified changes
|
14
|
+
|
15
|
+
### v0.8.0 (2021-10-08)
|
16
|
+
|
17
|
+
* Regenerated from discovery document revision 20211006
|
18
|
+
|
3
19
|
### v0.7.0 (2021-09-01)
|
4
20
|
|
5
21
|
* Regenerated from discovery document revision 20210806
|
data/OVERVIEW.md
CHANGED
@@ -51,7 +51,7 @@ require "google/apis/orgpolicy_v2"
|
|
51
51
|
client = Google::Apis::OrgpolicyV2::OrgPolicyAPIService.new
|
52
52
|
|
53
53
|
# Authenticate calls
|
54
|
-
client.
|
54
|
+
client.authorization = # ... use the googleauth gem to create credentials
|
55
55
|
```
|
56
56
|
|
57
57
|
See the class reference docs for information on the methods you can call from a client.
|
@@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|
60
60
|
|
61
61
|
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
62
|
|
63
|
-
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/
|
64
|
-
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
65
|
|
66
66
|
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Orgpolicy service in particular.)
|
67
67
|
|
@@ -26,11 +26,11 @@ module Google
|
|
26
26
|
# example, you could enforce a constraint that controls which cloud services can
|
27
27
|
# be activated across an organization, or whether a Compute Engine instance can
|
28
28
|
# have serial port connections established. `Constraints` can be configured by
|
29
|
-
# the organization's policy
|
30
|
-
# setting a `policy` that includes `constraints` at different locations in
|
31
|
-
# organization's resource hierarchy. Policies are inherited down the
|
32
|
-
# hierarchy from higher levels, but can also be overridden. For details
|
33
|
-
# the inheritance rules please read about `policies`. `Constraints` have a
|
29
|
+
# the organization's policy administrator to fit the needs of the organization
|
30
|
+
# by setting a `policy` that includes `constraints` at different locations in
|
31
|
+
# the organization's resource hierarchy. Policies are inherited down the
|
32
|
+
# resource hierarchy from higher levels, but can also be overridden. For details
|
33
|
+
# about the inheritance rules please read about `policies`. `Constraints` have a
|
34
34
|
# default behavior determined by the `constraint_default` field, which is the
|
35
35
|
# enforcement behavior that is used in the absence of a `policy` being defined
|
36
36
|
# or inherited for the resource in question.
|
@@ -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.11.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.11.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:
|
11
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -57,9 +57,9 @@ licenses:
|
|
57
57
|
- Apache-2.0
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
|
-
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-orgpolicy_v2/v0.
|
62
|
-
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/
|
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
|
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: []
|
65
65
|
require_paths:
|
@@ -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.
|
78
|
+
rubygems_version: 3.3.4
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Simple REST client for Organization Policy API V2
|