google-iam-v1beta 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 +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-iam-v1beta.rb +21 -0
- data/lib/google/iam/v1beta.rb +33 -0
- data/lib/google/iam/v1beta/version.rb +26 -0
- data/lib/google/iam/v1beta/workload_identity_pool_pb.rb +141 -0
- data/lib/google/iam/v1beta/workload_identity_pool_services_pb.rb +103 -0
- data/lib/google/iam/v1beta/workload_identity_pools.rb +48 -0
- data/lib/google/iam/v1beta/workload_identity_pools/client.rb +1364 -0
- data/lib/google/iam/v1beta/workload_identity_pools/credentials.rb +49 -0
- data/lib/google/iam/v1beta/workload_identity_pools/operations.rb +568 -0
- data/lib/google/iam/v1beta/workload_identity_pools/paths.rb +71 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/iam/v1beta/workload_identity_pool.rb +463 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +205 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Iam
|
22
|
+
module V1beta
|
23
|
+
module WorkloadIdentityPools
|
24
|
+
# Path helper methods for the WorkloadIdentityPools API.
|
25
|
+
module Paths
|
26
|
+
##
|
27
|
+
# Create a fully-qualified WorkloadIdentityPool resource string.
|
28
|
+
#
|
29
|
+
# The resource will be in the following format:
|
30
|
+
#
|
31
|
+
# `projects/{project}/locations/{location}/workloadIdentityPools/{workload_identity_pool}`
|
32
|
+
#
|
33
|
+
# @param project [String]
|
34
|
+
# @param location [String]
|
35
|
+
# @param workload_identity_pool [String]
|
36
|
+
#
|
37
|
+
# @return [::String]
|
38
|
+
def workload_identity_pool_path project:, location:, workload_identity_pool:
|
39
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
40
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
41
|
+
|
42
|
+
"projects/#{project}/locations/#{location}/workloadIdentityPools/#{workload_identity_pool}"
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Create a fully-qualified WorkloadIdentityPoolProvider resource string.
|
47
|
+
#
|
48
|
+
# The resource will be in the following format:
|
49
|
+
#
|
50
|
+
# `projects/{project}/locations/{location}/workloadIdentityPools/{workload_identity_pool}/providers/{workload_identity_pool_provider}`
|
51
|
+
#
|
52
|
+
# @param project [String]
|
53
|
+
# @param location [String]
|
54
|
+
# @param workload_identity_pool [String]
|
55
|
+
# @param workload_identity_pool_provider [String]
|
56
|
+
#
|
57
|
+
# @return [::String]
|
58
|
+
def workload_identity_pool_provider_path project:, location:, workload_identity_pool:, workload_identity_pool_provider:
|
59
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
60
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
61
|
+
raise ::ArgumentError, "workload_identity_pool cannot contain /" if workload_identity_pool.to_s.include? "/"
|
62
|
+
|
63
|
+
"projects/#{project}/locations/#{location}/workloadIdentityPools/#{workload_identity_pool}/providers/#{workload_identity_pool_provider}"
|
64
|
+
end
|
65
|
+
|
66
|
+
extend self
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,283 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [::String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [::Array<::String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [::String]
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
190
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
194
|
+
# @!attribute [rw] singular
|
195
|
+
# @return [::String]
|
196
|
+
# The same concept of the `singular` field in k8s CRD spec
|
197
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
198
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
204
|
+
class ResourceDescriptor
|
205
|
+
include ::Google::Protobuf::MessageExts
|
206
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
|
+
|
208
|
+
# A description of the historical or future-looking state of the
|
209
|
+
# resource pattern.
|
210
|
+
module History
|
211
|
+
# The "unset" value.
|
212
|
+
HISTORY_UNSPECIFIED = 0
|
213
|
+
|
214
|
+
# The resource originally had one pattern and launched as such, and
|
215
|
+
# additional patterns were added later.
|
216
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
217
|
+
|
218
|
+
# The resource has one pattern, but the API owner expects to add more
|
219
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
220
|
+
# that from being necessary once there are multiple patterns.)
|
221
|
+
FUTURE_MULTI_PATTERN = 2
|
222
|
+
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
# Defines a proto annotation that describes a string field that refers to
|
242
|
+
# an API resource.
|
243
|
+
# @!attribute [rw] type
|
244
|
+
# @return [::String]
|
245
|
+
# The resource type that the annotated field references.
|
246
|
+
#
|
247
|
+
# Example:
|
248
|
+
#
|
249
|
+
# message Subscription {
|
250
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
251
|
+
# type: "pubsub.googleapis.com/Topic"
|
252
|
+
# }];
|
253
|
+
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
265
|
+
# @!attribute [rw] child_type
|
266
|
+
# @return [::String]
|
267
|
+
# The resource type of a child collection that the annotated field
|
268
|
+
# references. This is useful for annotating the `parent` field that
|
269
|
+
# doesn't have a fixed resource type.
|
270
|
+
#
|
271
|
+
# Example:
|
272
|
+
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
278
|
+
class ResourceReference
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
@@ -0,0 +1,463 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Iam
|
22
|
+
module V1beta
|
23
|
+
# Represents a collection of external workload identities. You can define IAM
|
24
|
+
# policies to grant these identities access to Google Cloud resources.
|
25
|
+
# @!attribute [r] name
|
26
|
+
# @return [::String]
|
27
|
+
# Output only. The resource name of the pool.
|
28
|
+
# @!attribute [rw] display_name
|
29
|
+
# @return [::String]
|
30
|
+
# A display name for the pool. Cannot exceed 32 characters.
|
31
|
+
# @!attribute [rw] description
|
32
|
+
# @return [::String]
|
33
|
+
# A description of the pool. Cannot exceed 256 characters.
|
34
|
+
# @!attribute [r] state
|
35
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPool::State]
|
36
|
+
# Output only. The state of the pool.
|
37
|
+
# @!attribute [rw] disabled
|
38
|
+
# @return [::Boolean]
|
39
|
+
# Whether the pool is disabled. You cannot use a disabled pool to exchange
|
40
|
+
# tokens, or use existing tokens to access resources. If
|
41
|
+
# the pool is re-enabled, existing tokens grant access again.
|
42
|
+
class WorkloadIdentityPool
|
43
|
+
include ::Google::Protobuf::MessageExts
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
|
46
|
+
# The current state of the pool.
|
47
|
+
module State
|
48
|
+
# State unspecified.
|
49
|
+
STATE_UNSPECIFIED = 0
|
50
|
+
|
51
|
+
# The pool is active, and may be used in Google Cloud policies.
|
52
|
+
ACTIVE = 1
|
53
|
+
|
54
|
+
# The pool is soft-deleted. Soft-deleted pools are permanently deleted
|
55
|
+
# after approximately 30 days. You can restore a soft-deleted pool using
|
56
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPools::Client#undelete_workload_identity_pool UndeleteWorkloadIdentityPool}.
|
57
|
+
#
|
58
|
+
# You cannot reuse the ID of a soft-deleted pool until it is permanently
|
59
|
+
# deleted.
|
60
|
+
#
|
61
|
+
# While a pool is deleted, you cannot use it to exchange tokens, or use
|
62
|
+
# existing tokens to access resources. If the pool is undeleted, existing
|
63
|
+
# tokens grant access again.
|
64
|
+
DELETED = 2
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# A configuration for an external identity provider.
|
69
|
+
# @!attribute [r] name
|
70
|
+
# @return [::String]
|
71
|
+
# Output only. The resource name of the provider.
|
72
|
+
# @!attribute [rw] display_name
|
73
|
+
# @return [::String]
|
74
|
+
# A display name for the provider. Cannot exceed 32 characters.
|
75
|
+
# @!attribute [rw] description
|
76
|
+
# @return [::String]
|
77
|
+
# A description for the provider. Cannot exceed 256 characters.
|
78
|
+
# @!attribute [r] state
|
79
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider::State]
|
80
|
+
# Output only. The state of the provider.
|
81
|
+
# @!attribute [rw] disabled
|
82
|
+
# @return [::Boolean]
|
83
|
+
# Whether the provider is disabled. You cannot use a disabled provider to
|
84
|
+
# exchange tokens. However, existing tokens still grant access.
|
85
|
+
# @!attribute [rw] attribute_mapping
|
86
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
87
|
+
# Maps attributes from authentication credentials issued by an external
|
88
|
+
# identity provider to Google Cloud attributes, such as `subject` and
|
89
|
+
# `segment`.
|
90
|
+
#
|
91
|
+
# Each key must be a string specifying the Google Cloud IAM attribute to
|
92
|
+
# map to.
|
93
|
+
#
|
94
|
+
# The following keys are supported:
|
95
|
+
#
|
96
|
+
# * `google.subject`: The principal IAM is authenticating. You can reference
|
97
|
+
# this value in IAM bindings. This is also the
|
98
|
+
# subject that appears in Cloud Logging logs.
|
99
|
+
# Cannot exceed 127 characters.
|
100
|
+
#
|
101
|
+
# * `google.groups`: Groups the external identity belongs to. You can grant
|
102
|
+
# groups access to resources using an IAM `principalSet`
|
103
|
+
# binding; access applies to all members of the group.
|
104
|
+
#
|
105
|
+
# You can also provide custom attributes by specifying
|
106
|
+
# `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of
|
107
|
+
# the custom attribute to be mapped. You can define a maximum of 50 custom
|
108
|
+
# attributes. The maximum length of a mapped attribute key is
|
109
|
+
# 100 characters, and the key may only contain the characters [a-z0-9_].
|
110
|
+
#
|
111
|
+
# You can reference these attributes in IAM policies to define fine-grained
|
112
|
+
# access for a workload to Google Cloud resources. For example:
|
113
|
+
#
|
114
|
+
# * `google.subject`:
|
115
|
+
# `principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}`
|
116
|
+
#
|
117
|
+
# * `google.groups`:
|
118
|
+
# `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}`
|
119
|
+
#
|
120
|
+
# * `attribute.{custom_attribute}`:
|
121
|
+
# `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}`
|
122
|
+
#
|
123
|
+
# Each value must be a [Common Expression Language]
|
124
|
+
# (https://opensource.google/projects/cel) function that maps an
|
125
|
+
# identity provider credential to the normalized attribute specified by the
|
126
|
+
# corresponding map key.
|
127
|
+
#
|
128
|
+
# You can use the `assertion` keyword in the expression to access a JSON
|
129
|
+
# representation of the authentication credential issued by the provider.
|
130
|
+
#
|
131
|
+
# The maximum length of an attribute mapping expression is 2048 characters.
|
132
|
+
# When evaluated, the total size of all mapped attributes must not exceed
|
133
|
+
# 8KB.
|
134
|
+
#
|
135
|
+
# For AWS providers, the following rules apply:
|
136
|
+
#
|
137
|
+
# - If no attribute mapping is defined, the following default mapping
|
138
|
+
# applies:
|
139
|
+
#
|
140
|
+
# ```
|
141
|
+
# {
|
142
|
+
# "google.subject":"assertion.arn",
|
143
|
+
# "attribute.aws_role":
|
144
|
+
# "assertion.arn.contains('assumed-role')"
|
145
|
+
# " ? assertion.arn.extract('\\{account_arn}assumed-role/')"
|
146
|
+
# " + 'assumed-role/'"
|
147
|
+
# " + assertion.arn.extract('assumed-role/\\{role_name}/')"
|
148
|
+
# " : assertion.arn",
|
149
|
+
# }
|
150
|
+
# ```
|
151
|
+
#
|
152
|
+
# - If any custom attribute mappings are defined, they must include a mapping
|
153
|
+
# to the `google.subject` attribute.
|
154
|
+
#
|
155
|
+
#
|
156
|
+
# For OIDC providers, the following rules apply:
|
157
|
+
#
|
158
|
+
# - Custom attribute mappings must be defined, and must include a mapping to
|
159
|
+
# the `google.subject` attribute. For example, the following maps the
|
160
|
+
# `sub` claim of the incoming credential to the `subject` attribute on
|
161
|
+
# a Google token.
|
162
|
+
#
|
163
|
+
# ```
|
164
|
+
# \\{"google.subject": "assertion.sub"}
|
165
|
+
# ```
|
166
|
+
# @!attribute [rw] attribute_condition
|
167
|
+
# @return [::String]
|
168
|
+
# [A Common Expression Language](https://opensource.google/projects/cel)
|
169
|
+
# expression, in plain text, to restrict what otherwise valid authentication
|
170
|
+
# credentials issued by the provider should not be accepted.
|
171
|
+
#
|
172
|
+
# The expression must output a boolean representing whether to allow the
|
173
|
+
# federation.
|
174
|
+
#
|
175
|
+
# The following keywords may be referenced in the expressions:
|
176
|
+
#
|
177
|
+
# * `assertion`: JSON representing the authentication credential issued by
|
178
|
+
# the provider.
|
179
|
+
# * `google`: The Google attributes mapped from the assertion in the
|
180
|
+
# `attribute_mappings`.
|
181
|
+
# * `attribute`: The custom attributes mapped from the assertion in the
|
182
|
+
# `attribute_mappings`.
|
183
|
+
#
|
184
|
+
# The maximum length of the attribute condition expression is 4096
|
185
|
+
# characters. If unspecified, all valid authentication credential are
|
186
|
+
# accepted.
|
187
|
+
#
|
188
|
+
# The following example shows how to only allow credentials with a mapped
|
189
|
+
# `google.groups` value of `admins`:
|
190
|
+
#
|
191
|
+
# ```
|
192
|
+
# "'admins' in google.groups"
|
193
|
+
# ```
|
194
|
+
# @!attribute [rw] aws
|
195
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider::Aws]
|
196
|
+
# An Amazon Web Services identity provider.
|
197
|
+
# @!attribute [rw] oidc
|
198
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider::Oidc]
|
199
|
+
# An OpenId Connect 1.0 identity provider.
|
200
|
+
class WorkloadIdentityPoolProvider
|
201
|
+
include ::Google::Protobuf::MessageExts
|
202
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
203
|
+
|
204
|
+
# Represents an Amazon Web Services identity provider.
|
205
|
+
# @!attribute [rw] account_id
|
206
|
+
# @return [::String]
|
207
|
+
# Required. The AWS account ID.
|
208
|
+
class Aws
|
209
|
+
include ::Google::Protobuf::MessageExts
|
210
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
211
|
+
end
|
212
|
+
|
213
|
+
# Represents an OpenId Connect 1.0 identity provider.
|
214
|
+
# @!attribute [rw] issuer_uri
|
215
|
+
# @return [::String]
|
216
|
+
# Required. The OIDC issuer URL.
|
217
|
+
# @!attribute [rw] allowed_audiences
|
218
|
+
# @return [::Array<::String>]
|
219
|
+
# Acceptable values for the `aud` field (audience) in the OIDC token. Token
|
220
|
+
# exchange requests are rejected if the token audience does not match one
|
221
|
+
# of the configured values. Each audience may be at most 256 characters. A
|
222
|
+
# maximum of 10 audiences may be configured.
|
223
|
+
#
|
224
|
+
# If this list is empty, the OIDC token audience must be equal to
|
225
|
+
# the full canonical resource name of the WorkloadIdentityPoolProvider,
|
226
|
+
# with or without the HTTPS prefix. For example:
|
227
|
+
#
|
228
|
+
# ```
|
229
|
+
# //iam.googleapis.com/projects/<project-number>/locations/<location>/workloadIdentityPools/<pool-id>/providers/<provider-id>
|
230
|
+
# https://iam.googleapis.com/projects/<project-number>/locations/<location>/workloadIdentityPools/<pool-id>/providers/<provider-id>
|
231
|
+
# ```
|
232
|
+
class Oidc
|
233
|
+
include ::Google::Protobuf::MessageExts
|
234
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
235
|
+
end
|
236
|
+
|
237
|
+
# @!attribute [rw] key
|
238
|
+
# @return [::String]
|
239
|
+
# @!attribute [rw] value
|
240
|
+
# @return [::String]
|
241
|
+
class AttributeMappingEntry
|
242
|
+
include ::Google::Protobuf::MessageExts
|
243
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
244
|
+
end
|
245
|
+
|
246
|
+
# The current state of the provider.
|
247
|
+
module State
|
248
|
+
# State unspecified.
|
249
|
+
STATE_UNSPECIFIED = 0
|
250
|
+
|
251
|
+
# The provider is active, and may be used to validate authentication
|
252
|
+
# credentials.
|
253
|
+
ACTIVE = 1
|
254
|
+
|
255
|
+
# The provider is soft-deleted. Soft-deleted providers are permanently
|
256
|
+
# deleted after approximately 30 days. You can restore a soft-deleted
|
257
|
+
# provider using
|
258
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPools::Client#undelete_workload_identity_pool_provider UndeleteWorkloadIdentityPoolProvider}.
|
259
|
+
#
|
260
|
+
# You cannot reuse the ID of a soft-deleted provider until it is
|
261
|
+
# permanently deleted.
|
262
|
+
DELETED = 2
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
# Request message for ListWorkloadIdentityPools.
|
267
|
+
# @!attribute [rw] parent
|
268
|
+
# @return [::String]
|
269
|
+
# Required. The parent resource to list pools for.
|
270
|
+
# @!attribute [rw] page_size
|
271
|
+
# @return [::Integer]
|
272
|
+
# The maximum number of pools to return.
|
273
|
+
# If unspecified, at most 50 pools are returned.
|
274
|
+
# The maximum value is 1000; values above are 1000 truncated to 1000.
|
275
|
+
# @!attribute [rw] page_token
|
276
|
+
# @return [::String]
|
277
|
+
# A page token, received from a previous `ListWorkloadIdentityPools`
|
278
|
+
# call. Provide this to retrieve the subsequent page.
|
279
|
+
# @!attribute [rw] show_deleted
|
280
|
+
# @return [::Boolean]
|
281
|
+
# Whether to return soft-deleted pools.
|
282
|
+
class ListWorkloadIdentityPoolsRequest
|
283
|
+
include ::Google::Protobuf::MessageExts
|
284
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
285
|
+
end
|
286
|
+
|
287
|
+
# Response message for ListWorkloadIdentityPools.
|
288
|
+
# @!attribute [rw] workload_identity_pools
|
289
|
+
# @return [::Array<::Google::Iam::V1beta::WorkloadIdentityPool>]
|
290
|
+
# A list of pools.
|
291
|
+
# @!attribute [rw] next_page_token
|
292
|
+
# @return [::String]
|
293
|
+
# A token, which can be sent as `page_token` to retrieve the next page.
|
294
|
+
# If this field is omitted, there are no subsequent pages.
|
295
|
+
class ListWorkloadIdentityPoolsResponse
|
296
|
+
include ::Google::Protobuf::MessageExts
|
297
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
298
|
+
end
|
299
|
+
|
300
|
+
# Request message for GetWorkloadIdentityPool.
|
301
|
+
# @!attribute [rw] name
|
302
|
+
# @return [::String]
|
303
|
+
# Required. The name of the pool to retrieve.
|
304
|
+
class GetWorkloadIdentityPoolRequest
|
305
|
+
include ::Google::Protobuf::MessageExts
|
306
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
307
|
+
end
|
308
|
+
|
309
|
+
# Request message for CreateWorkloadIdentityPool.
|
310
|
+
# @!attribute [rw] parent
|
311
|
+
# @return [::String]
|
312
|
+
# Required. The parent resource to create the pool in. The only supported
|
313
|
+
# location is `global`.
|
314
|
+
# @!attribute [rw] workload_identity_pool
|
315
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPool]
|
316
|
+
# Required. The pool to create.
|
317
|
+
# @!attribute [rw] workload_identity_pool_id
|
318
|
+
# @return [::String]
|
319
|
+
# Required. The ID to use for the pool, which becomes the
|
320
|
+
# final component of the resource name. This value should be 4-32 characters,
|
321
|
+
# and may contain the characters [a-z0-9-]. The prefix `gcp-` is
|
322
|
+
# reserved for use by Google, and may not be specified.
|
323
|
+
class CreateWorkloadIdentityPoolRequest
|
324
|
+
include ::Google::Protobuf::MessageExts
|
325
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
326
|
+
end
|
327
|
+
|
328
|
+
# Request message for UpdateWorkloadIdentityPool.
|
329
|
+
# @!attribute [rw] workload_identity_pool
|
330
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPool]
|
331
|
+
# Required. The pool to update. The `name` field is used to identify the pool.
|
332
|
+
# @!attribute [rw] update_mask
|
333
|
+
# @return [::Google::Protobuf::FieldMask]
|
334
|
+
# Required. The list of fields update.
|
335
|
+
class UpdateWorkloadIdentityPoolRequest
|
336
|
+
include ::Google::Protobuf::MessageExts
|
337
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
338
|
+
end
|
339
|
+
|
340
|
+
# Request message for DeleteWorkloadIdentityPool.
|
341
|
+
# @!attribute [rw] name
|
342
|
+
# @return [::String]
|
343
|
+
# Required. The name of the pool to delete.
|
344
|
+
class DeleteWorkloadIdentityPoolRequest
|
345
|
+
include ::Google::Protobuf::MessageExts
|
346
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
347
|
+
end
|
348
|
+
|
349
|
+
# Request message for UndeleteWorkloadIdentityPool.
|
350
|
+
# @!attribute [rw] name
|
351
|
+
# @return [::String]
|
352
|
+
# Required. The name of the pool to undelete.
|
353
|
+
class UndeleteWorkloadIdentityPoolRequest
|
354
|
+
include ::Google::Protobuf::MessageExts
|
355
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
356
|
+
end
|
357
|
+
|
358
|
+
# Request message for ListWorkloadIdentityPoolProviders.
|
359
|
+
# @!attribute [rw] parent
|
360
|
+
# @return [::String]
|
361
|
+
# Required. The pool to list providers for.
|
362
|
+
# @!attribute [rw] page_size
|
363
|
+
# @return [::Integer]
|
364
|
+
# The maximum number of providers to return.
|
365
|
+
# If unspecified, at most 50 providers are returned.
|
366
|
+
# The maximum value is 100; values above 100 are truncated to 100.
|
367
|
+
# @!attribute [rw] page_token
|
368
|
+
# @return [::String]
|
369
|
+
# A page token, received from a previous
|
370
|
+
# `ListWorkloadIdentityPoolProviders` call. Provide this to retrieve the
|
371
|
+
# subsequent page.
|
372
|
+
# @!attribute [rw] show_deleted
|
373
|
+
# @return [::Boolean]
|
374
|
+
# Whether to return soft-deleted providers.
|
375
|
+
class ListWorkloadIdentityPoolProvidersRequest
|
376
|
+
include ::Google::Protobuf::MessageExts
|
377
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
378
|
+
end
|
379
|
+
|
380
|
+
# Response message for ListWorkloadIdentityPoolProviders.
|
381
|
+
# @!attribute [rw] workload_identity_pool_providers
|
382
|
+
# @return [::Array<::Google::Iam::V1beta::WorkloadIdentityPoolProvider>]
|
383
|
+
# A list of providers.
|
384
|
+
# @!attribute [rw] next_page_token
|
385
|
+
# @return [::String]
|
386
|
+
# A token, which can be sent as `page_token` to retrieve the next page.
|
387
|
+
# If this field is omitted, there are no subsequent pages.
|
388
|
+
class ListWorkloadIdentityPoolProvidersResponse
|
389
|
+
include ::Google::Protobuf::MessageExts
|
390
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
391
|
+
end
|
392
|
+
|
393
|
+
# Request message for GetWorkloadIdentityPoolProvider.
|
394
|
+
# @!attribute [rw] name
|
395
|
+
# @return [::String]
|
396
|
+
# Required. The name of the provider to retrieve.
|
397
|
+
class GetWorkloadIdentityPoolProviderRequest
|
398
|
+
include ::Google::Protobuf::MessageExts
|
399
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
400
|
+
end
|
401
|
+
|
402
|
+
# Request message for CreateWorkloadIdentityPoolProvider.
|
403
|
+
# @!attribute [rw] parent
|
404
|
+
# @return [::String]
|
405
|
+
# Required. The pool to create this provider in.
|
406
|
+
# @!attribute [rw] workload_identity_pool_provider
|
407
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider]
|
408
|
+
# Required. The provider to create.
|
409
|
+
# @!attribute [rw] workload_identity_pool_provider_id
|
410
|
+
# @return [::String]
|
411
|
+
# Required. The ID for the provider, which becomes the
|
412
|
+
# final component of the resource name. This value must be 4-32 characters,
|
413
|
+
# and may contain the characters [a-z0-9-]. The prefix `gcp-` is
|
414
|
+
# reserved for use by Google, and may not be specified.
|
415
|
+
class CreateWorkloadIdentityPoolProviderRequest
|
416
|
+
include ::Google::Protobuf::MessageExts
|
417
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
418
|
+
end
|
419
|
+
|
420
|
+
# Request message for UpdateWorkloadIdentityPoolProvider.
|
421
|
+
# @!attribute [rw] workload_identity_pool_provider
|
422
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider]
|
423
|
+
# Required. The provider to update.
|
424
|
+
# @!attribute [rw] update_mask
|
425
|
+
# @return [::Google::Protobuf::FieldMask]
|
426
|
+
# Required. The list of fields to update.
|
427
|
+
class UpdateWorkloadIdentityPoolProviderRequest
|
428
|
+
include ::Google::Protobuf::MessageExts
|
429
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
430
|
+
end
|
431
|
+
|
432
|
+
# Request message for DeleteWorkloadIdentityPoolProvider.
|
433
|
+
# @!attribute [rw] name
|
434
|
+
# @return [::String]
|
435
|
+
# Required. The name of the provider to delete.
|
436
|
+
class DeleteWorkloadIdentityPoolProviderRequest
|
437
|
+
include ::Google::Protobuf::MessageExts
|
438
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
439
|
+
end
|
440
|
+
|
441
|
+
# Request message for UndeleteWorkloadIdentityPoolProvider.
|
442
|
+
# @!attribute [rw] name
|
443
|
+
# @return [::String]
|
444
|
+
# Required. The name of the provider to undelete.
|
445
|
+
class UndeleteWorkloadIdentityPoolProviderRequest
|
446
|
+
include ::Google::Protobuf::MessageExts
|
447
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
448
|
+
end
|
449
|
+
|
450
|
+
# Metadata for long-running WorkloadIdentityPool operations.
|
451
|
+
class WorkloadIdentityPoolOperationMetadata
|
452
|
+
include ::Google::Protobuf::MessageExts
|
453
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
454
|
+
end
|
455
|
+
|
456
|
+
# Metadata for long-running WorkloadIdentityPoolProvider operations.
|
457
|
+
class WorkloadIdentityPoolProviderOperationMetadata
|
458
|
+
include ::Google::Protobuf::MessageExts
|
459
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
460
|
+
end
|
461
|
+
end
|
462
|
+
end
|
463
|
+
end
|