google-apis-iam_v2beta 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/iam_v2beta/classes.rb +576 -0
- data/lib/google/apis/iam_v2beta/gem_version.rb +28 -0
- data/lib/google/apis/iam_v2beta/representations.rb +232 -0
- data/lib/google/apis/iam_v2beta/service.rb +307 -0
- data/lib/google/apis/iam_v2beta.rb +38 -0
- data/lib/google-apis-iam_v2beta.rb +15 -0
- metadata +83 -0
@@ -0,0 +1,232 @@
|
|
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 IamV2beta
|
24
|
+
|
25
|
+
class GoogleIamAdminV1AuditData
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class GoogleIamAdminV1AuditDataPermissionDelta
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class GoogleIamV1BindingDelta
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class GoogleIamV1LoggingAuditData
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class GoogleIamV1PolicyDelta
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class GoogleIamV2betaDenyRule
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoogleIamV2betaListPoliciesResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class GoogleIamV2betaPolicy
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class GoogleIamV2betaPolicyOperationMetadata
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class GoogleIamV2betaPolicyRule
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class GoogleLongrunningOperation
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class GoogleRpcStatus
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class GoogleTypeExpr
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class GoogleIamAdminV1AuditData
|
104
|
+
# @private
|
105
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
106
|
+
property :permission_delta, as: 'permissionDelta', class: Google::Apis::IamV2beta::GoogleIamAdminV1AuditDataPermissionDelta, decorator: Google::Apis::IamV2beta::GoogleIamAdminV1AuditDataPermissionDelta::Representation
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class GoogleIamAdminV1AuditDataPermissionDelta
|
112
|
+
# @private
|
113
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
114
|
+
collection :added_permissions, as: 'addedPermissions'
|
115
|
+
collection :removed_permissions, as: 'removedPermissions'
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
class GoogleIamV1BindingDelta
|
120
|
+
# @private
|
121
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
122
|
+
property :action, as: 'action'
|
123
|
+
property :condition, as: 'condition', class: Google::Apis::IamV2beta::GoogleTypeExpr, decorator: Google::Apis::IamV2beta::GoogleTypeExpr::Representation
|
124
|
+
|
125
|
+
property :member, as: 'member'
|
126
|
+
property :role, as: 'role'
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
class GoogleIamV1LoggingAuditData
|
131
|
+
# @private
|
132
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
133
|
+
property :policy_delta, as: 'policyDelta', class: Google::Apis::IamV2beta::GoogleIamV1PolicyDelta, decorator: Google::Apis::IamV2beta::GoogleIamV1PolicyDelta::Representation
|
134
|
+
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
class GoogleIamV1PolicyDelta
|
139
|
+
# @private
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
141
|
+
collection :binding_deltas, as: 'bindingDeltas', class: Google::Apis::IamV2beta::GoogleIamV1BindingDelta, decorator: Google::Apis::IamV2beta::GoogleIamV1BindingDelta::Representation
|
142
|
+
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
class GoogleIamV2betaDenyRule
|
147
|
+
# @private
|
148
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
149
|
+
property :denial_condition, as: 'denialCondition', class: Google::Apis::IamV2beta::GoogleTypeExpr, decorator: Google::Apis::IamV2beta::GoogleTypeExpr::Representation
|
150
|
+
|
151
|
+
collection :denied_permissions, as: 'deniedPermissions'
|
152
|
+
collection :denied_principals, as: 'deniedPrincipals'
|
153
|
+
collection :exception_permissions, as: 'exceptionPermissions'
|
154
|
+
collection :exception_principals, as: 'exceptionPrincipals'
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
class GoogleIamV2betaListPoliciesResponse
|
159
|
+
# @private
|
160
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
161
|
+
property :next_page_token, as: 'nextPageToken'
|
162
|
+
collection :policies, as: 'policies', class: Google::Apis::IamV2beta::GoogleIamV2betaPolicy, decorator: Google::Apis::IamV2beta::GoogleIamV2betaPolicy::Representation
|
163
|
+
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
class GoogleIamV2betaPolicy
|
168
|
+
# @private
|
169
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
170
|
+
hash :annotations, as: 'annotations'
|
171
|
+
property :create_time, as: 'createTime'
|
172
|
+
property :delete_time, as: 'deleteTime'
|
173
|
+
property :display_name, as: 'displayName'
|
174
|
+
property :etag, as: 'etag'
|
175
|
+
property :kind, as: 'kind'
|
176
|
+
property :name, as: 'name'
|
177
|
+
collection :rules, as: 'rules', class: Google::Apis::IamV2beta::GoogleIamV2betaPolicyRule, decorator: Google::Apis::IamV2beta::GoogleIamV2betaPolicyRule::Representation
|
178
|
+
|
179
|
+
property :uid, as: 'uid'
|
180
|
+
property :update_time, as: 'updateTime'
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
class GoogleIamV2betaPolicyOperationMetadata
|
185
|
+
# @private
|
186
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
187
|
+
property :create_time, as: 'createTime'
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
class GoogleIamV2betaPolicyRule
|
192
|
+
# @private
|
193
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
194
|
+
property :deny_rule, as: 'denyRule', class: Google::Apis::IamV2beta::GoogleIamV2betaDenyRule, decorator: Google::Apis::IamV2beta::GoogleIamV2betaDenyRule::Representation
|
195
|
+
|
196
|
+
property :description, as: 'description'
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
class GoogleLongrunningOperation
|
201
|
+
# @private
|
202
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
203
|
+
property :done, as: 'done'
|
204
|
+
property :error, as: 'error', class: Google::Apis::IamV2beta::GoogleRpcStatus, decorator: Google::Apis::IamV2beta::GoogleRpcStatus::Representation
|
205
|
+
|
206
|
+
hash :metadata, as: 'metadata'
|
207
|
+
property :name, as: 'name'
|
208
|
+
hash :response, as: 'response'
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
class GoogleRpcStatus
|
213
|
+
# @private
|
214
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
215
|
+
property :code, as: 'code'
|
216
|
+
collection :details, as: 'details'
|
217
|
+
property :message, as: 'message'
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
class GoogleTypeExpr
|
222
|
+
# @private
|
223
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
224
|
+
property :description, as: 'description'
|
225
|
+
property :expression, as: 'expression'
|
226
|
+
property :location, as: 'location'
|
227
|
+
property :title, as: 'title'
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
@@ -0,0 +1,307 @@
|
|
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 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module IamV2beta
|
23
|
+
# Identity and Access Management (IAM) API
|
24
|
+
#
|
25
|
+
# Manages identity and access control for Google Cloud Platform resources,
|
26
|
+
# including the creation of service accounts, which you can use to authenticate
|
27
|
+
# to Google and make API calls.
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# require 'google/apis/iam_v2beta'
|
31
|
+
#
|
32
|
+
# Iam = Google::Apis::IamV2beta # Alias the module
|
33
|
+
# service = Iam::IamService.new
|
34
|
+
#
|
35
|
+
# @see https://cloud.google.com/iam/
|
36
|
+
class IamService < Google::Apis::Core::BaseService
|
37
|
+
# @return [String]
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super('https://iam.googleapis.com/', '',
|
49
|
+
client_name: 'google-apis-iam_v2beta',
|
50
|
+
client_version: Google::Apis::IamV2beta::GEM_VERSION)
|
51
|
+
@batch_path = 'batch'
|
52
|
+
end
|
53
|
+
|
54
|
+
# Creates a policy.
|
55
|
+
# @param [String] parent
|
56
|
+
# Required. The resource that the policy is attached to, along with the kind of
|
57
|
+
# policy to create. Format: `policies/`attachment-point`/denypolicies` The
|
58
|
+
# attachment point is identified by its URL-encoded full resource name, which
|
59
|
+
# means that the forward-slash character, `/`, must be written as `%2F`. For
|
60
|
+
# example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/
|
61
|
+
# denypolicies`. For organizations and folders, use the numeric ID in the full
|
62
|
+
# resource name. For projects, you can use the alphanumeric or the numeric ID.
|
63
|
+
# @param [Google::Apis::IamV2beta::GoogleIamV2betaPolicy] google_iam_v2beta_policy_object
|
64
|
+
# @param [String] policy_id
|
65
|
+
# The ID to use for this policy, which will become the final component of the
|
66
|
+
# policy's resource name. The ID must contain 3 to 63 characters. It can contain
|
67
|
+
# lowercase letters and numbers, as well as dashes (`-`) and periods (`.`). The
|
68
|
+
# first character must be a lowercase letter.
|
69
|
+
# @param [String] fields
|
70
|
+
# Selector specifying which fields to include in a partial response.
|
71
|
+
# @param [String] quota_user
|
72
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
73
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
74
|
+
# @param [Google::Apis::RequestOptions] options
|
75
|
+
# Request-specific options
|
76
|
+
#
|
77
|
+
# @yield [result, err] Result & error if block supplied
|
78
|
+
# @yieldparam result [Google::Apis::IamV2beta::GoogleLongrunningOperation] parsed result object
|
79
|
+
# @yieldparam err [StandardError] error object if request failed
|
80
|
+
#
|
81
|
+
# @return [Google::Apis::IamV2beta::GoogleLongrunningOperation]
|
82
|
+
#
|
83
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
84
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
85
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
86
|
+
def create_policy_policy(parent, google_iam_v2beta_policy_object = nil, policy_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
87
|
+
command = make_simple_command(:post, 'v2beta/{+parent}', options)
|
88
|
+
command.request_representation = Google::Apis::IamV2beta::GoogleIamV2betaPolicy::Representation
|
89
|
+
command.request_object = google_iam_v2beta_policy_object
|
90
|
+
command.response_representation = Google::Apis::IamV2beta::GoogleLongrunningOperation::Representation
|
91
|
+
command.response_class = Google::Apis::IamV2beta::GoogleLongrunningOperation
|
92
|
+
command.params['parent'] = parent unless parent.nil?
|
93
|
+
command.query['policyId'] = policy_id unless policy_id.nil?
|
94
|
+
command.query['fields'] = fields unless fields.nil?
|
95
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
96
|
+
execute_or_queue_command(command, &block)
|
97
|
+
end
|
98
|
+
|
99
|
+
# Deletes a policy. This action is permanent.
|
100
|
+
# @param [String] name
|
101
|
+
# Required. The resource name of the policy to delete. Format: `policies/`
|
102
|
+
# attachment-point`/denypolicies/`policy-id`` Use the URL-encoded full resource
|
103
|
+
# name, which means that the forward-slash character, `/`, must be written as `%
|
104
|
+
# 2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%
|
105
|
+
# 2Fmy-project/denypolicies/my-policy`. For organizations and folders, use the
|
106
|
+
# numeric ID in the full resource name. For projects, you can use the
|
107
|
+
# alphanumeric or the numeric ID.
|
108
|
+
# @param [String] etag
|
109
|
+
# Optional. The expected `etag` of the policy to delete. If the value does not
|
110
|
+
# match the value that is stored in IAM, the request fails with a `409` error
|
111
|
+
# code and `ABORTED` status. If you omit this field, the policy is deleted
|
112
|
+
# regardless of its current `etag`.
|
113
|
+
# @param [String] fields
|
114
|
+
# Selector specifying which fields to include in a partial response.
|
115
|
+
# @param [String] quota_user
|
116
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
117
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
118
|
+
# @param [Google::Apis::RequestOptions] options
|
119
|
+
# Request-specific options
|
120
|
+
#
|
121
|
+
# @yield [result, err] Result & error if block supplied
|
122
|
+
# @yieldparam result [Google::Apis::IamV2beta::GoogleLongrunningOperation] parsed result object
|
123
|
+
# @yieldparam err [StandardError] error object if request failed
|
124
|
+
#
|
125
|
+
# @return [Google::Apis::IamV2beta::GoogleLongrunningOperation]
|
126
|
+
#
|
127
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
128
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
129
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
130
|
+
def delete_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block)
|
131
|
+
command = make_simple_command(:delete, 'v2beta/{+name}', options)
|
132
|
+
command.response_representation = Google::Apis::IamV2beta::GoogleLongrunningOperation::Representation
|
133
|
+
command.response_class = Google::Apis::IamV2beta::GoogleLongrunningOperation
|
134
|
+
command.params['name'] = name unless name.nil?
|
135
|
+
command.query['etag'] = etag unless etag.nil?
|
136
|
+
command.query['fields'] = fields unless fields.nil?
|
137
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
138
|
+
execute_or_queue_command(command, &block)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Gets a policy.
|
142
|
+
# @param [String] name
|
143
|
+
# Required. The resource name of the policy to retrieve. Format: `policies/`
|
144
|
+
# attachment-point`/denypolicies/`policy-id`` Use the URL-encoded full resource
|
145
|
+
# name, which means that the forward-slash character, `/`, must be written as `%
|
146
|
+
# 2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%
|
147
|
+
# 2Fmy-project/denypolicies/my-policy`. For organizations and folders, use the
|
148
|
+
# numeric ID in the full resource name. For projects, you can use the
|
149
|
+
# alphanumeric or the numeric ID.
|
150
|
+
# @param [String] fields
|
151
|
+
# Selector specifying which fields to include in a partial response.
|
152
|
+
# @param [String] quota_user
|
153
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
154
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
155
|
+
# @param [Google::Apis::RequestOptions] options
|
156
|
+
# Request-specific options
|
157
|
+
#
|
158
|
+
# @yield [result, err] Result & error if block supplied
|
159
|
+
# @yieldparam result [Google::Apis::IamV2beta::GoogleIamV2betaPolicy] parsed result object
|
160
|
+
# @yieldparam err [StandardError] error object if request failed
|
161
|
+
#
|
162
|
+
# @return [Google::Apis::IamV2beta::GoogleIamV2betaPolicy]
|
163
|
+
#
|
164
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
165
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
166
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
167
|
+
def get_policy(name, fields: nil, quota_user: nil, options: nil, &block)
|
168
|
+
command = make_simple_command(:get, 'v2beta/{+name}', options)
|
169
|
+
command.response_representation = Google::Apis::IamV2beta::GoogleIamV2betaPolicy::Representation
|
170
|
+
command.response_class = Google::Apis::IamV2beta::GoogleIamV2betaPolicy
|
171
|
+
command.params['name'] = name unless name.nil?
|
172
|
+
command.query['fields'] = fields unless fields.nil?
|
173
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
174
|
+
execute_or_queue_command(command, &block)
|
175
|
+
end
|
176
|
+
|
177
|
+
# Retrieves the policies of the specified kind that are attached to a resource.
|
178
|
+
# The response lists only policy metadata. In particular, policy rules are
|
179
|
+
# omitted.
|
180
|
+
# @param [String] parent
|
181
|
+
# Required. The resource that the policy is attached to, along with the kind of
|
182
|
+
# policy to list. Format: `policies/`attachment-point`/denypolicies` The
|
183
|
+
# attachment point is identified by its URL-encoded full resource name, which
|
184
|
+
# means that the forward-slash character, `/`, must be written as `%2F`. For
|
185
|
+
# example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/
|
186
|
+
# denypolicies`. For organizations and folders, use the numeric ID in the full
|
187
|
+
# resource name. For projects, you can use the alphanumeric or the numeric ID.
|
188
|
+
# @param [Fixnum] page_size
|
189
|
+
# The maximum number of policies to return. IAM ignores this value and uses the
|
190
|
+
# value 1000.
|
191
|
+
# @param [String] page_token
|
192
|
+
# A page token received in a ListPoliciesResponse. Provide this token to
|
193
|
+
# retrieve the next page.
|
194
|
+
# @param [String] fields
|
195
|
+
# Selector specifying which fields to include in a partial response.
|
196
|
+
# @param [String] quota_user
|
197
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
198
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
199
|
+
# @param [Google::Apis::RequestOptions] options
|
200
|
+
# Request-specific options
|
201
|
+
#
|
202
|
+
# @yield [result, err] Result & error if block supplied
|
203
|
+
# @yieldparam result [Google::Apis::IamV2beta::GoogleIamV2betaListPoliciesResponse] parsed result object
|
204
|
+
# @yieldparam err [StandardError] error object if request failed
|
205
|
+
#
|
206
|
+
# @return [Google::Apis::IamV2beta::GoogleIamV2betaListPoliciesResponse]
|
207
|
+
#
|
208
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
209
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
210
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
211
|
+
def list_policy_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
212
|
+
command = make_simple_command(:get, 'v2beta/{+parent}', options)
|
213
|
+
command.response_representation = Google::Apis::IamV2beta::GoogleIamV2betaListPoliciesResponse::Representation
|
214
|
+
command.response_class = Google::Apis::IamV2beta::GoogleIamV2betaListPoliciesResponse
|
215
|
+
command.params['parent'] = parent unless parent.nil?
|
216
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
217
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
218
|
+
command.query['fields'] = fields unless fields.nil?
|
219
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
220
|
+
execute_or_queue_command(command, &block)
|
221
|
+
end
|
222
|
+
|
223
|
+
# Updates the specified policy. You can update only the rules and the display
|
224
|
+
# name for the policy. To update a policy, you should use a read-modify-write
|
225
|
+
# loop: 1. Use GetPolicy to read the current version of the policy. 2. Modify
|
226
|
+
# the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. This
|
227
|
+
# pattern helps prevent conflicts between concurrent updates.
|
228
|
+
# @param [String] name
|
229
|
+
# Immutable. The resource name of the `Policy`, which must be unique. Format: `
|
230
|
+
# policies/`attachment-point`/denypolicies/`policy-id`` The attachment point is
|
231
|
+
# identified by its URL-encoded full resource name, which means that the forward-
|
232
|
+
# slash character, `/`, must be written as `%2F`. For example, `policies/
|
233
|
+
# cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-
|
234
|
+
# deny-policy`. For organizations and folders, use the numeric ID in the full
|
235
|
+
# resource name. For projects, requests can use the alphanumeric or the numeric
|
236
|
+
# ID. Responses always contain the numeric ID.
|
237
|
+
# @param [Google::Apis::IamV2beta::GoogleIamV2betaPolicy] google_iam_v2beta_policy_object
|
238
|
+
# @param [String] fields
|
239
|
+
# Selector specifying which fields to include in a partial response.
|
240
|
+
# @param [String] quota_user
|
241
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
242
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
243
|
+
# @param [Google::Apis::RequestOptions] options
|
244
|
+
# Request-specific options
|
245
|
+
#
|
246
|
+
# @yield [result, err] Result & error if block supplied
|
247
|
+
# @yieldparam result [Google::Apis::IamV2beta::GoogleLongrunningOperation] parsed result object
|
248
|
+
# @yieldparam err [StandardError] error object if request failed
|
249
|
+
#
|
250
|
+
# @return [Google::Apis::IamV2beta::GoogleLongrunningOperation]
|
251
|
+
#
|
252
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
253
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
254
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
255
|
+
def update_policy(name, google_iam_v2beta_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
256
|
+
command = make_simple_command(:put, 'v2beta/{+name}', options)
|
257
|
+
command.request_representation = Google::Apis::IamV2beta::GoogleIamV2betaPolicy::Representation
|
258
|
+
command.request_object = google_iam_v2beta_policy_object
|
259
|
+
command.response_representation = Google::Apis::IamV2beta::GoogleLongrunningOperation::Representation
|
260
|
+
command.response_class = Google::Apis::IamV2beta::GoogleLongrunningOperation
|
261
|
+
command.params['name'] = name unless name.nil?
|
262
|
+
command.query['fields'] = fields unless fields.nil?
|
263
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
264
|
+
execute_or_queue_command(command, &block)
|
265
|
+
end
|
266
|
+
|
267
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
268
|
+
# to poll the operation result at intervals as recommended by the API service.
|
269
|
+
# @param [String] name
|
270
|
+
# The name of the operation resource.
|
271
|
+
# @param [String] fields
|
272
|
+
# Selector specifying which fields to include in a partial response.
|
273
|
+
# @param [String] quota_user
|
274
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
275
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
276
|
+
# @param [Google::Apis::RequestOptions] options
|
277
|
+
# Request-specific options
|
278
|
+
#
|
279
|
+
# @yield [result, err] Result & error if block supplied
|
280
|
+
# @yieldparam result [Google::Apis::IamV2beta::GoogleLongrunningOperation] parsed result object
|
281
|
+
# @yieldparam err [StandardError] error object if request failed
|
282
|
+
#
|
283
|
+
# @return [Google::Apis::IamV2beta::GoogleLongrunningOperation]
|
284
|
+
#
|
285
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
286
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
287
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
288
|
+
def get_policy_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
289
|
+
command = make_simple_command(:get, 'v2beta/{+name}', options)
|
290
|
+
command.response_representation = Google::Apis::IamV2beta::GoogleLongrunningOperation::Representation
|
291
|
+
command.response_class = Google::Apis::IamV2beta::GoogleLongrunningOperation
|
292
|
+
command.params['name'] = name unless name.nil?
|
293
|
+
command.query['fields'] = fields unless fields.nil?
|
294
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
295
|
+
execute_or_queue_command(command, &block)
|
296
|
+
end
|
297
|
+
|
298
|
+
protected
|
299
|
+
|
300
|
+
def apply_command_defaults(command)
|
301
|
+
command.query['key'] = key unless key.nil?
|
302
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
307
|
+
end
|
@@ -0,0 +1,38 @@
|
|
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 'google/apis/iam_v2beta/service.rb'
|
16
|
+
require 'google/apis/iam_v2beta/classes.rb'
|
17
|
+
require 'google/apis/iam_v2beta/representations.rb'
|
18
|
+
require 'google/apis/iam_v2beta/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Identity and Access Management (IAM) API
|
23
|
+
#
|
24
|
+
# Manages identity and access control for Google Cloud Platform resources,
|
25
|
+
# including the creation of service accounts, which you can use to authenticate
|
26
|
+
# to Google and make API calls.
|
27
|
+
#
|
28
|
+
# @see https://cloud.google.com/iam/
|
29
|
+
module IamV2beta
|
30
|
+
# Version of the Identity and Access Management (IAM) API this client connects to.
|
31
|
+
# This is NOT the gem version.
|
32
|
+
VERSION = 'V2beta'
|
33
|
+
|
34
|
+
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
35
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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 "google/apis/iam_v2beta"
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-apis-iam_v2beta
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Google LLC
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-04-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-apis-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.4'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.a
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.4'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.a
|
33
|
+
description: This is the simple REST client for Identity and Access Management (IAM)
|
34
|
+
API V2beta. Simple REST clients are Ruby client libraries that provide access to
|
35
|
+
Google services via their HTTP REST API endpoints. These libraries are generated
|
36
|
+
and updated automatically based on the discovery documents published by the service,
|
37
|
+
and they handle most concerns such as authentication, pagination, retry, timeouts,
|
38
|
+
and logging. You can use this client to access the Identity and Access Management
|
39
|
+
(IAM) API, but note that some services may provide a separate modern client that
|
40
|
+
is easier to use.
|
41
|
+
email: googleapis-packages@google.com
|
42
|
+
executables: []
|
43
|
+
extensions: []
|
44
|
+
extra_rdoc_files: []
|
45
|
+
files:
|
46
|
+
- ".yardopts"
|
47
|
+
- CHANGELOG.md
|
48
|
+
- LICENSE.md
|
49
|
+
- OVERVIEW.md
|
50
|
+
- lib/google-apis-iam_v2beta.rb
|
51
|
+
- lib/google/apis/iam_v2beta.rb
|
52
|
+
- lib/google/apis/iam_v2beta/classes.rb
|
53
|
+
- lib/google/apis/iam_v2beta/gem_version.rb
|
54
|
+
- lib/google/apis/iam_v2beta/representations.rb
|
55
|
+
- lib/google/apis/iam_v2beta/service.rb
|
56
|
+
homepage: https://github.com/google/google-api-ruby-client
|
57
|
+
licenses:
|
58
|
+
- Apache-2.0
|
59
|
+
metadata:
|
60
|
+
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
61
|
+
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-iam_v2beta/CHANGELOG.md
|
62
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-iam_v2beta/v0.1.0
|
63
|
+
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-iam_v2beta
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '2.5'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
requirements: []
|
79
|
+
rubygems_version: 3.3.5
|
80
|
+
signing_key:
|
81
|
+
specification_version: 4
|
82
|
+
summary: Simple REST client for Identity and Access Management (IAM) API V2beta
|
83
|
+
test_files: []
|