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,21 @@
|
|
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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/iam/v1beta"
|
@@ -0,0 +1,33 @@
|
|
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
|
+
require "google/iam/v1beta/workload_identity_pools"
|
20
|
+
require "google/iam/v1beta/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Iam
|
24
|
+
##
|
25
|
+
# To load this package, including all its services, and instantiate a client:
|
26
|
+
#
|
27
|
+
# require "google/iam/v1beta"
|
28
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new
|
29
|
+
#
|
30
|
+
module V1beta
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,26 @@
|
|
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
|
+
VERSION = "0.1.0"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/iam/v1beta/workload_identity_pool.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/longrunning/operations_pb'
|
11
|
+
require 'google/protobuf/field_mask_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/iam/v1beta/workload_identity_pool.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.iam.v1beta.WorkloadIdentityPool" do
|
15
|
+
optional :name, :string, 1
|
16
|
+
optional :display_name, :string, 2
|
17
|
+
optional :description, :string, 3
|
18
|
+
optional :state, :enum, 4, "google.iam.v1beta.WorkloadIdentityPool.State"
|
19
|
+
optional :disabled, :bool, 5
|
20
|
+
end
|
21
|
+
add_enum "google.iam.v1beta.WorkloadIdentityPool.State" do
|
22
|
+
value :STATE_UNSPECIFIED, 0
|
23
|
+
value :ACTIVE, 1
|
24
|
+
value :DELETED, 2
|
25
|
+
end
|
26
|
+
add_message "google.iam.v1beta.WorkloadIdentityPoolProvider" do
|
27
|
+
optional :name, :string, 1
|
28
|
+
optional :display_name, :string, 2
|
29
|
+
optional :description, :string, 3
|
30
|
+
optional :state, :enum, 4, "google.iam.v1beta.WorkloadIdentityPoolProvider.State"
|
31
|
+
optional :disabled, :bool, 5
|
32
|
+
map :attribute_mapping, :string, :string, 6
|
33
|
+
optional :attribute_condition, :string, 7
|
34
|
+
oneof :provider_config do
|
35
|
+
optional :aws, :message, 8, "google.iam.v1beta.WorkloadIdentityPoolProvider.Aws"
|
36
|
+
optional :oidc, :message, 9, "google.iam.v1beta.WorkloadIdentityPoolProvider.Oidc"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
add_message "google.iam.v1beta.WorkloadIdentityPoolProvider.Aws" do
|
40
|
+
optional :account_id, :string, 1
|
41
|
+
end
|
42
|
+
add_message "google.iam.v1beta.WorkloadIdentityPoolProvider.Oidc" do
|
43
|
+
optional :issuer_uri, :string, 1
|
44
|
+
repeated :allowed_audiences, :string, 2
|
45
|
+
end
|
46
|
+
add_enum "google.iam.v1beta.WorkloadIdentityPoolProvider.State" do
|
47
|
+
value :STATE_UNSPECIFIED, 0
|
48
|
+
value :ACTIVE, 1
|
49
|
+
value :DELETED, 2
|
50
|
+
end
|
51
|
+
add_message "google.iam.v1beta.ListWorkloadIdentityPoolsRequest" do
|
52
|
+
optional :parent, :string, 1
|
53
|
+
optional :page_size, :int32, 2
|
54
|
+
optional :page_token, :string, 3
|
55
|
+
optional :show_deleted, :bool, 4
|
56
|
+
end
|
57
|
+
add_message "google.iam.v1beta.ListWorkloadIdentityPoolsResponse" do
|
58
|
+
repeated :workload_identity_pools, :message, 1, "google.iam.v1beta.WorkloadIdentityPool"
|
59
|
+
optional :next_page_token, :string, 2
|
60
|
+
end
|
61
|
+
add_message "google.iam.v1beta.GetWorkloadIdentityPoolRequest" do
|
62
|
+
optional :name, :string, 1
|
63
|
+
end
|
64
|
+
add_message "google.iam.v1beta.CreateWorkloadIdentityPoolRequest" do
|
65
|
+
optional :parent, :string, 1
|
66
|
+
optional :workload_identity_pool, :message, 2, "google.iam.v1beta.WorkloadIdentityPool"
|
67
|
+
optional :workload_identity_pool_id, :string, 3
|
68
|
+
end
|
69
|
+
add_message "google.iam.v1beta.UpdateWorkloadIdentityPoolRequest" do
|
70
|
+
optional :workload_identity_pool, :message, 1, "google.iam.v1beta.WorkloadIdentityPool"
|
71
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
72
|
+
end
|
73
|
+
add_message "google.iam.v1beta.DeleteWorkloadIdentityPoolRequest" do
|
74
|
+
optional :name, :string, 1
|
75
|
+
end
|
76
|
+
add_message "google.iam.v1beta.UndeleteWorkloadIdentityPoolRequest" do
|
77
|
+
optional :name, :string, 1
|
78
|
+
end
|
79
|
+
add_message "google.iam.v1beta.ListWorkloadIdentityPoolProvidersRequest" do
|
80
|
+
optional :parent, :string, 1
|
81
|
+
optional :page_size, :int32, 2
|
82
|
+
optional :page_token, :string, 3
|
83
|
+
optional :show_deleted, :bool, 4
|
84
|
+
end
|
85
|
+
add_message "google.iam.v1beta.ListWorkloadIdentityPoolProvidersResponse" do
|
86
|
+
repeated :workload_identity_pool_providers, :message, 1, "google.iam.v1beta.WorkloadIdentityPoolProvider"
|
87
|
+
optional :next_page_token, :string, 2
|
88
|
+
end
|
89
|
+
add_message "google.iam.v1beta.GetWorkloadIdentityPoolProviderRequest" do
|
90
|
+
optional :name, :string, 1
|
91
|
+
end
|
92
|
+
add_message "google.iam.v1beta.CreateWorkloadIdentityPoolProviderRequest" do
|
93
|
+
optional :parent, :string, 1
|
94
|
+
optional :workload_identity_pool_provider, :message, 2, "google.iam.v1beta.WorkloadIdentityPoolProvider"
|
95
|
+
optional :workload_identity_pool_provider_id, :string, 3
|
96
|
+
end
|
97
|
+
add_message "google.iam.v1beta.UpdateWorkloadIdentityPoolProviderRequest" do
|
98
|
+
optional :workload_identity_pool_provider, :message, 1, "google.iam.v1beta.WorkloadIdentityPoolProvider"
|
99
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
100
|
+
end
|
101
|
+
add_message "google.iam.v1beta.DeleteWorkloadIdentityPoolProviderRequest" do
|
102
|
+
optional :name, :string, 1
|
103
|
+
end
|
104
|
+
add_message "google.iam.v1beta.UndeleteWorkloadIdentityPoolProviderRequest" do
|
105
|
+
optional :name, :string, 1
|
106
|
+
end
|
107
|
+
add_message "google.iam.v1beta.WorkloadIdentityPoolOperationMetadata" do
|
108
|
+
end
|
109
|
+
add_message "google.iam.v1beta.WorkloadIdentityPoolProviderOperationMetadata" do
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
module Google
|
115
|
+
module Iam
|
116
|
+
module V1beta
|
117
|
+
WorkloadIdentityPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPool").msgclass
|
118
|
+
WorkloadIdentityPool::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPool.State").enummodule
|
119
|
+
WorkloadIdentityPoolProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPoolProvider").msgclass
|
120
|
+
WorkloadIdentityPoolProvider::Aws = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPoolProvider.Aws").msgclass
|
121
|
+
WorkloadIdentityPoolProvider::Oidc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPoolProvider.Oidc").msgclass
|
122
|
+
WorkloadIdentityPoolProvider::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPoolProvider.State").enummodule
|
123
|
+
ListWorkloadIdentityPoolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.ListWorkloadIdentityPoolsRequest").msgclass
|
124
|
+
ListWorkloadIdentityPoolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.ListWorkloadIdentityPoolsResponse").msgclass
|
125
|
+
GetWorkloadIdentityPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.GetWorkloadIdentityPoolRequest").msgclass
|
126
|
+
CreateWorkloadIdentityPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.CreateWorkloadIdentityPoolRequest").msgclass
|
127
|
+
UpdateWorkloadIdentityPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.UpdateWorkloadIdentityPoolRequest").msgclass
|
128
|
+
DeleteWorkloadIdentityPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.DeleteWorkloadIdentityPoolRequest").msgclass
|
129
|
+
UndeleteWorkloadIdentityPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.UndeleteWorkloadIdentityPoolRequest").msgclass
|
130
|
+
ListWorkloadIdentityPoolProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.ListWorkloadIdentityPoolProvidersRequest").msgclass
|
131
|
+
ListWorkloadIdentityPoolProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.ListWorkloadIdentityPoolProvidersResponse").msgclass
|
132
|
+
GetWorkloadIdentityPoolProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.GetWorkloadIdentityPoolProviderRequest").msgclass
|
133
|
+
CreateWorkloadIdentityPoolProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.CreateWorkloadIdentityPoolProviderRequest").msgclass
|
134
|
+
UpdateWorkloadIdentityPoolProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.UpdateWorkloadIdentityPoolProviderRequest").msgclass
|
135
|
+
DeleteWorkloadIdentityPoolProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.DeleteWorkloadIdentityPoolProviderRequest").msgclass
|
136
|
+
UndeleteWorkloadIdentityPoolProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.UndeleteWorkloadIdentityPoolProviderRequest").msgclass
|
137
|
+
WorkloadIdentityPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPoolOperationMetadata").msgclass
|
138
|
+
WorkloadIdentityPoolProviderOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1beta.WorkloadIdentityPoolProviderOperationMetadata").msgclass
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/iam/v1beta/workload_identity_pool.proto for package 'google.iam.v1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/iam/v1beta/workload_identity_pool_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Iam
|
24
|
+
module V1beta
|
25
|
+
module WorkloadIdentityPools
|
26
|
+
# Manages WorkloadIdentityPools.
|
27
|
+
class Service
|
28
|
+
|
29
|
+
include GRPC::GenericService
|
30
|
+
|
31
|
+
self.marshal_class_method = :encode
|
32
|
+
self.unmarshal_class_method = :decode
|
33
|
+
self.service_name = 'google.iam.v1beta.WorkloadIdentityPools'
|
34
|
+
|
35
|
+
# Lists all non-deleted
|
36
|
+
# [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool]s in a
|
37
|
+
# project. If `show_deleted` is set to `true`, then deleted pools are also
|
38
|
+
# listed.
|
39
|
+
rpc :ListWorkloadIdentityPools, ::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest, ::Google::Iam::V1beta::ListWorkloadIdentityPoolsResponse
|
40
|
+
# Gets an individual
|
41
|
+
# [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool].
|
42
|
+
rpc :GetWorkloadIdentityPool, ::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest, ::Google::Iam::V1beta::WorkloadIdentityPool
|
43
|
+
# Creates a new
|
44
|
+
# [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool].
|
45
|
+
#
|
46
|
+
# You cannot reuse the name of a deleted pool until 30 days after deletion.
|
47
|
+
rpc :CreateWorkloadIdentityPool, ::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest, ::Google::Longrunning::Operation
|
48
|
+
# Updates an existing
|
49
|
+
# [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool].
|
50
|
+
rpc :UpdateWorkloadIdentityPool, ::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest, ::Google::Longrunning::Operation
|
51
|
+
# Deletes a
|
52
|
+
# [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool].
|
53
|
+
#
|
54
|
+
# You cannot use a deleted pool to exchange external
|
55
|
+
# credentials for Google Cloud credentials. However, deletion does
|
56
|
+
# not revoke credentials that have already been issued.
|
57
|
+
# Credentials issued for a deleted pool do not grant access to resources.
|
58
|
+
# If the pool is undeleted, and the credentials are not expired, they
|
59
|
+
# grant access again.
|
60
|
+
# You can undelete a pool for 30 days. After 30 days, deletion is
|
61
|
+
# permanent.
|
62
|
+
# You cannot update deleted pools. However, you can view and list them.
|
63
|
+
rpc :DeleteWorkloadIdentityPool, ::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest, ::Google::Longrunning::Operation
|
64
|
+
# Undeletes a [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool],
|
65
|
+
# as long as it was deleted fewer than 30 days ago.
|
66
|
+
rpc :UndeleteWorkloadIdentityPool, ::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest, ::Google::Longrunning::Operation
|
67
|
+
# Lists all non-deleted
|
68
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityPoolProvider]s
|
69
|
+
# in a [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool].
|
70
|
+
# If `show_deleted` is set to `true`, then deleted providers are also listed.
|
71
|
+
rpc :ListWorkloadIdentityPoolProviders, ::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest, ::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersResponse
|
72
|
+
# Gets an individual
|
73
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityPoolProvider].
|
74
|
+
rpc :GetWorkloadIdentityPoolProvider, ::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest, ::Google::Iam::V1beta::WorkloadIdentityPoolProvider
|
75
|
+
# Creates a new
|
76
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider]
|
77
|
+
# in a [WorkloadIdentityPool][google.iam.v1beta.WorkloadIdentityPool].
|
78
|
+
#
|
79
|
+
# You cannot reuse the name of a deleted provider until 30 days after
|
80
|
+
# deletion.
|
81
|
+
rpc :CreateWorkloadIdentityPoolProvider, ::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest, ::Google::Longrunning::Operation
|
82
|
+
# Updates an existing
|
83
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider].
|
84
|
+
rpc :UpdateWorkloadIdentityPoolProvider, ::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest, ::Google::Longrunning::Operation
|
85
|
+
# Deletes a
|
86
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider].
|
87
|
+
# Deleting a provider does not revoke credentials that have already been
|
88
|
+
# issued; they continue to grant access.
|
89
|
+
# You can undelete a provider for 30 days. After 30 days, deletion is
|
90
|
+
# permanent.
|
91
|
+
# You cannot update deleted providers. However, you can view and list them.
|
92
|
+
rpc :DeleteWorkloadIdentityPoolProvider, ::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest, ::Google::Longrunning::Operation
|
93
|
+
# Undeletes a
|
94
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider],
|
95
|
+
# as long as it was deleted fewer than 30 days ago.
|
96
|
+
rpc :UndeleteWorkloadIdentityPoolProvider, ::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest, ::Google::Longrunning::Operation
|
97
|
+
end
|
98
|
+
|
99
|
+
Stub = Service.rpc_stub_class
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,48 @@
|
|
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
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/iam/v1beta/version"
|
24
|
+
|
25
|
+
require "google/iam/v1beta/workload_identity_pools/credentials"
|
26
|
+
require "google/iam/v1beta/workload_identity_pools/paths"
|
27
|
+
require "google/iam/v1beta/workload_identity_pools/operations"
|
28
|
+
require "google/iam/v1beta/workload_identity_pools/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Iam
|
32
|
+
module V1beta
|
33
|
+
##
|
34
|
+
# Manages WorkloadIdentityPools.
|
35
|
+
#
|
36
|
+
# To load this service and instantiate a client:
|
37
|
+
#
|
38
|
+
# require "google/iam/v1beta/workload_identity_pools"
|
39
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new
|
40
|
+
#
|
41
|
+
module WorkloadIdentityPools
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
helper_path = ::File.join __dir__, "workload_identity_pools", "helpers.rb"
|
48
|
+
require "google/iam/v1beta/workload_identity_pools/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,1364 @@
|
|
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
|
+
require "google/cloud/errors"
|
20
|
+
require "google/iam/v1beta/workload_identity_pool_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Iam
|
24
|
+
module V1beta
|
25
|
+
module WorkloadIdentityPools
|
26
|
+
##
|
27
|
+
# Client for the WorkloadIdentityPools service.
|
28
|
+
#
|
29
|
+
# Manages WorkloadIdentityPools.
|
30
|
+
#
|
31
|
+
class Client
|
32
|
+
include Paths
|
33
|
+
|
34
|
+
# @private
|
35
|
+
attr_reader :workload_identity_pools_stub
|
36
|
+
|
37
|
+
##
|
38
|
+
# Configure the WorkloadIdentityPools Client class.
|
39
|
+
#
|
40
|
+
# See {::Google::Iam::V1beta::WorkloadIdentityPools::Client::Configuration}
|
41
|
+
# for a description of the configuration fields.
|
42
|
+
#
|
43
|
+
# ## Example
|
44
|
+
#
|
45
|
+
# To modify the configuration for all WorkloadIdentityPools clients:
|
46
|
+
#
|
47
|
+
# ::Google::Iam::V1beta::WorkloadIdentityPools::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
50
|
+
#
|
51
|
+
# @yield [config] Configure the Client client.
|
52
|
+
# @yieldparam config [Client::Configuration]
|
53
|
+
#
|
54
|
+
# @return [Client::Configuration]
|
55
|
+
#
|
56
|
+
def self.configure
|
57
|
+
@configure ||= begin
|
58
|
+
namespace = ["Google", "Iam", "V1beta"]
|
59
|
+
parent_config = while namespace.any?
|
60
|
+
parent_name = namespace.join "::"
|
61
|
+
parent_const = const_get parent_name
|
62
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
63
|
+
namespace.pop
|
64
|
+
end
|
65
|
+
default_config = Client::Configuration.new parent_config
|
66
|
+
|
67
|
+
default_config.rpcs.list_workload_identity_pools.timeout = 60.0
|
68
|
+
default_config.rpcs.list_workload_identity_pools.retry_policy = {
|
69
|
+
initial_delay: 1.0,
|
70
|
+
max_delay: 10.0,
|
71
|
+
multiplier: 1.3,
|
72
|
+
retry_codes: [14, 4]
|
73
|
+
}
|
74
|
+
|
75
|
+
default_config.rpcs.get_workload_identity_pool.timeout = 60.0
|
76
|
+
default_config.rpcs.get_workload_identity_pool.retry_policy = {
|
77
|
+
initial_delay: 1.0,
|
78
|
+
max_delay: 10.0,
|
79
|
+
multiplier: 1.3,
|
80
|
+
retry_codes: [14, 4]
|
81
|
+
}
|
82
|
+
|
83
|
+
default_config.rpcs.create_workload_identity_pool.timeout = 60.0
|
84
|
+
default_config.rpcs.create_workload_identity_pool.retry_policy = {
|
85
|
+
initial_delay: 1.0,
|
86
|
+
max_delay: 10.0,
|
87
|
+
multiplier: 1.3,
|
88
|
+
retry_codes: [14, 4]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.update_workload_identity_pool.timeout = 60.0
|
92
|
+
default_config.rpcs.update_workload_identity_pool.retry_policy = {
|
93
|
+
initial_delay: 1.0,
|
94
|
+
max_delay: 10.0,
|
95
|
+
multiplier: 1.3,
|
96
|
+
retry_codes: [14, 4]
|
97
|
+
}
|
98
|
+
|
99
|
+
default_config.rpcs.delete_workload_identity_pool.timeout = 60.0
|
100
|
+
default_config.rpcs.delete_workload_identity_pool.retry_policy = {
|
101
|
+
initial_delay: 1.0,
|
102
|
+
max_delay: 10.0,
|
103
|
+
multiplier: 1.3,
|
104
|
+
retry_codes: [14, 4]
|
105
|
+
}
|
106
|
+
|
107
|
+
default_config.rpcs.undelete_workload_identity_pool.timeout = 60.0
|
108
|
+
default_config.rpcs.undelete_workload_identity_pool.retry_policy = {
|
109
|
+
initial_delay: 1.0,
|
110
|
+
max_delay: 10.0,
|
111
|
+
multiplier: 1.3,
|
112
|
+
retry_codes: [14, 4]
|
113
|
+
}
|
114
|
+
|
115
|
+
default_config.rpcs.list_workload_identity_pool_providers.timeout = 60.0
|
116
|
+
default_config.rpcs.list_workload_identity_pool_providers.retry_policy = {
|
117
|
+
initial_delay: 1.0,
|
118
|
+
max_delay: 10.0,
|
119
|
+
multiplier: 1.3,
|
120
|
+
retry_codes: [14, 4]
|
121
|
+
}
|
122
|
+
|
123
|
+
default_config.rpcs.get_workload_identity_pool_provider.timeout = 60.0
|
124
|
+
default_config.rpcs.get_workload_identity_pool_provider.retry_policy = {
|
125
|
+
initial_delay: 1.0,
|
126
|
+
max_delay: 10.0,
|
127
|
+
multiplier: 1.3,
|
128
|
+
retry_codes: [14, 4]
|
129
|
+
}
|
130
|
+
|
131
|
+
default_config.rpcs.create_workload_identity_pool_provider.timeout = 60.0
|
132
|
+
default_config.rpcs.create_workload_identity_pool_provider.retry_policy = {
|
133
|
+
initial_delay: 1.0,
|
134
|
+
max_delay: 10.0,
|
135
|
+
multiplier: 1.3,
|
136
|
+
retry_codes: [14, 4]
|
137
|
+
}
|
138
|
+
|
139
|
+
default_config.rpcs.update_workload_identity_pool_provider.timeout = 60.0
|
140
|
+
default_config.rpcs.update_workload_identity_pool_provider.retry_policy = {
|
141
|
+
initial_delay: 1.0,
|
142
|
+
max_delay: 10.0,
|
143
|
+
multiplier: 1.3,
|
144
|
+
retry_codes: [14, 4]
|
145
|
+
}
|
146
|
+
|
147
|
+
default_config.rpcs.delete_workload_identity_pool_provider.timeout = 60.0
|
148
|
+
default_config.rpcs.delete_workload_identity_pool_provider.retry_policy = {
|
149
|
+
initial_delay: 1.0,
|
150
|
+
max_delay: 10.0,
|
151
|
+
multiplier: 1.3,
|
152
|
+
retry_codes: [14, 4]
|
153
|
+
}
|
154
|
+
|
155
|
+
default_config.rpcs.undelete_workload_identity_pool_provider.timeout = 60.0
|
156
|
+
default_config.rpcs.undelete_workload_identity_pool_provider.retry_policy = {
|
157
|
+
initial_delay: 1.0,
|
158
|
+
max_delay: 10.0,
|
159
|
+
multiplier: 1.3,
|
160
|
+
retry_codes: [14, 4]
|
161
|
+
}
|
162
|
+
|
163
|
+
default_config
|
164
|
+
end
|
165
|
+
yield @configure if block_given?
|
166
|
+
@configure
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Configure the WorkloadIdentityPools Client instance.
|
171
|
+
#
|
172
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
173
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
174
|
+
# should be made on {Client.configure}.
|
175
|
+
#
|
176
|
+
# See {::Google::Iam::V1beta::WorkloadIdentityPools::Client::Configuration}
|
177
|
+
# for a description of the configuration fields.
|
178
|
+
#
|
179
|
+
# @yield [config] Configure the Client client.
|
180
|
+
# @yieldparam config [Client::Configuration]
|
181
|
+
#
|
182
|
+
# @return [Client::Configuration]
|
183
|
+
#
|
184
|
+
def configure
|
185
|
+
yield @config if block_given?
|
186
|
+
@config
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# Create a new WorkloadIdentityPools client object.
|
191
|
+
#
|
192
|
+
# ## Examples
|
193
|
+
#
|
194
|
+
# To create a new WorkloadIdentityPools client with the default
|
195
|
+
# configuration:
|
196
|
+
#
|
197
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new
|
198
|
+
#
|
199
|
+
# To create a new WorkloadIdentityPools client with a custom
|
200
|
+
# configuration:
|
201
|
+
#
|
202
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
|
203
|
+
# config.timeout = 10.0
|
204
|
+
# end
|
205
|
+
#
|
206
|
+
# @yield [config] Configure the WorkloadIdentityPools client.
|
207
|
+
# @yieldparam config [Client::Configuration]
|
208
|
+
#
|
209
|
+
def initialize
|
210
|
+
# These require statements are intentionally placed here to initialize
|
211
|
+
# the gRPC module only when it's required.
|
212
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
213
|
+
require "gapic/grpc"
|
214
|
+
require "google/iam/v1beta/workload_identity_pool_services_pb"
|
215
|
+
|
216
|
+
# Create the configuration object
|
217
|
+
@config = Configuration.new Client.configure
|
218
|
+
|
219
|
+
# Yield the configuration if needed
|
220
|
+
yield @config if block_given?
|
221
|
+
|
222
|
+
# Create credentials
|
223
|
+
credentials = @config.credentials
|
224
|
+
credentials ||= Credentials.default scope: @config.scope
|
225
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
226
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
227
|
+
end
|
228
|
+
@quota_project_id = @config.quota_project
|
229
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
230
|
+
|
231
|
+
@operations_client = Operations.new do |config|
|
232
|
+
config.credentials = credentials
|
233
|
+
config.endpoint = @config.endpoint
|
234
|
+
end
|
235
|
+
|
236
|
+
@workload_identity_pools_stub = ::Gapic::ServiceStub.new(
|
237
|
+
::Google::Iam::V1beta::WorkloadIdentityPools::Stub,
|
238
|
+
credentials: credentials,
|
239
|
+
endpoint: @config.endpoint,
|
240
|
+
channel_args: @config.channel_args,
|
241
|
+
interceptors: @config.interceptors
|
242
|
+
)
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# Get the associated client for long-running operations.
|
247
|
+
#
|
248
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPools::Operations]
|
249
|
+
#
|
250
|
+
attr_reader :operations_client
|
251
|
+
|
252
|
+
# Service calls
|
253
|
+
|
254
|
+
##
|
255
|
+
# Lists all non-deleted
|
256
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}s in a
|
257
|
+
# project. If `show_deleted` is set to `true`, then deleted pools are also
|
258
|
+
# listed.
|
259
|
+
#
|
260
|
+
# @overload list_workload_identity_pools(request, options = nil)
|
261
|
+
# Pass arguments to `list_workload_identity_pools` via a request object, either of type
|
262
|
+
# {::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest} or an equivalent Hash.
|
263
|
+
#
|
264
|
+
# @param request [::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest, ::Hash]
|
265
|
+
# A request object representing the call parameters. Required. To specify no
|
266
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
267
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
268
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
269
|
+
#
|
270
|
+
# @overload list_workload_identity_pools(parent: nil, page_size: nil, page_token: nil, show_deleted: nil)
|
271
|
+
# Pass arguments to `list_workload_identity_pools` via keyword arguments. Note that at
|
272
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
273
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
274
|
+
#
|
275
|
+
# @param parent [::String]
|
276
|
+
# Required. The parent resource to list pools for.
|
277
|
+
# @param page_size [::Integer]
|
278
|
+
# The maximum number of pools to return.
|
279
|
+
# If unspecified, at most 50 pools are returned.
|
280
|
+
# The maximum value is 1000; values above are 1000 truncated to 1000.
|
281
|
+
# @param page_token [::String]
|
282
|
+
# A page token, received from a previous `ListWorkloadIdentityPools`
|
283
|
+
# call. Provide this to retrieve the subsequent page.
|
284
|
+
# @param show_deleted [::Boolean]
|
285
|
+
# Whether to return soft-deleted pools.
|
286
|
+
#
|
287
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
288
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPool>]
|
289
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
290
|
+
#
|
291
|
+
# @return [::Gapic::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPool>]
|
292
|
+
#
|
293
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
294
|
+
#
|
295
|
+
def list_workload_identity_pools request, options = nil
|
296
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
297
|
+
|
298
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest
|
299
|
+
|
300
|
+
# Converts hash and nil to an options object
|
301
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
302
|
+
|
303
|
+
# Customize the options with defaults
|
304
|
+
metadata = @config.rpcs.list_workload_identity_pools.metadata.to_h
|
305
|
+
|
306
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
307
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
308
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
309
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
310
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
311
|
+
|
312
|
+
header_params = {
|
313
|
+
"parent" => request.parent
|
314
|
+
}
|
315
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
316
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
317
|
+
|
318
|
+
options.apply_defaults timeout: @config.rpcs.list_workload_identity_pools.timeout,
|
319
|
+
metadata: metadata,
|
320
|
+
retry_policy: @config.rpcs.list_workload_identity_pools.retry_policy
|
321
|
+
options.apply_defaults metadata: @config.metadata,
|
322
|
+
retry_policy: @config.retry_policy
|
323
|
+
|
324
|
+
@workload_identity_pools_stub.call_rpc :list_workload_identity_pools, request, options: options do |response, operation|
|
325
|
+
response = ::Gapic::PagedEnumerable.new @workload_identity_pools_stub, :list_workload_identity_pools, request, response, operation, options
|
326
|
+
yield response, operation if block_given?
|
327
|
+
return response
|
328
|
+
end
|
329
|
+
rescue ::GRPC::BadStatus => e
|
330
|
+
raise ::Google::Cloud::Error.from_error(e)
|
331
|
+
end
|
332
|
+
|
333
|
+
##
|
334
|
+
# Gets an individual
|
335
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
336
|
+
#
|
337
|
+
# @overload get_workload_identity_pool(request, options = nil)
|
338
|
+
# Pass arguments to `get_workload_identity_pool` via a request object, either of type
|
339
|
+
# {::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest} or an equivalent Hash.
|
340
|
+
#
|
341
|
+
# @param request [::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest, ::Hash]
|
342
|
+
# A request object representing the call parameters. Required. To specify no
|
343
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
344
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
345
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
346
|
+
#
|
347
|
+
# @overload get_workload_identity_pool(name: nil)
|
348
|
+
# Pass arguments to `get_workload_identity_pool` via keyword arguments. Note that at
|
349
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
350
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
351
|
+
#
|
352
|
+
# @param name [::String]
|
353
|
+
# Required. The name of the pool to retrieve.
|
354
|
+
#
|
355
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
356
|
+
# @yieldparam response [::Google::Iam::V1beta::WorkloadIdentityPool]
|
357
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
358
|
+
#
|
359
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPool]
|
360
|
+
#
|
361
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
362
|
+
#
|
363
|
+
def get_workload_identity_pool request, options = nil
|
364
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
365
|
+
|
366
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::GetWorkloadIdentityPoolRequest
|
367
|
+
|
368
|
+
# Converts hash and nil to an options object
|
369
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
370
|
+
|
371
|
+
# Customize the options with defaults
|
372
|
+
metadata = @config.rpcs.get_workload_identity_pool.metadata.to_h
|
373
|
+
|
374
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
375
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
376
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
377
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
378
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
379
|
+
|
380
|
+
header_params = {
|
381
|
+
"name" => request.name
|
382
|
+
}
|
383
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
384
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
385
|
+
|
386
|
+
options.apply_defaults timeout: @config.rpcs.get_workload_identity_pool.timeout,
|
387
|
+
metadata: metadata,
|
388
|
+
retry_policy: @config.rpcs.get_workload_identity_pool.retry_policy
|
389
|
+
options.apply_defaults metadata: @config.metadata,
|
390
|
+
retry_policy: @config.retry_policy
|
391
|
+
|
392
|
+
@workload_identity_pools_stub.call_rpc :get_workload_identity_pool, request, options: options do |response, operation|
|
393
|
+
yield response, operation if block_given?
|
394
|
+
return response
|
395
|
+
end
|
396
|
+
rescue ::GRPC::BadStatus => e
|
397
|
+
raise ::Google::Cloud::Error.from_error(e)
|
398
|
+
end
|
399
|
+
|
400
|
+
##
|
401
|
+
# Creates a new
|
402
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
403
|
+
#
|
404
|
+
# You cannot reuse the name of a deleted pool until 30 days after deletion.
|
405
|
+
#
|
406
|
+
# @overload create_workload_identity_pool(request, options = nil)
|
407
|
+
# Pass arguments to `create_workload_identity_pool` via a request object, either of type
|
408
|
+
# {::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest} or an equivalent Hash.
|
409
|
+
#
|
410
|
+
# @param request [::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest, ::Hash]
|
411
|
+
# A request object representing the call parameters. Required. To specify no
|
412
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
413
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
414
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
415
|
+
#
|
416
|
+
# @overload create_workload_identity_pool(parent: nil, workload_identity_pool: nil, workload_identity_pool_id: nil)
|
417
|
+
# Pass arguments to `create_workload_identity_pool` via keyword arguments. Note that at
|
418
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
419
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
420
|
+
#
|
421
|
+
# @param parent [::String]
|
422
|
+
# Required. The parent resource to create the pool in. The only supported
|
423
|
+
# location is `global`.
|
424
|
+
# @param workload_identity_pool [::Google::Iam::V1beta::WorkloadIdentityPool, ::Hash]
|
425
|
+
# Required. The pool to create.
|
426
|
+
# @param workload_identity_pool_id [::String]
|
427
|
+
# Required. The ID to use for the pool, which becomes the
|
428
|
+
# final component of the resource name. This value should be 4-32 characters,
|
429
|
+
# and may contain the characters [a-z0-9-]. The prefix `gcp-` is
|
430
|
+
# reserved for use by Google, and may not be specified.
|
431
|
+
#
|
432
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
433
|
+
# @yieldparam response [::Gapic::Operation]
|
434
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
435
|
+
#
|
436
|
+
# @return [::Gapic::Operation]
|
437
|
+
#
|
438
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
439
|
+
#
|
440
|
+
def create_workload_identity_pool request, options = nil
|
441
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
442
|
+
|
443
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest
|
444
|
+
|
445
|
+
# Converts hash and nil to an options object
|
446
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
447
|
+
|
448
|
+
# Customize the options with defaults
|
449
|
+
metadata = @config.rpcs.create_workload_identity_pool.metadata.to_h
|
450
|
+
|
451
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
452
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
453
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
454
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
455
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
456
|
+
|
457
|
+
header_params = {
|
458
|
+
"parent" => request.parent
|
459
|
+
}
|
460
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
461
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
462
|
+
|
463
|
+
options.apply_defaults timeout: @config.rpcs.create_workload_identity_pool.timeout,
|
464
|
+
metadata: metadata,
|
465
|
+
retry_policy: @config.rpcs.create_workload_identity_pool.retry_policy
|
466
|
+
options.apply_defaults metadata: @config.metadata,
|
467
|
+
retry_policy: @config.retry_policy
|
468
|
+
|
469
|
+
@workload_identity_pools_stub.call_rpc :create_workload_identity_pool, request, options: options do |response, operation|
|
470
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
471
|
+
yield response, operation if block_given?
|
472
|
+
return response
|
473
|
+
end
|
474
|
+
rescue ::GRPC::BadStatus => e
|
475
|
+
raise ::Google::Cloud::Error.from_error(e)
|
476
|
+
end
|
477
|
+
|
478
|
+
##
|
479
|
+
# Updates an existing
|
480
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
481
|
+
#
|
482
|
+
# @overload update_workload_identity_pool(request, options = nil)
|
483
|
+
# Pass arguments to `update_workload_identity_pool` via a request object, either of type
|
484
|
+
# {::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest} or an equivalent Hash.
|
485
|
+
#
|
486
|
+
# @param request [::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest, ::Hash]
|
487
|
+
# A request object representing the call parameters. Required. To specify no
|
488
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
489
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
490
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
491
|
+
#
|
492
|
+
# @overload update_workload_identity_pool(workload_identity_pool: nil, update_mask: nil)
|
493
|
+
# Pass arguments to `update_workload_identity_pool` via keyword arguments. Note that at
|
494
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
495
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
496
|
+
#
|
497
|
+
# @param workload_identity_pool [::Google::Iam::V1beta::WorkloadIdentityPool, ::Hash]
|
498
|
+
# Required. The pool to update. The `name` field is used to identify the pool.
|
499
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
500
|
+
# Required. The list of fields update.
|
501
|
+
#
|
502
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
503
|
+
# @yieldparam response [::Gapic::Operation]
|
504
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
505
|
+
#
|
506
|
+
# @return [::Gapic::Operation]
|
507
|
+
#
|
508
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
509
|
+
#
|
510
|
+
def update_workload_identity_pool request, options = nil
|
511
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
512
|
+
|
513
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest
|
514
|
+
|
515
|
+
# Converts hash and nil to an options object
|
516
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
517
|
+
|
518
|
+
# Customize the options with defaults
|
519
|
+
metadata = @config.rpcs.update_workload_identity_pool.metadata.to_h
|
520
|
+
|
521
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
522
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
523
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
524
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
525
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
526
|
+
|
527
|
+
header_params = {
|
528
|
+
"workload_identity_pool.name" => request.workload_identity_pool.name
|
529
|
+
}
|
530
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
531
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
532
|
+
|
533
|
+
options.apply_defaults timeout: @config.rpcs.update_workload_identity_pool.timeout,
|
534
|
+
metadata: metadata,
|
535
|
+
retry_policy: @config.rpcs.update_workload_identity_pool.retry_policy
|
536
|
+
options.apply_defaults metadata: @config.metadata,
|
537
|
+
retry_policy: @config.retry_policy
|
538
|
+
|
539
|
+
@workload_identity_pools_stub.call_rpc :update_workload_identity_pool, request, options: options do |response, operation|
|
540
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
541
|
+
yield response, operation if block_given?
|
542
|
+
return response
|
543
|
+
end
|
544
|
+
rescue ::GRPC::BadStatus => e
|
545
|
+
raise ::Google::Cloud::Error.from_error(e)
|
546
|
+
end
|
547
|
+
|
548
|
+
##
|
549
|
+
# Deletes a
|
550
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
551
|
+
#
|
552
|
+
# You cannot use a deleted pool to exchange external
|
553
|
+
# credentials for Google Cloud credentials. However, deletion does
|
554
|
+
# not revoke credentials that have already been issued.
|
555
|
+
# Credentials issued for a deleted pool do not grant access to resources.
|
556
|
+
# If the pool is undeleted, and the credentials are not expired, they
|
557
|
+
# grant access again.
|
558
|
+
# You can undelete a pool for 30 days. After 30 days, deletion is
|
559
|
+
# permanent.
|
560
|
+
# You cannot update deleted pools. However, you can view and list them.
|
561
|
+
#
|
562
|
+
# @overload delete_workload_identity_pool(request, options = nil)
|
563
|
+
# Pass arguments to `delete_workload_identity_pool` via a request object, either of type
|
564
|
+
# {::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest} or an equivalent Hash.
|
565
|
+
#
|
566
|
+
# @param request [::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest, ::Hash]
|
567
|
+
# A request object representing the call parameters. Required. To specify no
|
568
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
569
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
570
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
571
|
+
#
|
572
|
+
# @overload delete_workload_identity_pool(name: nil)
|
573
|
+
# Pass arguments to `delete_workload_identity_pool` via keyword arguments. Note that at
|
574
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
575
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
576
|
+
#
|
577
|
+
# @param name [::String]
|
578
|
+
# Required. The name of the pool to delete.
|
579
|
+
#
|
580
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
581
|
+
# @yieldparam response [::Gapic::Operation]
|
582
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
583
|
+
#
|
584
|
+
# @return [::Gapic::Operation]
|
585
|
+
#
|
586
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
587
|
+
#
|
588
|
+
def delete_workload_identity_pool request, options = nil
|
589
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
590
|
+
|
591
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest
|
592
|
+
|
593
|
+
# Converts hash and nil to an options object
|
594
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
595
|
+
|
596
|
+
# Customize the options with defaults
|
597
|
+
metadata = @config.rpcs.delete_workload_identity_pool.metadata.to_h
|
598
|
+
|
599
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
600
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
601
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
602
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
603
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
604
|
+
|
605
|
+
header_params = {
|
606
|
+
"name" => request.name
|
607
|
+
}
|
608
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
609
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
610
|
+
|
611
|
+
options.apply_defaults timeout: @config.rpcs.delete_workload_identity_pool.timeout,
|
612
|
+
metadata: metadata,
|
613
|
+
retry_policy: @config.rpcs.delete_workload_identity_pool.retry_policy
|
614
|
+
options.apply_defaults metadata: @config.metadata,
|
615
|
+
retry_policy: @config.retry_policy
|
616
|
+
|
617
|
+
@workload_identity_pools_stub.call_rpc :delete_workload_identity_pool, request, options: options do |response, operation|
|
618
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
619
|
+
yield response, operation if block_given?
|
620
|
+
return response
|
621
|
+
end
|
622
|
+
rescue ::GRPC::BadStatus => e
|
623
|
+
raise ::Google::Cloud::Error.from_error(e)
|
624
|
+
end
|
625
|
+
|
626
|
+
##
|
627
|
+
# Undeletes a {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool},
|
628
|
+
# as long as it was deleted fewer than 30 days ago.
|
629
|
+
#
|
630
|
+
# @overload undelete_workload_identity_pool(request, options = nil)
|
631
|
+
# Pass arguments to `undelete_workload_identity_pool` via a request object, either of type
|
632
|
+
# {::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest} or an equivalent Hash.
|
633
|
+
#
|
634
|
+
# @param request [::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest, ::Hash]
|
635
|
+
# A request object representing the call parameters. Required. To specify no
|
636
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
637
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
638
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
639
|
+
#
|
640
|
+
# @overload undelete_workload_identity_pool(name: nil)
|
641
|
+
# Pass arguments to `undelete_workload_identity_pool` via keyword arguments. Note that at
|
642
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
643
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
644
|
+
#
|
645
|
+
# @param name [::String]
|
646
|
+
# Required. The name of the pool to undelete.
|
647
|
+
#
|
648
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
649
|
+
# @yieldparam response [::Gapic::Operation]
|
650
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
651
|
+
#
|
652
|
+
# @return [::Gapic::Operation]
|
653
|
+
#
|
654
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
655
|
+
#
|
656
|
+
def undelete_workload_identity_pool request, options = nil
|
657
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
658
|
+
|
659
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest
|
660
|
+
|
661
|
+
# Converts hash and nil to an options object
|
662
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
663
|
+
|
664
|
+
# Customize the options with defaults
|
665
|
+
metadata = @config.rpcs.undelete_workload_identity_pool.metadata.to_h
|
666
|
+
|
667
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
668
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
669
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
670
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
671
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
672
|
+
|
673
|
+
header_params = {
|
674
|
+
"name" => request.name
|
675
|
+
}
|
676
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
677
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
678
|
+
|
679
|
+
options.apply_defaults timeout: @config.rpcs.undelete_workload_identity_pool.timeout,
|
680
|
+
metadata: metadata,
|
681
|
+
retry_policy: @config.rpcs.undelete_workload_identity_pool.retry_policy
|
682
|
+
options.apply_defaults metadata: @config.metadata,
|
683
|
+
retry_policy: @config.retry_policy
|
684
|
+
|
685
|
+
@workload_identity_pools_stub.call_rpc :undelete_workload_identity_pool, request, options: options do |response, operation|
|
686
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
687
|
+
yield response, operation if block_given?
|
688
|
+
return response
|
689
|
+
end
|
690
|
+
rescue ::GRPC::BadStatus => e
|
691
|
+
raise ::Google::Cloud::Error.from_error(e)
|
692
|
+
end
|
693
|
+
|
694
|
+
##
|
695
|
+
# Lists all non-deleted
|
696
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPoolProvider WorkloadIdentityPoolProvider}s
|
697
|
+
# in a {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
698
|
+
# If `show_deleted` is set to `true`, then deleted providers are also listed.
|
699
|
+
#
|
700
|
+
# @overload list_workload_identity_pool_providers(request, options = nil)
|
701
|
+
# Pass arguments to `list_workload_identity_pool_providers` via a request object, either of type
|
702
|
+
# {::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest} or an equivalent Hash.
|
703
|
+
#
|
704
|
+
# @param request [::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest, ::Hash]
|
705
|
+
# A request object representing the call parameters. Required. To specify no
|
706
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
707
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
708
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
709
|
+
#
|
710
|
+
# @overload list_workload_identity_pool_providers(parent: nil, page_size: nil, page_token: nil, show_deleted: nil)
|
711
|
+
# Pass arguments to `list_workload_identity_pool_providers` via keyword arguments. Note that at
|
712
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
713
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
714
|
+
#
|
715
|
+
# @param parent [::String]
|
716
|
+
# Required. The pool to list providers for.
|
717
|
+
# @param page_size [::Integer]
|
718
|
+
# The maximum number of providers to return.
|
719
|
+
# If unspecified, at most 50 providers are returned.
|
720
|
+
# The maximum value is 100; values above 100 are truncated to 100.
|
721
|
+
# @param page_token [::String]
|
722
|
+
# A page token, received from a previous
|
723
|
+
# `ListWorkloadIdentityPoolProviders` call. Provide this to retrieve the
|
724
|
+
# subsequent page.
|
725
|
+
# @param show_deleted [::Boolean]
|
726
|
+
# Whether to return soft-deleted providers.
|
727
|
+
#
|
728
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
729
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPoolProvider>]
|
730
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
731
|
+
#
|
732
|
+
# @return [::Gapic::PagedEnumerable<::Google::Iam::V1beta::WorkloadIdentityPoolProvider>]
|
733
|
+
#
|
734
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
735
|
+
#
|
736
|
+
def list_workload_identity_pool_providers request, options = nil
|
737
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
738
|
+
|
739
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest
|
740
|
+
|
741
|
+
# Converts hash and nil to an options object
|
742
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
743
|
+
|
744
|
+
# Customize the options with defaults
|
745
|
+
metadata = @config.rpcs.list_workload_identity_pool_providers.metadata.to_h
|
746
|
+
|
747
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
748
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
749
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
750
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
751
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
752
|
+
|
753
|
+
header_params = {
|
754
|
+
"parent" => request.parent
|
755
|
+
}
|
756
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
757
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
758
|
+
|
759
|
+
options.apply_defaults timeout: @config.rpcs.list_workload_identity_pool_providers.timeout,
|
760
|
+
metadata: metadata,
|
761
|
+
retry_policy: @config.rpcs.list_workload_identity_pool_providers.retry_policy
|
762
|
+
options.apply_defaults metadata: @config.metadata,
|
763
|
+
retry_policy: @config.retry_policy
|
764
|
+
|
765
|
+
@workload_identity_pools_stub.call_rpc :list_workload_identity_pool_providers, request, options: options do |response, operation|
|
766
|
+
response = ::Gapic::PagedEnumerable.new @workload_identity_pools_stub, :list_workload_identity_pool_providers, request, response, operation, options
|
767
|
+
yield response, operation if block_given?
|
768
|
+
return response
|
769
|
+
end
|
770
|
+
rescue ::GRPC::BadStatus => e
|
771
|
+
raise ::Google::Cloud::Error.from_error(e)
|
772
|
+
end
|
773
|
+
|
774
|
+
##
|
775
|
+
# Gets an individual
|
776
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPoolProvider WorkloadIdentityPoolProvider}.
|
777
|
+
#
|
778
|
+
# @overload get_workload_identity_pool_provider(request, options = nil)
|
779
|
+
# Pass arguments to `get_workload_identity_pool_provider` via a request object, either of type
|
780
|
+
# {::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
781
|
+
#
|
782
|
+
# @param request [::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest, ::Hash]
|
783
|
+
# A request object representing the call parameters. Required. To specify no
|
784
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
785
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
786
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
787
|
+
#
|
788
|
+
# @overload get_workload_identity_pool_provider(name: nil)
|
789
|
+
# Pass arguments to `get_workload_identity_pool_provider` via keyword arguments. Note that at
|
790
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
791
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
792
|
+
#
|
793
|
+
# @param name [::String]
|
794
|
+
# Required. The name of the provider to retrieve.
|
795
|
+
#
|
796
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
797
|
+
# @yieldparam response [::Google::Iam::V1beta::WorkloadIdentityPoolProvider]
|
798
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
799
|
+
#
|
800
|
+
# @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider]
|
801
|
+
#
|
802
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
803
|
+
#
|
804
|
+
def get_workload_identity_pool_provider request, options = nil
|
805
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
806
|
+
|
807
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest
|
808
|
+
|
809
|
+
# Converts hash and nil to an options object
|
810
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
811
|
+
|
812
|
+
# Customize the options with defaults
|
813
|
+
metadata = @config.rpcs.get_workload_identity_pool_provider.metadata.to_h
|
814
|
+
|
815
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
816
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
817
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
818
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
819
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
820
|
+
|
821
|
+
header_params = {
|
822
|
+
"name" => request.name
|
823
|
+
}
|
824
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
825
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
826
|
+
|
827
|
+
options.apply_defaults timeout: @config.rpcs.get_workload_identity_pool_provider.timeout,
|
828
|
+
metadata: metadata,
|
829
|
+
retry_policy: @config.rpcs.get_workload_identity_pool_provider.retry_policy
|
830
|
+
options.apply_defaults metadata: @config.metadata,
|
831
|
+
retry_policy: @config.retry_policy
|
832
|
+
|
833
|
+
@workload_identity_pools_stub.call_rpc :get_workload_identity_pool_provider, request, options: options do |response, operation|
|
834
|
+
yield response, operation if block_given?
|
835
|
+
return response
|
836
|
+
end
|
837
|
+
rescue ::GRPC::BadStatus => e
|
838
|
+
raise ::Google::Cloud::Error.from_error(e)
|
839
|
+
end
|
840
|
+
|
841
|
+
##
|
842
|
+
# Creates a new
|
843
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider]
|
844
|
+
# in a {::Google::Iam::V1beta::WorkloadIdentityPool WorkloadIdentityPool}.
|
845
|
+
#
|
846
|
+
# You cannot reuse the name of a deleted provider until 30 days after
|
847
|
+
# deletion.
|
848
|
+
#
|
849
|
+
# @overload create_workload_identity_pool_provider(request, options = nil)
|
850
|
+
# Pass arguments to `create_workload_identity_pool_provider` via a request object, either of type
|
851
|
+
# {::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
852
|
+
#
|
853
|
+
# @param request [::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest, ::Hash]
|
854
|
+
# A request object representing the call parameters. Required. To specify no
|
855
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
856
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
857
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
858
|
+
#
|
859
|
+
# @overload create_workload_identity_pool_provider(parent: nil, workload_identity_pool_provider: nil, workload_identity_pool_provider_id: nil)
|
860
|
+
# Pass arguments to `create_workload_identity_pool_provider` via keyword arguments. Note that at
|
861
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
862
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
863
|
+
#
|
864
|
+
# @param parent [::String]
|
865
|
+
# Required. The pool to create this provider in.
|
866
|
+
# @param workload_identity_pool_provider [::Google::Iam::V1beta::WorkloadIdentityPoolProvider, ::Hash]
|
867
|
+
# Required. The provider to create.
|
868
|
+
# @param workload_identity_pool_provider_id [::String]
|
869
|
+
# Required. The ID for the provider, which becomes the
|
870
|
+
# final component of the resource name. This value must be 4-32 characters,
|
871
|
+
# and may contain the characters [a-z0-9-]. The prefix `gcp-` is
|
872
|
+
# reserved for use by Google, and may not be specified.
|
873
|
+
#
|
874
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
875
|
+
# @yieldparam response [::Gapic::Operation]
|
876
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
877
|
+
#
|
878
|
+
# @return [::Gapic::Operation]
|
879
|
+
#
|
880
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
881
|
+
#
|
882
|
+
def create_workload_identity_pool_provider request, options = nil
|
883
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
884
|
+
|
885
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest
|
886
|
+
|
887
|
+
# Converts hash and nil to an options object
|
888
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
889
|
+
|
890
|
+
# Customize the options with defaults
|
891
|
+
metadata = @config.rpcs.create_workload_identity_pool_provider.metadata.to_h
|
892
|
+
|
893
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
894
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
895
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
896
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
897
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
898
|
+
|
899
|
+
header_params = {
|
900
|
+
"parent" => request.parent
|
901
|
+
}
|
902
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
903
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
904
|
+
|
905
|
+
options.apply_defaults timeout: @config.rpcs.create_workload_identity_pool_provider.timeout,
|
906
|
+
metadata: metadata,
|
907
|
+
retry_policy: @config.rpcs.create_workload_identity_pool_provider.retry_policy
|
908
|
+
options.apply_defaults metadata: @config.metadata,
|
909
|
+
retry_policy: @config.retry_policy
|
910
|
+
|
911
|
+
@workload_identity_pools_stub.call_rpc :create_workload_identity_pool_provider, request, options: options do |response, operation|
|
912
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
913
|
+
yield response, operation if block_given?
|
914
|
+
return response
|
915
|
+
end
|
916
|
+
rescue ::GRPC::BadStatus => e
|
917
|
+
raise ::Google::Cloud::Error.from_error(e)
|
918
|
+
end
|
919
|
+
|
920
|
+
##
|
921
|
+
# Updates an existing
|
922
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider].
|
923
|
+
#
|
924
|
+
# @overload update_workload_identity_pool_provider(request, options = nil)
|
925
|
+
# Pass arguments to `update_workload_identity_pool_provider` via a request object, either of type
|
926
|
+
# {::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
927
|
+
#
|
928
|
+
# @param request [::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest, ::Hash]
|
929
|
+
# A request object representing the call parameters. Required. To specify no
|
930
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
931
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
932
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
933
|
+
#
|
934
|
+
# @overload update_workload_identity_pool_provider(workload_identity_pool_provider: nil, update_mask: nil)
|
935
|
+
# Pass arguments to `update_workload_identity_pool_provider` via keyword arguments. Note that at
|
936
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
937
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
938
|
+
#
|
939
|
+
# @param workload_identity_pool_provider [::Google::Iam::V1beta::WorkloadIdentityPoolProvider, ::Hash]
|
940
|
+
# Required. The provider to update.
|
941
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
942
|
+
# Required. The list of fields to update.
|
943
|
+
#
|
944
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
945
|
+
# @yieldparam response [::Gapic::Operation]
|
946
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
947
|
+
#
|
948
|
+
# @return [::Gapic::Operation]
|
949
|
+
#
|
950
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
951
|
+
#
|
952
|
+
def update_workload_identity_pool_provider request, options = nil
|
953
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
954
|
+
|
955
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest
|
956
|
+
|
957
|
+
# Converts hash and nil to an options object
|
958
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
959
|
+
|
960
|
+
# Customize the options with defaults
|
961
|
+
metadata = @config.rpcs.update_workload_identity_pool_provider.metadata.to_h
|
962
|
+
|
963
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
964
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
965
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
966
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
967
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
968
|
+
|
969
|
+
header_params = {
|
970
|
+
"workload_identity_pool_provider.name" => request.workload_identity_pool_provider.name
|
971
|
+
}
|
972
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
973
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
974
|
+
|
975
|
+
options.apply_defaults timeout: @config.rpcs.update_workload_identity_pool_provider.timeout,
|
976
|
+
metadata: metadata,
|
977
|
+
retry_policy: @config.rpcs.update_workload_identity_pool_provider.retry_policy
|
978
|
+
options.apply_defaults metadata: @config.metadata,
|
979
|
+
retry_policy: @config.retry_policy
|
980
|
+
|
981
|
+
@workload_identity_pools_stub.call_rpc :update_workload_identity_pool_provider, request, options: options do |response, operation|
|
982
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
983
|
+
yield response, operation if block_given?
|
984
|
+
return response
|
985
|
+
end
|
986
|
+
rescue ::GRPC::BadStatus => e
|
987
|
+
raise ::Google::Cloud::Error.from_error(e)
|
988
|
+
end
|
989
|
+
|
990
|
+
##
|
991
|
+
# Deletes a
|
992
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider].
|
993
|
+
# Deleting a provider does not revoke credentials that have already been
|
994
|
+
# issued; they continue to grant access.
|
995
|
+
# You can undelete a provider for 30 days. After 30 days, deletion is
|
996
|
+
# permanent.
|
997
|
+
# You cannot update deleted providers. However, you can view and list them.
|
998
|
+
#
|
999
|
+
# @overload delete_workload_identity_pool_provider(request, options = nil)
|
1000
|
+
# Pass arguments to `delete_workload_identity_pool_provider` via a request object, either of type
|
1001
|
+
# {::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
1002
|
+
#
|
1003
|
+
# @param request [::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest, ::Hash]
|
1004
|
+
# A request object representing the call parameters. Required. To specify no
|
1005
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1006
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1007
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1008
|
+
#
|
1009
|
+
# @overload delete_workload_identity_pool_provider(name: nil)
|
1010
|
+
# Pass arguments to `delete_workload_identity_pool_provider` via keyword arguments. Note that at
|
1011
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1012
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1013
|
+
#
|
1014
|
+
# @param name [::String]
|
1015
|
+
# Required. The name of the provider to delete.
|
1016
|
+
#
|
1017
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1018
|
+
# @yieldparam response [::Gapic::Operation]
|
1019
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1020
|
+
#
|
1021
|
+
# @return [::Gapic::Operation]
|
1022
|
+
#
|
1023
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1024
|
+
#
|
1025
|
+
def delete_workload_identity_pool_provider request, options = nil
|
1026
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1027
|
+
|
1028
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest
|
1029
|
+
|
1030
|
+
# Converts hash and nil to an options object
|
1031
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1032
|
+
|
1033
|
+
# Customize the options with defaults
|
1034
|
+
metadata = @config.rpcs.delete_workload_identity_pool_provider.metadata.to_h
|
1035
|
+
|
1036
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1037
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1038
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1039
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
1040
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1041
|
+
|
1042
|
+
header_params = {
|
1043
|
+
"name" => request.name
|
1044
|
+
}
|
1045
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1046
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1047
|
+
|
1048
|
+
options.apply_defaults timeout: @config.rpcs.delete_workload_identity_pool_provider.timeout,
|
1049
|
+
metadata: metadata,
|
1050
|
+
retry_policy: @config.rpcs.delete_workload_identity_pool_provider.retry_policy
|
1051
|
+
options.apply_defaults metadata: @config.metadata,
|
1052
|
+
retry_policy: @config.retry_policy
|
1053
|
+
|
1054
|
+
@workload_identity_pools_stub.call_rpc :delete_workload_identity_pool_provider, request, options: options do |response, operation|
|
1055
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1056
|
+
yield response, operation if block_given?
|
1057
|
+
return response
|
1058
|
+
end
|
1059
|
+
rescue ::GRPC::BadStatus => e
|
1060
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
##
|
1064
|
+
# Undeletes a
|
1065
|
+
# [WorkloadIdentityPoolProvider][google.iam.v1beta.WorkloadIdentityProvider],
|
1066
|
+
# as long as it was deleted fewer than 30 days ago.
|
1067
|
+
#
|
1068
|
+
# @overload undelete_workload_identity_pool_provider(request, options = nil)
|
1069
|
+
# Pass arguments to `undelete_workload_identity_pool_provider` via a request object, either of type
|
1070
|
+
# {::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest} or an equivalent Hash.
|
1071
|
+
#
|
1072
|
+
# @param request [::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest, ::Hash]
|
1073
|
+
# A request object representing the call parameters. Required. To specify no
|
1074
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1075
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1076
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1077
|
+
#
|
1078
|
+
# @overload undelete_workload_identity_pool_provider(name: nil)
|
1079
|
+
# Pass arguments to `undelete_workload_identity_pool_provider` via keyword arguments. Note that at
|
1080
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1081
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1082
|
+
#
|
1083
|
+
# @param name [::String]
|
1084
|
+
# Required. The name of the provider to undelete.
|
1085
|
+
#
|
1086
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1087
|
+
# @yieldparam response [::Gapic::Operation]
|
1088
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1089
|
+
#
|
1090
|
+
# @return [::Gapic::Operation]
|
1091
|
+
#
|
1092
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1093
|
+
#
|
1094
|
+
def undelete_workload_identity_pool_provider request, options = nil
|
1095
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1096
|
+
|
1097
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest
|
1098
|
+
|
1099
|
+
# Converts hash and nil to an options object
|
1100
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1101
|
+
|
1102
|
+
# Customize the options with defaults
|
1103
|
+
metadata = @config.rpcs.undelete_workload_identity_pool_provider.metadata.to_h
|
1104
|
+
|
1105
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1106
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1107
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1108
|
+
gapic_version: ::Google::Iam::V1beta::VERSION
|
1109
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1110
|
+
|
1111
|
+
header_params = {
|
1112
|
+
"name" => request.name
|
1113
|
+
}
|
1114
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1115
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1116
|
+
|
1117
|
+
options.apply_defaults timeout: @config.rpcs.undelete_workload_identity_pool_provider.timeout,
|
1118
|
+
metadata: metadata,
|
1119
|
+
retry_policy: @config.rpcs.undelete_workload_identity_pool_provider.retry_policy
|
1120
|
+
options.apply_defaults metadata: @config.metadata,
|
1121
|
+
retry_policy: @config.retry_policy
|
1122
|
+
|
1123
|
+
@workload_identity_pools_stub.call_rpc :undelete_workload_identity_pool_provider, request, options: options do |response, operation|
|
1124
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1125
|
+
yield response, operation if block_given?
|
1126
|
+
return response
|
1127
|
+
end
|
1128
|
+
rescue ::GRPC::BadStatus => e
|
1129
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
##
|
1133
|
+
# Configuration class for the WorkloadIdentityPools API.
|
1134
|
+
#
|
1135
|
+
# This class represents the configuration for WorkloadIdentityPools,
|
1136
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1137
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1138
|
+
# applied individually to specific RPCs. See
|
1139
|
+
# {::Google::Iam::V1beta::WorkloadIdentityPools::Client::Configuration::Rpcs}
|
1140
|
+
# for a list of RPCs that can be configured independently.
|
1141
|
+
#
|
1142
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1143
|
+
# on construction.
|
1144
|
+
#
|
1145
|
+
# # Examples
|
1146
|
+
#
|
1147
|
+
# To modify the global config, setting the timeout for list_workload_identity_pools
|
1148
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1149
|
+
#
|
1150
|
+
# ::Google::Iam::V1beta::WorkloadIdentityPools::Client.configure do |config|
|
1151
|
+
# config.timeout = 10.0
|
1152
|
+
# config.rpcs.list_workload_identity_pools.timeout = 20.0
|
1153
|
+
# end
|
1154
|
+
#
|
1155
|
+
# To apply the above configuration only to a new client:
|
1156
|
+
#
|
1157
|
+
# client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
|
1158
|
+
# config.timeout = 10.0
|
1159
|
+
# config.rpcs.list_workload_identity_pools.timeout = 20.0
|
1160
|
+
# end
|
1161
|
+
#
|
1162
|
+
# @!attribute [rw] endpoint
|
1163
|
+
# The hostname or hostname:port of the service endpoint.
|
1164
|
+
# Defaults to `"iam.googleapis.com"`.
|
1165
|
+
# @return [::String]
|
1166
|
+
# @!attribute [rw] credentials
|
1167
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1168
|
+
# * (`String`) The path to a service account key file in JSON format
|
1169
|
+
# * (`Hash`) A service account key as a Hash
|
1170
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1171
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1172
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1173
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1174
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1175
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1176
|
+
# * (`nil`) indicating no credentials
|
1177
|
+
# @return [::Object]
|
1178
|
+
# @!attribute [rw] scope
|
1179
|
+
# The OAuth scopes
|
1180
|
+
# @return [::Array<::String>]
|
1181
|
+
# @!attribute [rw] lib_name
|
1182
|
+
# The library name as recorded in instrumentation and logging
|
1183
|
+
# @return [::String]
|
1184
|
+
# @!attribute [rw] lib_version
|
1185
|
+
# The library version as recorded in instrumentation and logging
|
1186
|
+
# @return [::String]
|
1187
|
+
# @!attribute [rw] channel_args
|
1188
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1189
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1190
|
+
# @return [::Hash]
|
1191
|
+
# @!attribute [rw] interceptors
|
1192
|
+
# An array of interceptors that are run before calls are executed.
|
1193
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1194
|
+
# @!attribute [rw] timeout
|
1195
|
+
# The call timeout in seconds.
|
1196
|
+
# @return [::Numeric]
|
1197
|
+
# @!attribute [rw] metadata
|
1198
|
+
# Additional gRPC headers to be sent with the call.
|
1199
|
+
# @return [::Hash{::Symbol=>::String}]
|
1200
|
+
# @!attribute [rw] retry_policy
|
1201
|
+
# The retry policy. The value is a hash with the following keys:
|
1202
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1203
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1204
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1205
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1206
|
+
# trigger a retry.
|
1207
|
+
# @return [::Hash]
|
1208
|
+
# @!attribute [rw] quota_project
|
1209
|
+
# A separate project against which to charge quota.
|
1210
|
+
# @return [::String]
|
1211
|
+
#
|
1212
|
+
class Configuration
|
1213
|
+
extend ::Gapic::Config
|
1214
|
+
|
1215
|
+
config_attr :endpoint, "iam.googleapis.com", ::String
|
1216
|
+
config_attr :credentials, nil do |value|
|
1217
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1218
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1219
|
+
allowed.any? { |klass| klass === value }
|
1220
|
+
end
|
1221
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1222
|
+
config_attr :lib_name, nil, ::String, nil
|
1223
|
+
config_attr :lib_version, nil, ::String, nil
|
1224
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1225
|
+
config_attr :interceptors, nil, ::Array, nil
|
1226
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1227
|
+
config_attr :metadata, nil, ::Hash, nil
|
1228
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1229
|
+
config_attr :quota_project, nil, ::String, nil
|
1230
|
+
|
1231
|
+
# @private
|
1232
|
+
def initialize parent_config = nil
|
1233
|
+
@parent_config = parent_config unless parent_config.nil?
|
1234
|
+
|
1235
|
+
yield self if block_given?
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
##
|
1239
|
+
# Configurations for individual RPCs
|
1240
|
+
# @return [Rpcs]
|
1241
|
+
#
|
1242
|
+
def rpcs
|
1243
|
+
@rpcs ||= begin
|
1244
|
+
parent_rpcs = nil
|
1245
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1246
|
+
Rpcs.new parent_rpcs
|
1247
|
+
end
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
##
|
1251
|
+
# Configuration RPC class for the WorkloadIdentityPools API.
|
1252
|
+
#
|
1253
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1254
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1255
|
+
# the following configuration fields:
|
1256
|
+
#
|
1257
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
1258
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1259
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1260
|
+
# include the following keys:
|
1261
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1262
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1263
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1264
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1265
|
+
# trigger a retry.
|
1266
|
+
#
|
1267
|
+
class Rpcs
|
1268
|
+
##
|
1269
|
+
# RPC-specific configuration for `list_workload_identity_pools`
|
1270
|
+
# @return [::Gapic::Config::Method]
|
1271
|
+
#
|
1272
|
+
attr_reader :list_workload_identity_pools
|
1273
|
+
##
|
1274
|
+
# RPC-specific configuration for `get_workload_identity_pool`
|
1275
|
+
# @return [::Gapic::Config::Method]
|
1276
|
+
#
|
1277
|
+
attr_reader :get_workload_identity_pool
|
1278
|
+
##
|
1279
|
+
# RPC-specific configuration for `create_workload_identity_pool`
|
1280
|
+
# @return [::Gapic::Config::Method]
|
1281
|
+
#
|
1282
|
+
attr_reader :create_workload_identity_pool
|
1283
|
+
##
|
1284
|
+
# RPC-specific configuration for `update_workload_identity_pool`
|
1285
|
+
# @return [::Gapic::Config::Method]
|
1286
|
+
#
|
1287
|
+
attr_reader :update_workload_identity_pool
|
1288
|
+
##
|
1289
|
+
# RPC-specific configuration for `delete_workload_identity_pool`
|
1290
|
+
# @return [::Gapic::Config::Method]
|
1291
|
+
#
|
1292
|
+
attr_reader :delete_workload_identity_pool
|
1293
|
+
##
|
1294
|
+
# RPC-specific configuration for `undelete_workload_identity_pool`
|
1295
|
+
# @return [::Gapic::Config::Method]
|
1296
|
+
#
|
1297
|
+
attr_reader :undelete_workload_identity_pool
|
1298
|
+
##
|
1299
|
+
# RPC-specific configuration for `list_workload_identity_pool_providers`
|
1300
|
+
# @return [::Gapic::Config::Method]
|
1301
|
+
#
|
1302
|
+
attr_reader :list_workload_identity_pool_providers
|
1303
|
+
##
|
1304
|
+
# RPC-specific configuration for `get_workload_identity_pool_provider`
|
1305
|
+
# @return [::Gapic::Config::Method]
|
1306
|
+
#
|
1307
|
+
attr_reader :get_workload_identity_pool_provider
|
1308
|
+
##
|
1309
|
+
# RPC-specific configuration for `create_workload_identity_pool_provider`
|
1310
|
+
# @return [::Gapic::Config::Method]
|
1311
|
+
#
|
1312
|
+
attr_reader :create_workload_identity_pool_provider
|
1313
|
+
##
|
1314
|
+
# RPC-specific configuration for `update_workload_identity_pool_provider`
|
1315
|
+
# @return [::Gapic::Config::Method]
|
1316
|
+
#
|
1317
|
+
attr_reader :update_workload_identity_pool_provider
|
1318
|
+
##
|
1319
|
+
# RPC-specific configuration for `delete_workload_identity_pool_provider`
|
1320
|
+
# @return [::Gapic::Config::Method]
|
1321
|
+
#
|
1322
|
+
attr_reader :delete_workload_identity_pool_provider
|
1323
|
+
##
|
1324
|
+
# RPC-specific configuration for `undelete_workload_identity_pool_provider`
|
1325
|
+
# @return [::Gapic::Config::Method]
|
1326
|
+
#
|
1327
|
+
attr_reader :undelete_workload_identity_pool_provider
|
1328
|
+
|
1329
|
+
# @private
|
1330
|
+
def initialize parent_rpcs = nil
|
1331
|
+
list_workload_identity_pools_config = parent_rpcs&.list_workload_identity_pools if parent_rpcs&.respond_to? :list_workload_identity_pools
|
1332
|
+
@list_workload_identity_pools = ::Gapic::Config::Method.new list_workload_identity_pools_config
|
1333
|
+
get_workload_identity_pool_config = parent_rpcs&.get_workload_identity_pool if parent_rpcs&.respond_to? :get_workload_identity_pool
|
1334
|
+
@get_workload_identity_pool = ::Gapic::Config::Method.new get_workload_identity_pool_config
|
1335
|
+
create_workload_identity_pool_config = parent_rpcs&.create_workload_identity_pool if parent_rpcs&.respond_to? :create_workload_identity_pool
|
1336
|
+
@create_workload_identity_pool = ::Gapic::Config::Method.new create_workload_identity_pool_config
|
1337
|
+
update_workload_identity_pool_config = parent_rpcs&.update_workload_identity_pool if parent_rpcs&.respond_to? :update_workload_identity_pool
|
1338
|
+
@update_workload_identity_pool = ::Gapic::Config::Method.new update_workload_identity_pool_config
|
1339
|
+
delete_workload_identity_pool_config = parent_rpcs&.delete_workload_identity_pool if parent_rpcs&.respond_to? :delete_workload_identity_pool
|
1340
|
+
@delete_workload_identity_pool = ::Gapic::Config::Method.new delete_workload_identity_pool_config
|
1341
|
+
undelete_workload_identity_pool_config = parent_rpcs&.undelete_workload_identity_pool if parent_rpcs&.respond_to? :undelete_workload_identity_pool
|
1342
|
+
@undelete_workload_identity_pool = ::Gapic::Config::Method.new undelete_workload_identity_pool_config
|
1343
|
+
list_workload_identity_pool_providers_config = parent_rpcs&.list_workload_identity_pool_providers if parent_rpcs&.respond_to? :list_workload_identity_pool_providers
|
1344
|
+
@list_workload_identity_pool_providers = ::Gapic::Config::Method.new list_workload_identity_pool_providers_config
|
1345
|
+
get_workload_identity_pool_provider_config = parent_rpcs&.get_workload_identity_pool_provider if parent_rpcs&.respond_to? :get_workload_identity_pool_provider
|
1346
|
+
@get_workload_identity_pool_provider = ::Gapic::Config::Method.new get_workload_identity_pool_provider_config
|
1347
|
+
create_workload_identity_pool_provider_config = parent_rpcs&.create_workload_identity_pool_provider if parent_rpcs&.respond_to? :create_workload_identity_pool_provider
|
1348
|
+
@create_workload_identity_pool_provider = ::Gapic::Config::Method.new create_workload_identity_pool_provider_config
|
1349
|
+
update_workload_identity_pool_provider_config = parent_rpcs&.update_workload_identity_pool_provider if parent_rpcs&.respond_to? :update_workload_identity_pool_provider
|
1350
|
+
@update_workload_identity_pool_provider = ::Gapic::Config::Method.new update_workload_identity_pool_provider_config
|
1351
|
+
delete_workload_identity_pool_provider_config = parent_rpcs&.delete_workload_identity_pool_provider if parent_rpcs&.respond_to? :delete_workload_identity_pool_provider
|
1352
|
+
@delete_workload_identity_pool_provider = ::Gapic::Config::Method.new delete_workload_identity_pool_provider_config
|
1353
|
+
undelete_workload_identity_pool_provider_config = parent_rpcs&.undelete_workload_identity_pool_provider if parent_rpcs&.respond_to? :undelete_workload_identity_pool_provider
|
1354
|
+
@undelete_workload_identity_pool_provider = ::Gapic::Config::Method.new undelete_workload_identity_pool_provider_config
|
1355
|
+
|
1356
|
+
yield self if block_given?
|
1357
|
+
end
|
1358
|
+
end
|
1359
|
+
end
|
1360
|
+
end
|
1361
|
+
end
|
1362
|
+
end
|
1363
|
+
end
|
1364
|
+
end
|