google-cloud-kms-v1 1.9.1 → 1.10.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 +4 -4
- data/lib/google/cloud/kms/v1/hsm_management/client.rb +1477 -0
- data/lib/google/cloud/kms/v1/hsm_management/credentials.rb +52 -0
- data/lib/google/cloud/kms/v1/hsm_management/operations.rb +841 -0
- data/lib/google/cloud/kms/v1/hsm_management/paths.rb +90 -0
- data/lib/google/cloud/kms/v1/hsm_management/rest/client.rb +1380 -0
- data/lib/google/cloud/kms/v1/hsm_management/rest/operations.rb +925 -0
- data/lib/google/cloud/kms/v1/hsm_management/rest/service_stub.rb +634 -0
- data/lib/google/cloud/kms/v1/hsm_management/rest.rb +60 -0
- data/lib/google/cloud/kms/v1/hsm_management.rb +62 -0
- data/lib/google/cloud/kms/v1/hsm_management_pb.rb +86 -0
- data/lib/google/cloud/kms/v1/hsm_management_services_pb.rb +91 -0
- data/lib/google/cloud/kms/v1/resources_pb.rb +1 -1
- data/lib/google/cloud/kms/v1/rest.rb +1 -0
- data/lib/google/cloud/kms/v1/service_pb.rb +1 -1
- data/lib/google/cloud/kms/v1/version.rb +1 -1
- data/lib/google/cloud/kms/v1.rb +1 -0
- data/proto_docs/google/cloud/kms/v1/hsm_management.rb +877 -0
- data/proto_docs/google/cloud/kms/v1/resources.rb +31 -1
- data/proto_docs/google/cloud/kms/v1/service.rb +6 -0
- metadata +13 -1
|
@@ -0,0 +1,1477 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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/cloud/kms/v1/hsm_management_pb"
|
|
21
|
+
require "google/cloud/location"
|
|
22
|
+
require "google/iam/v1"
|
|
23
|
+
|
|
24
|
+
module Google
|
|
25
|
+
module Cloud
|
|
26
|
+
module Kms
|
|
27
|
+
module V1
|
|
28
|
+
module HsmManagement
|
|
29
|
+
##
|
|
30
|
+
# Client for the HsmManagement service.
|
|
31
|
+
#
|
|
32
|
+
# Google Cloud HSM Management Service
|
|
33
|
+
#
|
|
34
|
+
# Provides interfaces for managing HSM instances.
|
|
35
|
+
#
|
|
36
|
+
# Implements a REST model with the following objects:
|
|
37
|
+
# * {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}
|
|
38
|
+
# * {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
39
|
+
#
|
|
40
|
+
class Client
|
|
41
|
+
# @private
|
|
42
|
+
API_VERSION = ""
|
|
43
|
+
|
|
44
|
+
# @private
|
|
45
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudkms.$UNIVERSE_DOMAIN$"
|
|
46
|
+
|
|
47
|
+
include Paths
|
|
48
|
+
|
|
49
|
+
# @private
|
|
50
|
+
attr_reader :hsm_management_stub
|
|
51
|
+
|
|
52
|
+
##
|
|
53
|
+
# Configure the HsmManagement Client class.
|
|
54
|
+
#
|
|
55
|
+
# See {::Google::Cloud::Kms::V1::HsmManagement::Client::Configuration}
|
|
56
|
+
# for a description of the configuration fields.
|
|
57
|
+
#
|
|
58
|
+
# @example
|
|
59
|
+
#
|
|
60
|
+
# # Modify the configuration for all HsmManagement clients
|
|
61
|
+
# ::Google::Cloud::Kms::V1::HsmManagement::Client.configure do |config|
|
|
62
|
+
# config.timeout = 10.0
|
|
63
|
+
# end
|
|
64
|
+
#
|
|
65
|
+
# @yield [config] Configure the Client client.
|
|
66
|
+
# @yieldparam config [Client::Configuration]
|
|
67
|
+
#
|
|
68
|
+
# @return [Client::Configuration]
|
|
69
|
+
#
|
|
70
|
+
def self.configure
|
|
71
|
+
@configure ||= begin
|
|
72
|
+
namespace = ["Google", "Cloud", "Kms", "V1"]
|
|
73
|
+
parent_config = while namespace.any?
|
|
74
|
+
parent_name = namespace.join "::"
|
|
75
|
+
parent_const = const_get parent_name
|
|
76
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
77
|
+
namespace.pop
|
|
78
|
+
end
|
|
79
|
+
default_config = Client::Configuration.new parent_config
|
|
80
|
+
|
|
81
|
+
default_config.rpcs.list_single_tenant_hsm_instances.timeout = 60.0
|
|
82
|
+
default_config.rpcs.list_single_tenant_hsm_instances.retry_policy = {
|
|
83
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
default_config.rpcs.get_single_tenant_hsm_instance.timeout = 60.0
|
|
87
|
+
default_config.rpcs.get_single_tenant_hsm_instance.retry_policy = {
|
|
88
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
default_config.rpcs.create_single_tenant_hsm_instance.timeout = 60.0
|
|
92
|
+
default_config.rpcs.create_single_tenant_hsm_instance.retry_policy = {
|
|
93
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
default_config.rpcs.create_single_tenant_hsm_instance_proposal.timeout = 60.0
|
|
97
|
+
default_config.rpcs.create_single_tenant_hsm_instance_proposal.retry_policy = {
|
|
98
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
default_config.rpcs.approve_single_tenant_hsm_instance_proposal.timeout = 60.0
|
|
102
|
+
default_config.rpcs.approve_single_tenant_hsm_instance_proposal.retry_policy = {
|
|
103
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
default_config.rpcs.execute_single_tenant_hsm_instance_proposal.timeout = 60.0
|
|
107
|
+
default_config.rpcs.execute_single_tenant_hsm_instance_proposal.retry_policy = {
|
|
108
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
default_config.rpcs.get_single_tenant_hsm_instance_proposal.timeout = 60.0
|
|
112
|
+
default_config.rpcs.get_single_tenant_hsm_instance_proposal.retry_policy = {
|
|
113
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
default_config.rpcs.list_single_tenant_hsm_instance_proposals.timeout = 60.0
|
|
117
|
+
default_config.rpcs.list_single_tenant_hsm_instance_proposals.retry_policy = {
|
|
118
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
default_config.rpcs.delete_single_tenant_hsm_instance_proposal.timeout = 60.0
|
|
122
|
+
default_config.rpcs.delete_single_tenant_hsm_instance_proposal.retry_policy = {
|
|
123
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
default_config
|
|
127
|
+
end
|
|
128
|
+
yield @configure if block_given?
|
|
129
|
+
@configure
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
##
|
|
133
|
+
# Configure the HsmManagement Client instance.
|
|
134
|
+
#
|
|
135
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
136
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
137
|
+
# should be made on {Client.configure}.
|
|
138
|
+
#
|
|
139
|
+
# See {::Google::Cloud::Kms::V1::HsmManagement::Client::Configuration}
|
|
140
|
+
# for a description of the configuration fields.
|
|
141
|
+
#
|
|
142
|
+
# @yield [config] Configure the Client client.
|
|
143
|
+
# @yieldparam config [Client::Configuration]
|
|
144
|
+
#
|
|
145
|
+
# @return [Client::Configuration]
|
|
146
|
+
#
|
|
147
|
+
def configure
|
|
148
|
+
yield @config if block_given?
|
|
149
|
+
@config
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
##
|
|
153
|
+
# The effective universe domain
|
|
154
|
+
#
|
|
155
|
+
# @return [String]
|
|
156
|
+
#
|
|
157
|
+
def universe_domain
|
|
158
|
+
@hsm_management_stub.universe_domain
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
##
|
|
162
|
+
# Create a new HsmManagement client object.
|
|
163
|
+
#
|
|
164
|
+
# @example
|
|
165
|
+
#
|
|
166
|
+
# # Create a client using the default configuration
|
|
167
|
+
# client = ::Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
168
|
+
#
|
|
169
|
+
# # Create a client using a custom configuration
|
|
170
|
+
# client = ::Google::Cloud::Kms::V1::HsmManagement::Client.new do |config|
|
|
171
|
+
# config.timeout = 10.0
|
|
172
|
+
# end
|
|
173
|
+
#
|
|
174
|
+
# @yield [config] Configure the HsmManagement client.
|
|
175
|
+
# @yieldparam config [Client::Configuration]
|
|
176
|
+
#
|
|
177
|
+
def initialize
|
|
178
|
+
# These require statements are intentionally placed here to initialize
|
|
179
|
+
# the gRPC module only when it's required.
|
|
180
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
181
|
+
require "gapic/grpc"
|
|
182
|
+
require "google/cloud/kms/v1/hsm_management_services_pb"
|
|
183
|
+
|
|
184
|
+
# Create the configuration object
|
|
185
|
+
@config = Configuration.new Client.configure
|
|
186
|
+
|
|
187
|
+
# Yield the configuration if needed
|
|
188
|
+
yield @config if block_given?
|
|
189
|
+
|
|
190
|
+
# Create credentials
|
|
191
|
+
credentials = @config.credentials
|
|
192
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
193
|
+
# but only if the default endpoint does not have a region prefix.
|
|
194
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
195
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
196
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
197
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
198
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
199
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
200
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
201
|
+
end
|
|
202
|
+
@quota_project_id = @config.quota_project
|
|
203
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
204
|
+
|
|
205
|
+
@operations_client = Operations.new do |config|
|
|
206
|
+
config.credentials = credentials
|
|
207
|
+
config.quota_project = @quota_project_id
|
|
208
|
+
config.endpoint = @config.endpoint
|
|
209
|
+
config.universe_domain = @config.universe_domain
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
@hsm_management_stub = ::Gapic::ServiceStub.new(
|
|
213
|
+
::Google::Cloud::Kms::V1::HsmManagement::Stub,
|
|
214
|
+
credentials: credentials,
|
|
215
|
+
endpoint: @config.endpoint,
|
|
216
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
217
|
+
universe_domain: @config.universe_domain,
|
|
218
|
+
channel_args: @config.channel_args,
|
|
219
|
+
interceptors: @config.interceptors,
|
|
220
|
+
channel_pool_config: @config.channel_pool,
|
|
221
|
+
logger: @config.logger
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
@hsm_management_stub.stub_logger&.info do |entry|
|
|
225
|
+
entry.set_system_name
|
|
226
|
+
entry.set_service
|
|
227
|
+
entry.message = "Created client for #{entry.service}"
|
|
228
|
+
entry.set_credentials_fields credentials
|
|
229
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
230
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
231
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
|
235
|
+
config.credentials = credentials
|
|
236
|
+
config.quota_project = @quota_project_id
|
|
237
|
+
config.endpoint = @hsm_management_stub.endpoint
|
|
238
|
+
config.universe_domain = @hsm_management_stub.universe_domain
|
|
239
|
+
config.logger = @hsm_management_stub.logger if config.respond_to? :logger=
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
|
243
|
+
config.credentials = credentials
|
|
244
|
+
config.quota_project = @quota_project_id
|
|
245
|
+
config.endpoint = @hsm_management_stub.endpoint
|
|
246
|
+
config.universe_domain = @hsm_management_stub.universe_domain
|
|
247
|
+
config.logger = @hsm_management_stub.logger if config.respond_to? :logger=
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
##
|
|
252
|
+
# Get the associated client for long-running operations.
|
|
253
|
+
#
|
|
254
|
+
# @return [::Google::Cloud::Kms::V1::HsmManagement::Operations]
|
|
255
|
+
#
|
|
256
|
+
attr_reader :operations_client
|
|
257
|
+
|
|
258
|
+
##
|
|
259
|
+
# Get the associated client for mix-in of the Locations.
|
|
260
|
+
#
|
|
261
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
|
262
|
+
#
|
|
263
|
+
attr_reader :location_client
|
|
264
|
+
|
|
265
|
+
##
|
|
266
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
267
|
+
#
|
|
268
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
|
269
|
+
#
|
|
270
|
+
attr_reader :iam_policy_client
|
|
271
|
+
|
|
272
|
+
##
|
|
273
|
+
# The logger used for request/response debug logging.
|
|
274
|
+
#
|
|
275
|
+
# @return [Logger]
|
|
276
|
+
#
|
|
277
|
+
def logger
|
|
278
|
+
@hsm_management_stub.logger
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Service calls
|
|
282
|
+
|
|
283
|
+
##
|
|
284
|
+
# Lists
|
|
285
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances}.
|
|
286
|
+
#
|
|
287
|
+
# @overload list_single_tenant_hsm_instances(request, options = nil)
|
|
288
|
+
# Pass arguments to `list_single_tenant_hsm_instances` via a request object, either of type
|
|
289
|
+
# {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest} or an equivalent Hash.
|
|
290
|
+
#
|
|
291
|
+
# @param request [::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest, ::Hash]
|
|
292
|
+
# A request object representing the call parameters. Required. To specify no
|
|
293
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
294
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
295
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
296
|
+
#
|
|
297
|
+
# @overload list_single_tenant_hsm_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
|
|
298
|
+
# Pass arguments to `list_single_tenant_hsm_instances` via keyword arguments. Note that at
|
|
299
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
300
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
301
|
+
#
|
|
302
|
+
# @param parent [::String]
|
|
303
|
+
# Required. The resource name of the location associated with the
|
|
304
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} to
|
|
305
|
+
# list, in the format `projects/*/locations/*`.
|
|
306
|
+
# @param page_size [::Integer]
|
|
307
|
+
# Optional. Optional limit on the number of
|
|
308
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} to
|
|
309
|
+
# include in the response. Further
|
|
310
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} can
|
|
311
|
+
# subsequently be
|
|
312
|
+
# obtained by including the
|
|
313
|
+
# {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesResponse#next_page_token ListSingleTenantHsmInstancesResponse.next_page_token}
|
|
314
|
+
# in a subsequent request. If unspecified, the server will pick an
|
|
315
|
+
# appropriate default.
|
|
316
|
+
# @param page_token [::String]
|
|
317
|
+
# Optional. Optional pagination token, returned earlier via
|
|
318
|
+
# {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesResponse#next_page_token ListSingleTenantHsmInstancesResponse.next_page_token}.
|
|
319
|
+
# @param filter [::String]
|
|
320
|
+
# Optional. Only include resources that match the filter in the response. For
|
|
321
|
+
# more information, see
|
|
322
|
+
# [Sorting and filtering list
|
|
323
|
+
# results](https://cloud.google.com/kms/docs/sorting-and-filtering).
|
|
324
|
+
# @param order_by [::String]
|
|
325
|
+
# Optional. Specify how the results should be sorted. If not specified, the
|
|
326
|
+
# results will be sorted in the default order. For more information, see
|
|
327
|
+
# [Sorting and filtering list
|
|
328
|
+
# results](https://cloud.google.com/kms/docs/sorting-and-filtering).
|
|
329
|
+
# @param show_deleted [::Boolean]
|
|
330
|
+
# Optional. If set to true,
|
|
331
|
+
# {::Google::Cloud::Kms::V1::HsmManagement::Client#list_single_tenant_hsm_instances HsmManagement.ListSingleTenantHsmInstances}
|
|
332
|
+
# will also return
|
|
333
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstances} in
|
|
334
|
+
# DELETED state.
|
|
335
|
+
#
|
|
336
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
337
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstance>]
|
|
338
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
339
|
+
#
|
|
340
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstance>]
|
|
341
|
+
#
|
|
342
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
343
|
+
#
|
|
344
|
+
# @example Basic example
|
|
345
|
+
# require "google/cloud/kms/v1"
|
|
346
|
+
#
|
|
347
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
348
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
349
|
+
#
|
|
350
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
351
|
+
# request = Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest.new
|
|
352
|
+
#
|
|
353
|
+
# # Call the list_single_tenant_hsm_instances method.
|
|
354
|
+
# result = client.list_single_tenant_hsm_instances request
|
|
355
|
+
#
|
|
356
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
357
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
358
|
+
# result.each do |item|
|
|
359
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::SingleTenantHsmInstance.
|
|
360
|
+
# p item
|
|
361
|
+
# end
|
|
362
|
+
#
|
|
363
|
+
def list_single_tenant_hsm_instances request, options = nil
|
|
364
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
365
|
+
|
|
366
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ListSingleTenantHsmInstancesRequest
|
|
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.list_single_tenant_hsm_instances.metadata.to_h
|
|
373
|
+
|
|
374
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Cloud::Kms::V1::VERSION
|
|
378
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
379
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
380
|
+
|
|
381
|
+
header_params = {}
|
|
382
|
+
if request.parent
|
|
383
|
+
header_params["parent"] = request.parent
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
387
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
388
|
+
|
|
389
|
+
options.apply_defaults timeout: @config.rpcs.list_single_tenant_hsm_instances.timeout,
|
|
390
|
+
metadata: metadata,
|
|
391
|
+
retry_policy: @config.rpcs.list_single_tenant_hsm_instances.retry_policy
|
|
392
|
+
|
|
393
|
+
options.apply_defaults timeout: @config.timeout,
|
|
394
|
+
metadata: @config.metadata,
|
|
395
|
+
retry_policy: @config.retry_policy
|
|
396
|
+
|
|
397
|
+
@hsm_management_stub.call_rpc :list_single_tenant_hsm_instances, request, options: options do |response, operation|
|
|
398
|
+
response = ::Gapic::PagedEnumerable.new @hsm_management_stub, :list_single_tenant_hsm_instances, request, response, operation, options
|
|
399
|
+
yield response, operation if block_given?
|
|
400
|
+
throw :response, response
|
|
401
|
+
end
|
|
402
|
+
rescue ::GRPC::BadStatus => e
|
|
403
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
##
|
|
407
|
+
# Returns metadata for a given
|
|
408
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}.
|
|
409
|
+
#
|
|
410
|
+
# @overload get_single_tenant_hsm_instance(request, options = nil)
|
|
411
|
+
# Pass arguments to `get_single_tenant_hsm_instance` via a request object, either of type
|
|
412
|
+
# {::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest} or an equivalent Hash.
|
|
413
|
+
#
|
|
414
|
+
# @param request [::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest, ::Hash]
|
|
415
|
+
# A request object representing the call parameters. Required. To specify no
|
|
416
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
417
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
418
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
419
|
+
#
|
|
420
|
+
# @overload get_single_tenant_hsm_instance(name: nil)
|
|
421
|
+
# Pass arguments to `get_single_tenant_hsm_instance` via keyword arguments. Note that at
|
|
422
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
423
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
424
|
+
#
|
|
425
|
+
# @param name [::String]
|
|
426
|
+
# Required. The {::Google::Cloud::Kms::V1::SingleTenantHsmInstance#name name} of
|
|
427
|
+
# the {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}
|
|
428
|
+
# to get.
|
|
429
|
+
#
|
|
430
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
431
|
+
# @yieldparam response [::Google::Cloud::Kms::V1::SingleTenantHsmInstance]
|
|
432
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
433
|
+
#
|
|
434
|
+
# @return [::Google::Cloud::Kms::V1::SingleTenantHsmInstance]
|
|
435
|
+
#
|
|
436
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
437
|
+
#
|
|
438
|
+
# @example Basic example
|
|
439
|
+
# require "google/cloud/kms/v1"
|
|
440
|
+
#
|
|
441
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
442
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
443
|
+
#
|
|
444
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
445
|
+
# request = Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest.new
|
|
446
|
+
#
|
|
447
|
+
# # Call the get_single_tenant_hsm_instance method.
|
|
448
|
+
# result = client.get_single_tenant_hsm_instance request
|
|
449
|
+
#
|
|
450
|
+
# # The returned object is of type Google::Cloud::Kms::V1::SingleTenantHsmInstance.
|
|
451
|
+
# p result
|
|
452
|
+
#
|
|
453
|
+
def get_single_tenant_hsm_instance request, options = nil
|
|
454
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
455
|
+
|
|
456
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceRequest
|
|
457
|
+
|
|
458
|
+
# Converts hash and nil to an options object
|
|
459
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
460
|
+
|
|
461
|
+
# Customize the options with defaults
|
|
462
|
+
metadata = @config.rpcs.get_single_tenant_hsm_instance.metadata.to_h
|
|
463
|
+
|
|
464
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
465
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
466
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
467
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
468
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
469
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
470
|
+
|
|
471
|
+
header_params = {}
|
|
472
|
+
if request.name
|
|
473
|
+
header_params["name"] = request.name
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
477
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
478
|
+
|
|
479
|
+
options.apply_defaults timeout: @config.rpcs.get_single_tenant_hsm_instance.timeout,
|
|
480
|
+
metadata: metadata,
|
|
481
|
+
retry_policy: @config.rpcs.get_single_tenant_hsm_instance.retry_policy
|
|
482
|
+
|
|
483
|
+
options.apply_defaults timeout: @config.timeout,
|
|
484
|
+
metadata: @config.metadata,
|
|
485
|
+
retry_policy: @config.retry_policy
|
|
486
|
+
|
|
487
|
+
@hsm_management_stub.call_rpc :get_single_tenant_hsm_instance, request, options: options do |response, operation|
|
|
488
|
+
yield response, operation if block_given?
|
|
489
|
+
end
|
|
490
|
+
rescue ::GRPC::BadStatus => e
|
|
491
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
##
|
|
495
|
+
# Creates a new
|
|
496
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance} in a
|
|
497
|
+
# given Project and Location. User must create a RegisterTwoFactorAuthKeys
|
|
498
|
+
# proposal with this single-tenant HSM instance to finish setup of the
|
|
499
|
+
# instance.
|
|
500
|
+
#
|
|
501
|
+
# @overload create_single_tenant_hsm_instance(request, options = nil)
|
|
502
|
+
# Pass arguments to `create_single_tenant_hsm_instance` via a request object, either of type
|
|
503
|
+
# {::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest} or an equivalent Hash.
|
|
504
|
+
#
|
|
505
|
+
# @param request [::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest, ::Hash]
|
|
506
|
+
# A request object representing the call parameters. Required. To specify no
|
|
507
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
508
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
509
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
510
|
+
#
|
|
511
|
+
# @overload create_single_tenant_hsm_instance(parent: nil, single_tenant_hsm_instance_id: nil, single_tenant_hsm_instance: nil)
|
|
512
|
+
# Pass arguments to `create_single_tenant_hsm_instance` via keyword arguments. Note that at
|
|
513
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
514
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
515
|
+
#
|
|
516
|
+
# @param parent [::String]
|
|
517
|
+
# Required. The resource name of the location associated with the
|
|
518
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}, in
|
|
519
|
+
# the format `projects/*/locations/*`.
|
|
520
|
+
# @param single_tenant_hsm_instance_id [::String]
|
|
521
|
+
# Optional. It must be unique within a location and match the regular
|
|
522
|
+
# expression `[a-zA-Z0-9_-]{1,63}`.
|
|
523
|
+
# @param single_tenant_hsm_instance [::Google::Cloud::Kms::V1::SingleTenantHsmInstance, ::Hash]
|
|
524
|
+
# Required. An
|
|
525
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance} with
|
|
526
|
+
# initial field values.
|
|
527
|
+
#
|
|
528
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
529
|
+
# @yieldparam response [::Gapic::Operation]
|
|
530
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
531
|
+
#
|
|
532
|
+
# @return [::Gapic::Operation]
|
|
533
|
+
#
|
|
534
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
535
|
+
#
|
|
536
|
+
# @example Basic example
|
|
537
|
+
# require "google/cloud/kms/v1"
|
|
538
|
+
#
|
|
539
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
540
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
541
|
+
#
|
|
542
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
543
|
+
# request = Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest.new
|
|
544
|
+
#
|
|
545
|
+
# # Call the create_single_tenant_hsm_instance method.
|
|
546
|
+
# result = client.create_single_tenant_hsm_instance request
|
|
547
|
+
#
|
|
548
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
549
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
550
|
+
# # Here is how to wait for a response.
|
|
551
|
+
# result.wait_until_done! timeout: 60
|
|
552
|
+
# if result.response?
|
|
553
|
+
# p result.response
|
|
554
|
+
# else
|
|
555
|
+
# puts "No response received."
|
|
556
|
+
# end
|
|
557
|
+
#
|
|
558
|
+
def create_single_tenant_hsm_instance request, options = nil
|
|
559
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
560
|
+
|
|
561
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceRequest
|
|
562
|
+
|
|
563
|
+
# Converts hash and nil to an options object
|
|
564
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
565
|
+
|
|
566
|
+
# Customize the options with defaults
|
|
567
|
+
metadata = @config.rpcs.create_single_tenant_hsm_instance.metadata.to_h
|
|
568
|
+
|
|
569
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
570
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
571
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
572
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
573
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
574
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
575
|
+
|
|
576
|
+
header_params = {}
|
|
577
|
+
if request.parent
|
|
578
|
+
header_params["parent"] = request.parent
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
582
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
583
|
+
|
|
584
|
+
options.apply_defaults timeout: @config.rpcs.create_single_tenant_hsm_instance.timeout,
|
|
585
|
+
metadata: metadata,
|
|
586
|
+
retry_policy: @config.rpcs.create_single_tenant_hsm_instance.retry_policy
|
|
587
|
+
|
|
588
|
+
options.apply_defaults timeout: @config.timeout,
|
|
589
|
+
metadata: @config.metadata,
|
|
590
|
+
retry_policy: @config.retry_policy
|
|
591
|
+
|
|
592
|
+
@hsm_management_stub.call_rpc :create_single_tenant_hsm_instance, request, options: options do |response, operation|
|
|
593
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
594
|
+
yield response, operation if block_given?
|
|
595
|
+
throw :response, response
|
|
596
|
+
end
|
|
597
|
+
rescue ::GRPC::BadStatus => e
|
|
598
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
##
|
|
602
|
+
# Creates a new
|
|
603
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
604
|
+
# for a given
|
|
605
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}.
|
|
606
|
+
#
|
|
607
|
+
# @overload create_single_tenant_hsm_instance_proposal(request, options = nil)
|
|
608
|
+
# Pass arguments to `create_single_tenant_hsm_instance_proposal` via a request object, either of type
|
|
609
|
+
# {::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
|
|
610
|
+
#
|
|
611
|
+
# @param request [::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest, ::Hash]
|
|
612
|
+
# A request object representing the call parameters. Required. To specify no
|
|
613
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
614
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
615
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
616
|
+
#
|
|
617
|
+
# @overload create_single_tenant_hsm_instance_proposal(parent: nil, single_tenant_hsm_instance_proposal_id: nil, single_tenant_hsm_instance_proposal: nil)
|
|
618
|
+
# Pass arguments to `create_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
|
|
619
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
620
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
621
|
+
#
|
|
622
|
+
# @param parent [::String]
|
|
623
|
+
# Required. The {::Google::Cloud::Kms::V1::SingleTenantHsmInstance#name name} of
|
|
624
|
+
# the {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}
|
|
625
|
+
# associated with the
|
|
626
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}.
|
|
627
|
+
# @param single_tenant_hsm_instance_proposal_id [::String]
|
|
628
|
+
# Optional. It must be unique within a location and match the regular
|
|
629
|
+
# expression `[a-zA-Z0-9_-]{1,63}`.
|
|
630
|
+
# @param single_tenant_hsm_instance_proposal [::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal, ::Hash]
|
|
631
|
+
# Required. The
|
|
632
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
633
|
+
# to create.
|
|
634
|
+
#
|
|
635
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
636
|
+
# @yieldparam response [::Gapic::Operation]
|
|
637
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
638
|
+
#
|
|
639
|
+
# @return [::Gapic::Operation]
|
|
640
|
+
#
|
|
641
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
642
|
+
#
|
|
643
|
+
# @example Basic example
|
|
644
|
+
# require "google/cloud/kms/v1"
|
|
645
|
+
#
|
|
646
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
647
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
648
|
+
#
|
|
649
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
650
|
+
# request = Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest.new
|
|
651
|
+
#
|
|
652
|
+
# # Call the create_single_tenant_hsm_instance_proposal method.
|
|
653
|
+
# result = client.create_single_tenant_hsm_instance_proposal request
|
|
654
|
+
#
|
|
655
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
656
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
657
|
+
# # Here is how to wait for a response.
|
|
658
|
+
# result.wait_until_done! timeout: 60
|
|
659
|
+
# if result.response?
|
|
660
|
+
# p result.response
|
|
661
|
+
# else
|
|
662
|
+
# puts "No response received."
|
|
663
|
+
# end
|
|
664
|
+
#
|
|
665
|
+
def create_single_tenant_hsm_instance_proposal request, options = nil
|
|
666
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
667
|
+
|
|
668
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::CreateSingleTenantHsmInstanceProposalRequest
|
|
669
|
+
|
|
670
|
+
# Converts hash and nil to an options object
|
|
671
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
672
|
+
|
|
673
|
+
# Customize the options with defaults
|
|
674
|
+
metadata = @config.rpcs.create_single_tenant_hsm_instance_proposal.metadata.to_h
|
|
675
|
+
|
|
676
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
677
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
678
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
679
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
680
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
681
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
682
|
+
|
|
683
|
+
header_params = {}
|
|
684
|
+
if request.parent
|
|
685
|
+
header_params["parent"] = request.parent
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
689
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
690
|
+
|
|
691
|
+
options.apply_defaults timeout: @config.rpcs.create_single_tenant_hsm_instance_proposal.timeout,
|
|
692
|
+
metadata: metadata,
|
|
693
|
+
retry_policy: @config.rpcs.create_single_tenant_hsm_instance_proposal.retry_policy
|
|
694
|
+
|
|
695
|
+
options.apply_defaults timeout: @config.timeout,
|
|
696
|
+
metadata: @config.metadata,
|
|
697
|
+
retry_policy: @config.retry_policy
|
|
698
|
+
|
|
699
|
+
@hsm_management_stub.call_rpc :create_single_tenant_hsm_instance_proposal, request, options: options do |response, operation|
|
|
700
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
701
|
+
yield response, operation if block_given?
|
|
702
|
+
throw :response, response
|
|
703
|
+
end
|
|
704
|
+
rescue ::GRPC::BadStatus => e
|
|
705
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
##
|
|
709
|
+
# Approves a
|
|
710
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
711
|
+
# for a given
|
|
712
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}. The
|
|
713
|
+
# proposal must be in the
|
|
714
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::State::PENDING PENDING}
|
|
715
|
+
# state.
|
|
716
|
+
#
|
|
717
|
+
# @overload approve_single_tenant_hsm_instance_proposal(request, options = nil)
|
|
718
|
+
# Pass arguments to `approve_single_tenant_hsm_instance_proposal` via a request object, either of type
|
|
719
|
+
# {::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
|
|
720
|
+
#
|
|
721
|
+
# @param request [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest, ::Hash]
|
|
722
|
+
# A request object representing the call parameters. Required. To specify no
|
|
723
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
724
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
725
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
726
|
+
#
|
|
727
|
+
# @overload approve_single_tenant_hsm_instance_proposal(name: nil, quorum_reply: nil, required_action_quorum_reply: nil)
|
|
728
|
+
# Pass arguments to `approve_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
|
|
729
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
730
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
731
|
+
#
|
|
732
|
+
# @param name [::String]
|
|
733
|
+
# Required. The
|
|
734
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
|
|
735
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
736
|
+
# to approve.
|
|
737
|
+
# @param quorum_reply [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest::QuorumReply, ::Hash]
|
|
738
|
+
# Required. The reply to
|
|
739
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::QuorumParameters QuorumParameters}
|
|
740
|
+
# for approving the proposal.
|
|
741
|
+
#
|
|
742
|
+
# Note: The following parameters are mutually exclusive: `quorum_reply`, `required_action_quorum_reply`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
|
|
743
|
+
# @param required_action_quorum_reply [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest::RequiredActionQuorumReply, ::Hash]
|
|
744
|
+
# Required. The reply to
|
|
745
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::RequiredActionQuorumParameters RequiredActionQuorumParameters}
|
|
746
|
+
# for approving the proposal.
|
|
747
|
+
#
|
|
748
|
+
# Note: The following parameters are mutually exclusive: `required_action_quorum_reply`, `quorum_reply`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
|
|
749
|
+
#
|
|
750
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
751
|
+
# @yieldparam response [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalResponse]
|
|
752
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
753
|
+
#
|
|
754
|
+
# @return [::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalResponse]
|
|
755
|
+
#
|
|
756
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
757
|
+
#
|
|
758
|
+
# @example Basic example
|
|
759
|
+
# require "google/cloud/kms/v1"
|
|
760
|
+
#
|
|
761
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
762
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
763
|
+
#
|
|
764
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
765
|
+
# request = Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest.new
|
|
766
|
+
#
|
|
767
|
+
# # Call the approve_single_tenant_hsm_instance_proposal method.
|
|
768
|
+
# result = client.approve_single_tenant_hsm_instance_proposal request
|
|
769
|
+
#
|
|
770
|
+
# # The returned object is of type Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalResponse.
|
|
771
|
+
# p result
|
|
772
|
+
#
|
|
773
|
+
def approve_single_tenant_hsm_instance_proposal request, options = nil
|
|
774
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
775
|
+
|
|
776
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ApproveSingleTenantHsmInstanceProposalRequest
|
|
777
|
+
|
|
778
|
+
# Converts hash and nil to an options object
|
|
779
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
780
|
+
|
|
781
|
+
# Customize the options with defaults
|
|
782
|
+
metadata = @config.rpcs.approve_single_tenant_hsm_instance_proposal.metadata.to_h
|
|
783
|
+
|
|
784
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
785
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
786
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
787
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
788
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
789
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
790
|
+
|
|
791
|
+
header_params = {}
|
|
792
|
+
if request.name
|
|
793
|
+
header_params["name"] = request.name
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
797
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
798
|
+
|
|
799
|
+
options.apply_defaults timeout: @config.rpcs.approve_single_tenant_hsm_instance_proposal.timeout,
|
|
800
|
+
metadata: metadata,
|
|
801
|
+
retry_policy: @config.rpcs.approve_single_tenant_hsm_instance_proposal.retry_policy
|
|
802
|
+
|
|
803
|
+
options.apply_defaults timeout: @config.timeout,
|
|
804
|
+
metadata: @config.metadata,
|
|
805
|
+
retry_policy: @config.retry_policy
|
|
806
|
+
|
|
807
|
+
@hsm_management_stub.call_rpc :approve_single_tenant_hsm_instance_proposal, request, options: options do |response, operation|
|
|
808
|
+
yield response, operation if block_given?
|
|
809
|
+
end
|
|
810
|
+
rescue ::GRPC::BadStatus => e
|
|
811
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
##
|
|
815
|
+
# Executes a
|
|
816
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
817
|
+
# for a given
|
|
818
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstance SingleTenantHsmInstance}. The
|
|
819
|
+
# proposal must be in the
|
|
820
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal::State::APPROVED APPROVED}
|
|
821
|
+
# state.
|
|
822
|
+
#
|
|
823
|
+
# @overload execute_single_tenant_hsm_instance_proposal(request, options = nil)
|
|
824
|
+
# Pass arguments to `execute_single_tenant_hsm_instance_proposal` via a request object, either of type
|
|
825
|
+
# {::Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
|
|
826
|
+
#
|
|
827
|
+
# @param request [::Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest, ::Hash]
|
|
828
|
+
# A request object representing the call parameters. Required. To specify no
|
|
829
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
830
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
831
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
832
|
+
#
|
|
833
|
+
# @overload execute_single_tenant_hsm_instance_proposal(name: nil)
|
|
834
|
+
# Pass arguments to `execute_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
|
|
835
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
836
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
837
|
+
#
|
|
838
|
+
# @param name [::String]
|
|
839
|
+
# Required. The
|
|
840
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
|
|
841
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
842
|
+
# to execute.
|
|
843
|
+
#
|
|
844
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
845
|
+
# @yieldparam response [::Gapic::Operation]
|
|
846
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
847
|
+
#
|
|
848
|
+
# @return [::Gapic::Operation]
|
|
849
|
+
#
|
|
850
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
851
|
+
#
|
|
852
|
+
# @example Basic example
|
|
853
|
+
# require "google/cloud/kms/v1"
|
|
854
|
+
#
|
|
855
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
856
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
857
|
+
#
|
|
858
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
859
|
+
# request = Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest.new
|
|
860
|
+
#
|
|
861
|
+
# # Call the execute_single_tenant_hsm_instance_proposal method.
|
|
862
|
+
# result = client.execute_single_tenant_hsm_instance_proposal request
|
|
863
|
+
#
|
|
864
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
865
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
866
|
+
# # Here is how to wait for a response.
|
|
867
|
+
# result.wait_until_done! timeout: 60
|
|
868
|
+
# if result.response?
|
|
869
|
+
# p result.response
|
|
870
|
+
# else
|
|
871
|
+
# puts "No response received."
|
|
872
|
+
# end
|
|
873
|
+
#
|
|
874
|
+
def execute_single_tenant_hsm_instance_proposal request, options = nil
|
|
875
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
876
|
+
|
|
877
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ExecuteSingleTenantHsmInstanceProposalRequest
|
|
878
|
+
|
|
879
|
+
# Converts hash and nil to an options object
|
|
880
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
881
|
+
|
|
882
|
+
# Customize the options with defaults
|
|
883
|
+
metadata = @config.rpcs.execute_single_tenant_hsm_instance_proposal.metadata.to_h
|
|
884
|
+
|
|
885
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
886
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
887
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
888
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
889
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
890
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
891
|
+
|
|
892
|
+
header_params = {}
|
|
893
|
+
if request.name
|
|
894
|
+
header_params["name"] = request.name
|
|
895
|
+
end
|
|
896
|
+
|
|
897
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
898
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
899
|
+
|
|
900
|
+
options.apply_defaults timeout: @config.rpcs.execute_single_tenant_hsm_instance_proposal.timeout,
|
|
901
|
+
metadata: metadata,
|
|
902
|
+
retry_policy: @config.rpcs.execute_single_tenant_hsm_instance_proposal.retry_policy
|
|
903
|
+
|
|
904
|
+
options.apply_defaults timeout: @config.timeout,
|
|
905
|
+
metadata: @config.metadata,
|
|
906
|
+
retry_policy: @config.retry_policy
|
|
907
|
+
|
|
908
|
+
@hsm_management_stub.call_rpc :execute_single_tenant_hsm_instance_proposal, request, options: options do |response, operation|
|
|
909
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
910
|
+
yield response, operation if block_given?
|
|
911
|
+
throw :response, response
|
|
912
|
+
end
|
|
913
|
+
rescue ::GRPC::BadStatus => e
|
|
914
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
##
|
|
918
|
+
# Returns metadata for a given
|
|
919
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}.
|
|
920
|
+
#
|
|
921
|
+
# @overload get_single_tenant_hsm_instance_proposal(request, options = nil)
|
|
922
|
+
# Pass arguments to `get_single_tenant_hsm_instance_proposal` via a request object, either of type
|
|
923
|
+
# {::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
|
|
924
|
+
#
|
|
925
|
+
# @param request [::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest, ::Hash]
|
|
926
|
+
# A request object representing the call parameters. Required. To specify no
|
|
927
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
928
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
929
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
930
|
+
#
|
|
931
|
+
# @overload get_single_tenant_hsm_instance_proposal(name: nil)
|
|
932
|
+
# Pass arguments to `get_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
|
|
933
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
934
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
935
|
+
#
|
|
936
|
+
# @param name [::String]
|
|
937
|
+
# Required. The
|
|
938
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
|
|
939
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
940
|
+
# to get.
|
|
941
|
+
#
|
|
942
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
943
|
+
# @yieldparam response [::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal]
|
|
944
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
945
|
+
#
|
|
946
|
+
# @return [::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal]
|
|
947
|
+
#
|
|
948
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
949
|
+
#
|
|
950
|
+
# @example Basic example
|
|
951
|
+
# require "google/cloud/kms/v1"
|
|
952
|
+
#
|
|
953
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
954
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
955
|
+
#
|
|
956
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
957
|
+
# request = Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest.new
|
|
958
|
+
#
|
|
959
|
+
# # Call the get_single_tenant_hsm_instance_proposal method.
|
|
960
|
+
# result = client.get_single_tenant_hsm_instance_proposal request
|
|
961
|
+
#
|
|
962
|
+
# # The returned object is of type Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal.
|
|
963
|
+
# p result
|
|
964
|
+
#
|
|
965
|
+
def get_single_tenant_hsm_instance_proposal request, options = nil
|
|
966
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
967
|
+
|
|
968
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::GetSingleTenantHsmInstanceProposalRequest
|
|
969
|
+
|
|
970
|
+
# Converts hash and nil to an options object
|
|
971
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
972
|
+
|
|
973
|
+
# Customize the options with defaults
|
|
974
|
+
metadata = @config.rpcs.get_single_tenant_hsm_instance_proposal.metadata.to_h
|
|
975
|
+
|
|
976
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
977
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
978
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
979
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
980
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
981
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
982
|
+
|
|
983
|
+
header_params = {}
|
|
984
|
+
if request.name
|
|
985
|
+
header_params["name"] = request.name
|
|
986
|
+
end
|
|
987
|
+
|
|
988
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
989
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
990
|
+
|
|
991
|
+
options.apply_defaults timeout: @config.rpcs.get_single_tenant_hsm_instance_proposal.timeout,
|
|
992
|
+
metadata: metadata,
|
|
993
|
+
retry_policy: @config.rpcs.get_single_tenant_hsm_instance_proposal.retry_policy
|
|
994
|
+
|
|
995
|
+
options.apply_defaults timeout: @config.timeout,
|
|
996
|
+
metadata: @config.metadata,
|
|
997
|
+
retry_policy: @config.retry_policy
|
|
998
|
+
|
|
999
|
+
@hsm_management_stub.call_rpc :get_single_tenant_hsm_instance_proposal, request, options: options do |response, operation|
|
|
1000
|
+
yield response, operation if block_given?
|
|
1001
|
+
end
|
|
1002
|
+
rescue ::GRPC::BadStatus => e
|
|
1003
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1004
|
+
end
|
|
1005
|
+
|
|
1006
|
+
##
|
|
1007
|
+
# Lists
|
|
1008
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}.
|
|
1009
|
+
#
|
|
1010
|
+
# @overload list_single_tenant_hsm_instance_proposals(request, options = nil)
|
|
1011
|
+
# Pass arguments to `list_single_tenant_hsm_instance_proposals` via a request object, either of type
|
|
1012
|
+
# {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest} or an equivalent Hash.
|
|
1013
|
+
#
|
|
1014
|
+
# @param request [::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest, ::Hash]
|
|
1015
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1016
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1017
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1018
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1019
|
+
#
|
|
1020
|
+
# @overload list_single_tenant_hsm_instance_proposals(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
|
|
1021
|
+
# Pass arguments to `list_single_tenant_hsm_instance_proposals` via keyword arguments. Note that at
|
|
1022
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1023
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1024
|
+
#
|
|
1025
|
+
# @param parent [::String]
|
|
1026
|
+
# Required. The resource name of the single tenant HSM instance associated
|
|
1027
|
+
# with the
|
|
1028
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
|
|
1029
|
+
# to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`.
|
|
1030
|
+
# @param page_size [::Integer]
|
|
1031
|
+
# Optional. Optional limit on the number of
|
|
1032
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
|
|
1033
|
+
# to include in the response. Further
|
|
1034
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
|
|
1035
|
+
# can subsequently be obtained by including the
|
|
1036
|
+
# {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsResponse#next_page_token ListSingleTenantHsmInstanceProposalsResponse.next_page_token}
|
|
1037
|
+
# in a subsequent request. If unspecified, the server will pick an
|
|
1038
|
+
# appropriate default.
|
|
1039
|
+
# @param page_token [::String]
|
|
1040
|
+
# Optional. Optional pagination token, returned earlier via
|
|
1041
|
+
# {::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsResponse#next_page_token ListSingleTenantHsmInstanceProposalsResponse.next_page_token}.
|
|
1042
|
+
# @param filter [::String]
|
|
1043
|
+
# Optional. Only include resources that match the filter in the response. For
|
|
1044
|
+
# more information, see
|
|
1045
|
+
# [Sorting and filtering list
|
|
1046
|
+
# results](https://cloud.google.com/kms/docs/sorting-and-filtering).
|
|
1047
|
+
# @param order_by [::String]
|
|
1048
|
+
# Optional. Specify how the results should be sorted. If not specified, the
|
|
1049
|
+
# results will be sorted in the default order. For more information, see
|
|
1050
|
+
# [Sorting and filtering list
|
|
1051
|
+
# results](https://cloud.google.com/kms/docs/sorting-and-filtering).
|
|
1052
|
+
# @param show_deleted [::Boolean]
|
|
1053
|
+
# Optional. If set to true,
|
|
1054
|
+
# {::Google::Cloud::Kms::V1::HsmManagement::Client#list_single_tenant_hsm_instance_proposals HsmManagement.ListSingleTenantHsmInstanceProposals}
|
|
1055
|
+
# will also return
|
|
1056
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposals}
|
|
1057
|
+
# in DELETED state.
|
|
1058
|
+
#
|
|
1059
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1060
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal>]
|
|
1061
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1062
|
+
#
|
|
1063
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal>]
|
|
1064
|
+
#
|
|
1065
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1066
|
+
#
|
|
1067
|
+
# @example Basic example
|
|
1068
|
+
# require "google/cloud/kms/v1"
|
|
1069
|
+
#
|
|
1070
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1071
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
1072
|
+
#
|
|
1073
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1074
|
+
# request = Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest.new
|
|
1075
|
+
#
|
|
1076
|
+
# # Call the list_single_tenant_hsm_instance_proposals method.
|
|
1077
|
+
# result = client.list_single_tenant_hsm_instance_proposals request
|
|
1078
|
+
#
|
|
1079
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1080
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1081
|
+
# result.each do |item|
|
|
1082
|
+
# # Each element is of type ::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal.
|
|
1083
|
+
# p item
|
|
1084
|
+
# end
|
|
1085
|
+
#
|
|
1086
|
+
def list_single_tenant_hsm_instance_proposals request, options = nil
|
|
1087
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1088
|
+
|
|
1089
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::ListSingleTenantHsmInstanceProposalsRequest
|
|
1090
|
+
|
|
1091
|
+
# Converts hash and nil to an options object
|
|
1092
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1093
|
+
|
|
1094
|
+
# Customize the options with defaults
|
|
1095
|
+
metadata = @config.rpcs.list_single_tenant_hsm_instance_proposals.metadata.to_h
|
|
1096
|
+
|
|
1097
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1098
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1099
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1100
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
1101
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1102
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1103
|
+
|
|
1104
|
+
header_params = {}
|
|
1105
|
+
if request.parent
|
|
1106
|
+
header_params["parent"] = request.parent
|
|
1107
|
+
end
|
|
1108
|
+
|
|
1109
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1110
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1111
|
+
|
|
1112
|
+
options.apply_defaults timeout: @config.rpcs.list_single_tenant_hsm_instance_proposals.timeout,
|
|
1113
|
+
metadata: metadata,
|
|
1114
|
+
retry_policy: @config.rpcs.list_single_tenant_hsm_instance_proposals.retry_policy
|
|
1115
|
+
|
|
1116
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1117
|
+
metadata: @config.metadata,
|
|
1118
|
+
retry_policy: @config.retry_policy
|
|
1119
|
+
|
|
1120
|
+
@hsm_management_stub.call_rpc :list_single_tenant_hsm_instance_proposals, request, options: options do |response, operation|
|
|
1121
|
+
response = ::Gapic::PagedEnumerable.new @hsm_management_stub, :list_single_tenant_hsm_instance_proposals, request, response, operation, options
|
|
1122
|
+
yield response, operation if block_given?
|
|
1123
|
+
throw :response, response
|
|
1124
|
+
end
|
|
1125
|
+
rescue ::GRPC::BadStatus => e
|
|
1126
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1127
|
+
end
|
|
1128
|
+
|
|
1129
|
+
##
|
|
1130
|
+
# Deletes a
|
|
1131
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}.
|
|
1132
|
+
#
|
|
1133
|
+
# @overload delete_single_tenant_hsm_instance_proposal(request, options = nil)
|
|
1134
|
+
# Pass arguments to `delete_single_tenant_hsm_instance_proposal` via a request object, either of type
|
|
1135
|
+
# {::Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest} or an equivalent Hash.
|
|
1136
|
+
#
|
|
1137
|
+
# @param request [::Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest, ::Hash]
|
|
1138
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1139
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1140
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1141
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1142
|
+
#
|
|
1143
|
+
# @overload delete_single_tenant_hsm_instance_proposal(name: nil)
|
|
1144
|
+
# Pass arguments to `delete_single_tenant_hsm_instance_proposal` via keyword arguments. Note that at
|
|
1145
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1146
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1147
|
+
#
|
|
1148
|
+
# @param name [::String]
|
|
1149
|
+
# Required. The
|
|
1150
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal#name name} of the
|
|
1151
|
+
# {::Google::Cloud::Kms::V1::SingleTenantHsmInstanceProposal SingleTenantHsmInstanceProposal}
|
|
1152
|
+
# to delete.
|
|
1153
|
+
#
|
|
1154
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1155
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
|
1156
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1157
|
+
#
|
|
1158
|
+
# @return [::Google::Protobuf::Empty]
|
|
1159
|
+
#
|
|
1160
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1161
|
+
#
|
|
1162
|
+
# @example Basic example
|
|
1163
|
+
# require "google/cloud/kms/v1"
|
|
1164
|
+
#
|
|
1165
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1166
|
+
# client = Google::Cloud::Kms::V1::HsmManagement::Client.new
|
|
1167
|
+
#
|
|
1168
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1169
|
+
# request = Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest.new
|
|
1170
|
+
#
|
|
1171
|
+
# # Call the delete_single_tenant_hsm_instance_proposal method.
|
|
1172
|
+
# result = client.delete_single_tenant_hsm_instance_proposal request
|
|
1173
|
+
#
|
|
1174
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
1175
|
+
# p result
|
|
1176
|
+
#
|
|
1177
|
+
def delete_single_tenant_hsm_instance_proposal request, options = nil
|
|
1178
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1179
|
+
|
|
1180
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Kms::V1::DeleteSingleTenantHsmInstanceProposalRequest
|
|
1181
|
+
|
|
1182
|
+
# Converts hash and nil to an options object
|
|
1183
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1184
|
+
|
|
1185
|
+
# Customize the options with defaults
|
|
1186
|
+
metadata = @config.rpcs.delete_single_tenant_hsm_instance_proposal.metadata.to_h
|
|
1187
|
+
|
|
1188
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1189
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1190
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1191
|
+
gapic_version: ::Google::Cloud::Kms::V1::VERSION
|
|
1192
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1193
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1194
|
+
|
|
1195
|
+
header_params = {}
|
|
1196
|
+
if request.name
|
|
1197
|
+
header_params["name"] = request.name
|
|
1198
|
+
end
|
|
1199
|
+
|
|
1200
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1201
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1202
|
+
|
|
1203
|
+
options.apply_defaults timeout: @config.rpcs.delete_single_tenant_hsm_instance_proposal.timeout,
|
|
1204
|
+
metadata: metadata,
|
|
1205
|
+
retry_policy: @config.rpcs.delete_single_tenant_hsm_instance_proposal.retry_policy
|
|
1206
|
+
|
|
1207
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1208
|
+
metadata: @config.metadata,
|
|
1209
|
+
retry_policy: @config.retry_policy
|
|
1210
|
+
|
|
1211
|
+
@hsm_management_stub.call_rpc :delete_single_tenant_hsm_instance_proposal, request, options: options do |response, operation|
|
|
1212
|
+
yield response, operation if block_given?
|
|
1213
|
+
end
|
|
1214
|
+
rescue ::GRPC::BadStatus => e
|
|
1215
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1216
|
+
end
|
|
1217
|
+
|
|
1218
|
+
##
|
|
1219
|
+
# Configuration class for the HsmManagement API.
|
|
1220
|
+
#
|
|
1221
|
+
# This class represents the configuration for HsmManagement,
|
|
1222
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1223
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1224
|
+
# applied individually to specific RPCs. See
|
|
1225
|
+
# {::Google::Cloud::Kms::V1::HsmManagement::Client::Configuration::Rpcs}
|
|
1226
|
+
# for a list of RPCs that can be configured independently.
|
|
1227
|
+
#
|
|
1228
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1229
|
+
# on construction.
|
|
1230
|
+
#
|
|
1231
|
+
# @example
|
|
1232
|
+
#
|
|
1233
|
+
# # Modify the global config, setting the timeout for
|
|
1234
|
+
# # list_single_tenant_hsm_instances to 20 seconds,
|
|
1235
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1236
|
+
# ::Google::Cloud::Kms::V1::HsmManagement::Client.configure do |config|
|
|
1237
|
+
# config.timeout = 10.0
|
|
1238
|
+
# config.rpcs.list_single_tenant_hsm_instances.timeout = 20.0
|
|
1239
|
+
# end
|
|
1240
|
+
#
|
|
1241
|
+
# # Apply the above configuration only to a new client.
|
|
1242
|
+
# client = ::Google::Cloud::Kms::V1::HsmManagement::Client.new do |config|
|
|
1243
|
+
# config.timeout = 10.0
|
|
1244
|
+
# config.rpcs.list_single_tenant_hsm_instances.timeout = 20.0
|
|
1245
|
+
# end
|
|
1246
|
+
#
|
|
1247
|
+
# @!attribute [rw] endpoint
|
|
1248
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1249
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1250
|
+
# @return [::String,nil]
|
|
1251
|
+
# @!attribute [rw] credentials
|
|
1252
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1253
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1254
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1255
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1256
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1257
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1258
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1259
|
+
# * (`nil`) indicating no credentials
|
|
1260
|
+
#
|
|
1261
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1262
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1263
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1264
|
+
#
|
|
1265
|
+
# @example
|
|
1266
|
+
#
|
|
1267
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1268
|
+
# # on the appropriate credentials class for your environment.
|
|
1269
|
+
#
|
|
1270
|
+
# require "googleauth"
|
|
1271
|
+
#
|
|
1272
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1273
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1274
|
+
# )
|
|
1275
|
+
#
|
|
1276
|
+
# client = ::Google::Cloud::Kms::V1::HsmManagement::Client.new do |config|
|
|
1277
|
+
# config.credentials = credentials
|
|
1278
|
+
# end
|
|
1279
|
+
#
|
|
1280
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1281
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1282
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1283
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1284
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1285
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1286
|
+
# @return [::Object]
|
|
1287
|
+
# @!attribute [rw] scope
|
|
1288
|
+
# The OAuth scopes
|
|
1289
|
+
# @return [::Array<::String>]
|
|
1290
|
+
# @!attribute [rw] lib_name
|
|
1291
|
+
# The library name as recorded in instrumentation and logging
|
|
1292
|
+
# @return [::String]
|
|
1293
|
+
# @!attribute [rw] lib_version
|
|
1294
|
+
# The library version as recorded in instrumentation and logging
|
|
1295
|
+
# @return [::String]
|
|
1296
|
+
# @!attribute [rw] channel_args
|
|
1297
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1298
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1299
|
+
# @return [::Hash]
|
|
1300
|
+
# @!attribute [rw] interceptors
|
|
1301
|
+
# An array of interceptors that are run before calls are executed.
|
|
1302
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1303
|
+
# @!attribute [rw] timeout
|
|
1304
|
+
# The call timeout in seconds.
|
|
1305
|
+
# @return [::Numeric]
|
|
1306
|
+
# @!attribute [rw] metadata
|
|
1307
|
+
# Additional gRPC headers to be sent with the call.
|
|
1308
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1309
|
+
# @!attribute [rw] retry_policy
|
|
1310
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1311
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1312
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1313
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1314
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1315
|
+
# trigger a retry.
|
|
1316
|
+
# @return [::Hash]
|
|
1317
|
+
# @!attribute [rw] quota_project
|
|
1318
|
+
# A separate project against which to charge quota.
|
|
1319
|
+
# @return [::String]
|
|
1320
|
+
# @!attribute [rw] universe_domain
|
|
1321
|
+
# The universe domain within which to make requests. This determines the
|
|
1322
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1323
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1324
|
+
# @return [::String,nil]
|
|
1325
|
+
# @!attribute [rw] logger
|
|
1326
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1327
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1328
|
+
# explicitly disable logging.
|
|
1329
|
+
# @return [::Logger,:default,nil]
|
|
1330
|
+
#
|
|
1331
|
+
class Configuration
|
|
1332
|
+
extend ::Gapic::Config
|
|
1333
|
+
|
|
1334
|
+
# @private
|
|
1335
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1336
|
+
DEFAULT_ENDPOINT = "cloudkms.googleapis.com"
|
|
1337
|
+
|
|
1338
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1339
|
+
config_attr :credentials, nil do |value|
|
|
1340
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1341
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
|
1342
|
+
allowed.any? { |klass| klass === value }
|
|
1343
|
+
end
|
|
1344
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1345
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1346
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1347
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1348
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1349
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1350
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1351
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1352
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1353
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1354
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1355
|
+
|
|
1356
|
+
# @private
|
|
1357
|
+
def initialize parent_config = nil
|
|
1358
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1359
|
+
|
|
1360
|
+
yield self if block_given?
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
##
|
|
1364
|
+
# Configurations for individual RPCs
|
|
1365
|
+
# @return [Rpcs]
|
|
1366
|
+
#
|
|
1367
|
+
def rpcs
|
|
1368
|
+
@rpcs ||= begin
|
|
1369
|
+
parent_rpcs = nil
|
|
1370
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1371
|
+
Rpcs.new parent_rpcs
|
|
1372
|
+
end
|
|
1373
|
+
end
|
|
1374
|
+
|
|
1375
|
+
##
|
|
1376
|
+
# Configuration for the channel pool
|
|
1377
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
|
1378
|
+
#
|
|
1379
|
+
def channel_pool
|
|
1380
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
|
1381
|
+
end
|
|
1382
|
+
|
|
1383
|
+
##
|
|
1384
|
+
# Configuration RPC class for the HsmManagement API.
|
|
1385
|
+
#
|
|
1386
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1387
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1388
|
+
# the following configuration fields:
|
|
1389
|
+
#
|
|
1390
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1391
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1392
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1393
|
+
# include the following keys:
|
|
1394
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1395
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1396
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1397
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1398
|
+
# trigger a retry.
|
|
1399
|
+
#
|
|
1400
|
+
class Rpcs
|
|
1401
|
+
##
|
|
1402
|
+
# RPC-specific configuration for `list_single_tenant_hsm_instances`
|
|
1403
|
+
# @return [::Gapic::Config::Method]
|
|
1404
|
+
#
|
|
1405
|
+
attr_reader :list_single_tenant_hsm_instances
|
|
1406
|
+
##
|
|
1407
|
+
# RPC-specific configuration for `get_single_tenant_hsm_instance`
|
|
1408
|
+
# @return [::Gapic::Config::Method]
|
|
1409
|
+
#
|
|
1410
|
+
attr_reader :get_single_tenant_hsm_instance
|
|
1411
|
+
##
|
|
1412
|
+
# RPC-specific configuration for `create_single_tenant_hsm_instance`
|
|
1413
|
+
# @return [::Gapic::Config::Method]
|
|
1414
|
+
#
|
|
1415
|
+
attr_reader :create_single_tenant_hsm_instance
|
|
1416
|
+
##
|
|
1417
|
+
# RPC-specific configuration for `create_single_tenant_hsm_instance_proposal`
|
|
1418
|
+
# @return [::Gapic::Config::Method]
|
|
1419
|
+
#
|
|
1420
|
+
attr_reader :create_single_tenant_hsm_instance_proposal
|
|
1421
|
+
##
|
|
1422
|
+
# RPC-specific configuration for `approve_single_tenant_hsm_instance_proposal`
|
|
1423
|
+
# @return [::Gapic::Config::Method]
|
|
1424
|
+
#
|
|
1425
|
+
attr_reader :approve_single_tenant_hsm_instance_proposal
|
|
1426
|
+
##
|
|
1427
|
+
# RPC-specific configuration for `execute_single_tenant_hsm_instance_proposal`
|
|
1428
|
+
# @return [::Gapic::Config::Method]
|
|
1429
|
+
#
|
|
1430
|
+
attr_reader :execute_single_tenant_hsm_instance_proposal
|
|
1431
|
+
##
|
|
1432
|
+
# RPC-specific configuration for `get_single_tenant_hsm_instance_proposal`
|
|
1433
|
+
# @return [::Gapic::Config::Method]
|
|
1434
|
+
#
|
|
1435
|
+
attr_reader :get_single_tenant_hsm_instance_proposal
|
|
1436
|
+
##
|
|
1437
|
+
# RPC-specific configuration for `list_single_tenant_hsm_instance_proposals`
|
|
1438
|
+
# @return [::Gapic::Config::Method]
|
|
1439
|
+
#
|
|
1440
|
+
attr_reader :list_single_tenant_hsm_instance_proposals
|
|
1441
|
+
##
|
|
1442
|
+
# RPC-specific configuration for `delete_single_tenant_hsm_instance_proposal`
|
|
1443
|
+
# @return [::Gapic::Config::Method]
|
|
1444
|
+
#
|
|
1445
|
+
attr_reader :delete_single_tenant_hsm_instance_proposal
|
|
1446
|
+
|
|
1447
|
+
# @private
|
|
1448
|
+
def initialize parent_rpcs = nil
|
|
1449
|
+
list_single_tenant_hsm_instances_config = parent_rpcs.list_single_tenant_hsm_instances if parent_rpcs.respond_to? :list_single_tenant_hsm_instances
|
|
1450
|
+
@list_single_tenant_hsm_instances = ::Gapic::Config::Method.new list_single_tenant_hsm_instances_config
|
|
1451
|
+
get_single_tenant_hsm_instance_config = parent_rpcs.get_single_tenant_hsm_instance if parent_rpcs.respond_to? :get_single_tenant_hsm_instance
|
|
1452
|
+
@get_single_tenant_hsm_instance = ::Gapic::Config::Method.new get_single_tenant_hsm_instance_config
|
|
1453
|
+
create_single_tenant_hsm_instance_config = parent_rpcs.create_single_tenant_hsm_instance if parent_rpcs.respond_to? :create_single_tenant_hsm_instance
|
|
1454
|
+
@create_single_tenant_hsm_instance = ::Gapic::Config::Method.new create_single_tenant_hsm_instance_config
|
|
1455
|
+
create_single_tenant_hsm_instance_proposal_config = parent_rpcs.create_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :create_single_tenant_hsm_instance_proposal
|
|
1456
|
+
@create_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new create_single_tenant_hsm_instance_proposal_config
|
|
1457
|
+
approve_single_tenant_hsm_instance_proposal_config = parent_rpcs.approve_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :approve_single_tenant_hsm_instance_proposal
|
|
1458
|
+
@approve_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new approve_single_tenant_hsm_instance_proposal_config
|
|
1459
|
+
execute_single_tenant_hsm_instance_proposal_config = parent_rpcs.execute_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :execute_single_tenant_hsm_instance_proposal
|
|
1460
|
+
@execute_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new execute_single_tenant_hsm_instance_proposal_config
|
|
1461
|
+
get_single_tenant_hsm_instance_proposal_config = parent_rpcs.get_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :get_single_tenant_hsm_instance_proposal
|
|
1462
|
+
@get_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new get_single_tenant_hsm_instance_proposal_config
|
|
1463
|
+
list_single_tenant_hsm_instance_proposals_config = parent_rpcs.list_single_tenant_hsm_instance_proposals if parent_rpcs.respond_to? :list_single_tenant_hsm_instance_proposals
|
|
1464
|
+
@list_single_tenant_hsm_instance_proposals = ::Gapic::Config::Method.new list_single_tenant_hsm_instance_proposals_config
|
|
1465
|
+
delete_single_tenant_hsm_instance_proposal_config = parent_rpcs.delete_single_tenant_hsm_instance_proposal if parent_rpcs.respond_to? :delete_single_tenant_hsm_instance_proposal
|
|
1466
|
+
@delete_single_tenant_hsm_instance_proposal = ::Gapic::Config::Method.new delete_single_tenant_hsm_instance_proposal_config
|
|
1467
|
+
|
|
1468
|
+
yield self if block_given?
|
|
1469
|
+
end
|
|
1470
|
+
end
|
|
1471
|
+
end
|
|
1472
|
+
end
|
|
1473
|
+
end
|
|
1474
|
+
end
|
|
1475
|
+
end
|
|
1476
|
+
end
|
|
1477
|
+
end
|