google-cloud-netapp-v1 0.a → 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 +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/netapp/v1/active_directory_pb.rb +56 -0
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +57 -0
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +120 -0
- data/lib/google/cloud/netapp/v1/common_pb.rb +43 -0
- data/lib/google/cloud/netapp/v1/kms_pb.rb +59 -0
- data/lib/google/cloud/netapp/v1/netapp/client.rb +4110 -0
- data/lib/google/cloud/netapp/v1/netapp/credentials.rb +47 -0
- data/lib/google/cloud/netapp/v1/netapp/operations.rb +770 -0
- data/lib/google/cloud/netapp/v1/netapp/paths.rb +185 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +3071 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +795 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +2190 -0
- data/lib/google/cloud/netapp/v1/netapp/rest.rb +53 -0
- data/lib/google/cloud/netapp/v1/netapp.rb +56 -0
- data/lib/google/cloud/netapp/v1/replication_pb.rb +66 -0
- data/lib/google/cloud/netapp/v1/rest.rb +37 -0
- data/lib/google/cloud/netapp/v1/snapshot_pb.rb +56 -0
- data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +57 -0
- data/lib/google/cloud/netapp/v1/version.rb +8 -3
- data/lib/google/cloud/netapp/v1/volume_pb.rb +71 -0
- data/lib/google/cloud/netapp/v1.rb +45 -0
- data/lib/google-cloud-netapp-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/netapp/v1/active_directory.rb +222 -0
- data/proto_docs/google/cloud/netapp/v1/cloud_netapp_service.rb +57 -0
- data/proto_docs/google/cloud/netapp/v1/common.rb +50 -0
- data/proto_docs/google/cloud/netapp/v1/kms.rb +230 -0
- data/proto_docs/google/cloud/netapp/v1/replication.rb +349 -0
- data/proto_docs/google/cloud/netapp/v1/snapshot.rb +179 -0
- data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +205 -0
- data/proto_docs/google/cloud/netapp/v1/volume.rb +530 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +144 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +224 -13
@@ -0,0 +1,4110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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/netapp/v1/cloud_netapp_service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module NetApp
|
26
|
+
module V1
|
27
|
+
module NetApp
|
28
|
+
##
|
29
|
+
# Client for the NetApp service.
|
30
|
+
#
|
31
|
+
# NetApp Files Google Cloud Service
|
32
|
+
#
|
33
|
+
class Client
|
34
|
+
include Paths
|
35
|
+
|
36
|
+
# @private
|
37
|
+
attr_reader :net_app_stub
|
38
|
+
|
39
|
+
##
|
40
|
+
# Configure the NetApp Client class.
|
41
|
+
#
|
42
|
+
# See {::Google::Cloud::NetApp::V1::NetApp::Client::Configuration}
|
43
|
+
# for a description of the configuration fields.
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
#
|
47
|
+
# # Modify the configuration for all NetApp clients
|
48
|
+
# ::Google::Cloud::NetApp::V1::NetApp::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @yield [config] Configure the Client client.
|
53
|
+
# @yieldparam config [Client::Configuration]
|
54
|
+
#
|
55
|
+
# @return [Client::Configuration]
|
56
|
+
#
|
57
|
+
def self.configure
|
58
|
+
@configure ||= begin
|
59
|
+
namespace = ["Google", "Cloud", "NetApp", "V1"]
|
60
|
+
parent_config = while namespace.any?
|
61
|
+
parent_name = namespace.join "::"
|
62
|
+
parent_const = const_get parent_name
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
|
+
namespace.pop
|
65
|
+
end
|
66
|
+
default_config = Client::Configuration.new parent_config
|
67
|
+
|
68
|
+
default_config.rpcs.list_storage_pools.timeout = 60.0
|
69
|
+
default_config.rpcs.list_storage_pools.retry_policy = {
|
70
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
71
|
+
}
|
72
|
+
|
73
|
+
default_config.rpcs.create_storage_pool.timeout = 60.0
|
74
|
+
|
75
|
+
default_config.rpcs.get_storage_pool.timeout = 60.0
|
76
|
+
default_config.rpcs.get_storage_pool.retry_policy = {
|
77
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
78
|
+
}
|
79
|
+
|
80
|
+
default_config.rpcs.update_storage_pool.timeout = 60.0
|
81
|
+
|
82
|
+
default_config.rpcs.delete_storage_pool.timeout = 60.0
|
83
|
+
|
84
|
+
default_config.rpcs.list_volumes.timeout = 60.0
|
85
|
+
default_config.rpcs.list_volumes.retry_policy = {
|
86
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
87
|
+
}
|
88
|
+
|
89
|
+
default_config.rpcs.get_volume.timeout = 60.0
|
90
|
+
default_config.rpcs.get_volume.retry_policy = {
|
91
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
92
|
+
}
|
93
|
+
|
94
|
+
default_config.rpcs.create_volume.timeout = 60.0
|
95
|
+
|
96
|
+
default_config.rpcs.update_volume.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.delete_volume.timeout = 60.0
|
99
|
+
|
100
|
+
default_config.rpcs.revert_volume.timeout = 60.0
|
101
|
+
|
102
|
+
default_config.rpcs.list_snapshots.timeout = 60.0
|
103
|
+
default_config.rpcs.list_snapshots.retry_policy = {
|
104
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
105
|
+
}
|
106
|
+
|
107
|
+
default_config.rpcs.get_snapshot.timeout = 60.0
|
108
|
+
default_config.rpcs.get_snapshot.retry_policy = {
|
109
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
110
|
+
}
|
111
|
+
|
112
|
+
default_config.rpcs.create_snapshot.timeout = 60.0
|
113
|
+
|
114
|
+
default_config.rpcs.delete_snapshot.timeout = 60.0
|
115
|
+
|
116
|
+
default_config.rpcs.update_snapshot.timeout = 60.0
|
117
|
+
|
118
|
+
default_config.rpcs.list_active_directories.timeout = 60.0
|
119
|
+
default_config.rpcs.list_active_directories.retry_policy = {
|
120
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
121
|
+
}
|
122
|
+
|
123
|
+
default_config.rpcs.get_active_directory.timeout = 60.0
|
124
|
+
default_config.rpcs.get_active_directory.retry_policy = {
|
125
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
126
|
+
}
|
127
|
+
|
128
|
+
default_config.rpcs.create_active_directory.timeout = 60.0
|
129
|
+
|
130
|
+
default_config.rpcs.update_active_directory.timeout = 60.0
|
131
|
+
|
132
|
+
default_config.rpcs.delete_active_directory.timeout = 60.0
|
133
|
+
|
134
|
+
default_config.rpcs.list_kms_configs.timeout = 60.0
|
135
|
+
default_config.rpcs.list_kms_configs.retry_policy = {
|
136
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
137
|
+
}
|
138
|
+
|
139
|
+
default_config.rpcs.create_kms_config.timeout = 60.0
|
140
|
+
|
141
|
+
default_config.rpcs.get_kms_config.timeout = 60.0
|
142
|
+
default_config.rpcs.get_kms_config.retry_policy = {
|
143
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
144
|
+
}
|
145
|
+
|
146
|
+
default_config.rpcs.update_kms_config.timeout = 60.0
|
147
|
+
|
148
|
+
default_config.rpcs.encrypt_volumes.timeout = 60.0
|
149
|
+
|
150
|
+
default_config.rpcs.verify_kms_config.timeout = 60.0
|
151
|
+
|
152
|
+
default_config.rpcs.delete_kms_config.timeout = 60.0
|
153
|
+
|
154
|
+
default_config.rpcs.list_replications.timeout = 60.0
|
155
|
+
default_config.rpcs.list_replications.retry_policy = {
|
156
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
157
|
+
}
|
158
|
+
|
159
|
+
default_config.rpcs.get_replication.timeout = 60.0
|
160
|
+
default_config.rpcs.get_replication.retry_policy = {
|
161
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
162
|
+
}
|
163
|
+
|
164
|
+
default_config.rpcs.create_replication.timeout = 60.0
|
165
|
+
|
166
|
+
default_config.rpcs.delete_replication.timeout = 60.0
|
167
|
+
|
168
|
+
default_config.rpcs.update_replication.timeout = 60.0
|
169
|
+
|
170
|
+
default_config.rpcs.stop_replication.timeout = 60.0
|
171
|
+
|
172
|
+
default_config.rpcs.resume_replication.timeout = 60.0
|
173
|
+
|
174
|
+
default_config.rpcs.reverse_replication_direction.timeout = 60.0
|
175
|
+
|
176
|
+
default_config
|
177
|
+
end
|
178
|
+
yield @configure if block_given?
|
179
|
+
@configure
|
180
|
+
end
|
181
|
+
|
182
|
+
##
|
183
|
+
# Configure the NetApp Client instance.
|
184
|
+
#
|
185
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
186
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
187
|
+
# should be made on {Client.configure}.
|
188
|
+
#
|
189
|
+
# See {::Google::Cloud::NetApp::V1::NetApp::Client::Configuration}
|
190
|
+
# for a description of the configuration fields.
|
191
|
+
#
|
192
|
+
# @yield [config] Configure the Client client.
|
193
|
+
# @yieldparam config [Client::Configuration]
|
194
|
+
#
|
195
|
+
# @return [Client::Configuration]
|
196
|
+
#
|
197
|
+
def configure
|
198
|
+
yield @config if block_given?
|
199
|
+
@config
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Create a new NetApp client object.
|
204
|
+
#
|
205
|
+
# @example
|
206
|
+
#
|
207
|
+
# # Create a client using the default configuration
|
208
|
+
# client = ::Google::Cloud::NetApp::V1::NetApp::Client.new
|
209
|
+
#
|
210
|
+
# # Create a client using a custom configuration
|
211
|
+
# client = ::Google::Cloud::NetApp::V1::NetApp::Client.new do |config|
|
212
|
+
# config.timeout = 10.0
|
213
|
+
# end
|
214
|
+
#
|
215
|
+
# @yield [config] Configure the NetApp client.
|
216
|
+
# @yieldparam config [Client::Configuration]
|
217
|
+
#
|
218
|
+
def initialize
|
219
|
+
# These require statements are intentionally placed here to initialize
|
220
|
+
# the gRPC module only when it's required.
|
221
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
222
|
+
require "gapic/grpc"
|
223
|
+
require "google/cloud/netapp/v1/cloud_netapp_service_services_pb"
|
224
|
+
|
225
|
+
# Create the configuration object
|
226
|
+
@config = Configuration.new Client.configure
|
227
|
+
|
228
|
+
# Yield the configuration if needed
|
229
|
+
yield @config if block_given?
|
230
|
+
|
231
|
+
# Create credentials
|
232
|
+
credentials = @config.credentials
|
233
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
234
|
+
# but only if the default endpoint does not have a region prefix.
|
235
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
236
|
+
!@config.endpoint.split(".").first.include?("-")
|
237
|
+
credentials ||= Credentials.default scope: @config.scope,
|
238
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
239
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
240
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
241
|
+
end
|
242
|
+
@quota_project_id = @config.quota_project
|
243
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
244
|
+
|
245
|
+
@operations_client = Operations.new do |config|
|
246
|
+
config.credentials = credentials
|
247
|
+
config.quota_project = @quota_project_id
|
248
|
+
config.endpoint = @config.endpoint
|
249
|
+
end
|
250
|
+
|
251
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
252
|
+
config.credentials = credentials
|
253
|
+
config.quota_project = @quota_project_id
|
254
|
+
config.endpoint = @config.endpoint
|
255
|
+
end
|
256
|
+
|
257
|
+
@net_app_stub = ::Gapic::ServiceStub.new(
|
258
|
+
::Google::Cloud::NetApp::V1::NetApp::Stub,
|
259
|
+
credentials: credentials,
|
260
|
+
endpoint: @config.endpoint,
|
261
|
+
channel_args: @config.channel_args,
|
262
|
+
interceptors: @config.interceptors
|
263
|
+
)
|
264
|
+
end
|
265
|
+
|
266
|
+
##
|
267
|
+
# Get the associated client for long-running operations.
|
268
|
+
#
|
269
|
+
# @return [::Google::Cloud::NetApp::V1::NetApp::Operations]
|
270
|
+
#
|
271
|
+
attr_reader :operations_client
|
272
|
+
|
273
|
+
##
|
274
|
+
# Get the associated client for mix-in of the Locations.
|
275
|
+
#
|
276
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
277
|
+
#
|
278
|
+
attr_reader :location_client
|
279
|
+
|
280
|
+
# Service calls
|
281
|
+
|
282
|
+
##
|
283
|
+
# Returns descriptions of all storage pools owned by the caller.
|
284
|
+
#
|
285
|
+
# @overload list_storage_pools(request, options = nil)
|
286
|
+
# Pass arguments to `list_storage_pools` via a request object, either of type
|
287
|
+
# {::Google::Cloud::NetApp::V1::ListStoragePoolsRequest} or an equivalent Hash.
|
288
|
+
#
|
289
|
+
# @param request [::Google::Cloud::NetApp::V1::ListStoragePoolsRequest, ::Hash]
|
290
|
+
# A request object representing the call parameters. Required. To specify no
|
291
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
292
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
293
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
294
|
+
#
|
295
|
+
# @overload list_storage_pools(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
296
|
+
# Pass arguments to `list_storage_pools` via keyword arguments. Note that at
|
297
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
298
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
299
|
+
#
|
300
|
+
# @param parent [::String]
|
301
|
+
# Required. Parent value
|
302
|
+
# @param page_size [::Integer]
|
303
|
+
# The maximum number of items to return.
|
304
|
+
# @param page_token [::String]
|
305
|
+
# The next_page_token value to use if there are additional
|
306
|
+
# results to retrieve for this list request.
|
307
|
+
# @param order_by [::String]
|
308
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
309
|
+
# @param filter [::String]
|
310
|
+
# List filter.
|
311
|
+
#
|
312
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
313
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>]
|
314
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
315
|
+
#
|
316
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>]
|
317
|
+
#
|
318
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
319
|
+
#
|
320
|
+
# @example Basic example
|
321
|
+
# require "google/cloud/netapp/v1"
|
322
|
+
#
|
323
|
+
# # Create a client object. The client can be reused for multiple calls.
|
324
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
325
|
+
#
|
326
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
327
|
+
# request = Google::Cloud::NetApp::V1::ListStoragePoolsRequest.new
|
328
|
+
#
|
329
|
+
# # Call the list_storage_pools method.
|
330
|
+
# result = client.list_storage_pools request
|
331
|
+
#
|
332
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
333
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
334
|
+
# result.each do |item|
|
335
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::StoragePool.
|
336
|
+
# p item
|
337
|
+
# end
|
338
|
+
#
|
339
|
+
def list_storage_pools request, options = nil
|
340
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
341
|
+
|
342
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListStoragePoolsRequest
|
343
|
+
|
344
|
+
# Converts hash and nil to an options object
|
345
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
346
|
+
|
347
|
+
# Customize the options with defaults
|
348
|
+
metadata = @config.rpcs.list_storage_pools.metadata.to_h
|
349
|
+
|
350
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
351
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
352
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
353
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
354
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
355
|
+
|
356
|
+
header_params = {}
|
357
|
+
if request.parent
|
358
|
+
header_params["parent"] = request.parent
|
359
|
+
end
|
360
|
+
|
361
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
362
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
363
|
+
|
364
|
+
options.apply_defaults timeout: @config.rpcs.list_storage_pools.timeout,
|
365
|
+
metadata: metadata,
|
366
|
+
retry_policy: @config.rpcs.list_storage_pools.retry_policy
|
367
|
+
|
368
|
+
options.apply_defaults timeout: @config.timeout,
|
369
|
+
metadata: @config.metadata,
|
370
|
+
retry_policy: @config.retry_policy
|
371
|
+
|
372
|
+
@net_app_stub.call_rpc :list_storage_pools, request, options: options do |response, operation|
|
373
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_storage_pools, request, response, operation, options
|
374
|
+
yield response, operation if block_given?
|
375
|
+
return response
|
376
|
+
end
|
377
|
+
rescue ::GRPC::BadStatus => e
|
378
|
+
raise ::Google::Cloud::Error.from_error(e)
|
379
|
+
end
|
380
|
+
|
381
|
+
##
|
382
|
+
# Creates a new storage pool.
|
383
|
+
#
|
384
|
+
# @overload create_storage_pool(request, options = nil)
|
385
|
+
# Pass arguments to `create_storage_pool` via a request object, either of type
|
386
|
+
# {::Google::Cloud::NetApp::V1::CreateStoragePoolRequest} or an equivalent Hash.
|
387
|
+
#
|
388
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateStoragePoolRequest, ::Hash]
|
389
|
+
# A request object representing the call parameters. Required. To specify no
|
390
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
391
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
392
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
393
|
+
#
|
394
|
+
# @overload create_storage_pool(parent: nil, storage_pool_id: nil, storage_pool: nil)
|
395
|
+
# Pass arguments to `create_storage_pool` via keyword arguments. Note that at
|
396
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
397
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
398
|
+
#
|
399
|
+
# @param parent [::String]
|
400
|
+
# Required. Value for parent.
|
401
|
+
# @param storage_pool_id [::String]
|
402
|
+
# Required. Id of the requesting storage pool
|
403
|
+
# If auto-generating Id server-side, remove this field and
|
404
|
+
# id from the method_signature of Create RPC
|
405
|
+
# @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
|
406
|
+
# Required. The required parameters to create a new storage pool.
|
407
|
+
#
|
408
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
409
|
+
# @yieldparam response [::Gapic::Operation]
|
410
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
411
|
+
#
|
412
|
+
# @return [::Gapic::Operation]
|
413
|
+
#
|
414
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
415
|
+
#
|
416
|
+
# @example Basic example
|
417
|
+
# require "google/cloud/netapp/v1"
|
418
|
+
#
|
419
|
+
# # Create a client object. The client can be reused for multiple calls.
|
420
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
421
|
+
#
|
422
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
423
|
+
# request = Google::Cloud::NetApp::V1::CreateStoragePoolRequest.new
|
424
|
+
#
|
425
|
+
# # Call the create_storage_pool method.
|
426
|
+
# result = client.create_storage_pool request
|
427
|
+
#
|
428
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
429
|
+
# # check the status of an operation, cancel it, or wait for results.
|
430
|
+
# # Here is how to wait for a response.
|
431
|
+
# result.wait_until_done! timeout: 60
|
432
|
+
# if result.response?
|
433
|
+
# p result.response
|
434
|
+
# else
|
435
|
+
# puts "No response received."
|
436
|
+
# end
|
437
|
+
#
|
438
|
+
def create_storage_pool request, options = nil
|
439
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
440
|
+
|
441
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateStoragePoolRequest
|
442
|
+
|
443
|
+
# Converts hash and nil to an options object
|
444
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
445
|
+
|
446
|
+
# Customize the options with defaults
|
447
|
+
metadata = @config.rpcs.create_storage_pool.metadata.to_h
|
448
|
+
|
449
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
450
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
451
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
452
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
453
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
454
|
+
|
455
|
+
header_params = {}
|
456
|
+
if request.parent
|
457
|
+
header_params["parent"] = request.parent
|
458
|
+
end
|
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_storage_pool.timeout,
|
464
|
+
metadata: metadata,
|
465
|
+
retry_policy: @config.rpcs.create_storage_pool.retry_policy
|
466
|
+
|
467
|
+
options.apply_defaults timeout: @config.timeout,
|
468
|
+
metadata: @config.metadata,
|
469
|
+
retry_policy: @config.retry_policy
|
470
|
+
|
471
|
+
@net_app_stub.call_rpc :create_storage_pool, request, options: options do |response, operation|
|
472
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
473
|
+
yield response, operation if block_given?
|
474
|
+
return response
|
475
|
+
end
|
476
|
+
rescue ::GRPC::BadStatus => e
|
477
|
+
raise ::Google::Cloud::Error.from_error(e)
|
478
|
+
end
|
479
|
+
|
480
|
+
##
|
481
|
+
# Returns the description of the specified storage pool by poolId.
|
482
|
+
#
|
483
|
+
# @overload get_storage_pool(request, options = nil)
|
484
|
+
# Pass arguments to `get_storage_pool` via a request object, either of type
|
485
|
+
# {::Google::Cloud::NetApp::V1::GetStoragePoolRequest} or an equivalent Hash.
|
486
|
+
#
|
487
|
+
# @param request [::Google::Cloud::NetApp::V1::GetStoragePoolRequest, ::Hash]
|
488
|
+
# A request object representing the call parameters. Required. To specify no
|
489
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
490
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
491
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
492
|
+
#
|
493
|
+
# @overload get_storage_pool(name: nil)
|
494
|
+
# Pass arguments to `get_storage_pool` via keyword arguments. Note that at
|
495
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
496
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
497
|
+
#
|
498
|
+
# @param name [::String]
|
499
|
+
# Required. Name of the storage pool
|
500
|
+
#
|
501
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
502
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::StoragePool]
|
503
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
504
|
+
#
|
505
|
+
# @return [::Google::Cloud::NetApp::V1::StoragePool]
|
506
|
+
#
|
507
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
508
|
+
#
|
509
|
+
# @example Basic example
|
510
|
+
# require "google/cloud/netapp/v1"
|
511
|
+
#
|
512
|
+
# # Create a client object. The client can be reused for multiple calls.
|
513
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
514
|
+
#
|
515
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
516
|
+
# request = Google::Cloud::NetApp::V1::GetStoragePoolRequest.new
|
517
|
+
#
|
518
|
+
# # Call the get_storage_pool method.
|
519
|
+
# result = client.get_storage_pool request
|
520
|
+
#
|
521
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::StoragePool.
|
522
|
+
# p result
|
523
|
+
#
|
524
|
+
def get_storage_pool request, options = nil
|
525
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
526
|
+
|
527
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetStoragePoolRequest
|
528
|
+
|
529
|
+
# Converts hash and nil to an options object
|
530
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
531
|
+
|
532
|
+
# Customize the options with defaults
|
533
|
+
metadata = @config.rpcs.get_storage_pool.metadata.to_h
|
534
|
+
|
535
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
536
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
537
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
538
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
539
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
540
|
+
|
541
|
+
header_params = {}
|
542
|
+
if request.name
|
543
|
+
header_params["name"] = request.name
|
544
|
+
end
|
545
|
+
|
546
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
547
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
548
|
+
|
549
|
+
options.apply_defaults timeout: @config.rpcs.get_storage_pool.timeout,
|
550
|
+
metadata: metadata,
|
551
|
+
retry_policy: @config.rpcs.get_storage_pool.retry_policy
|
552
|
+
|
553
|
+
options.apply_defaults timeout: @config.timeout,
|
554
|
+
metadata: @config.metadata,
|
555
|
+
retry_policy: @config.retry_policy
|
556
|
+
|
557
|
+
@net_app_stub.call_rpc :get_storage_pool, request, options: options do |response, operation|
|
558
|
+
yield response, operation if block_given?
|
559
|
+
return response
|
560
|
+
end
|
561
|
+
rescue ::GRPC::BadStatus => e
|
562
|
+
raise ::Google::Cloud::Error.from_error(e)
|
563
|
+
end
|
564
|
+
|
565
|
+
##
|
566
|
+
# Updates the storage pool properties with the full spec
|
567
|
+
#
|
568
|
+
# @overload update_storage_pool(request, options = nil)
|
569
|
+
# Pass arguments to `update_storage_pool` via a request object, either of type
|
570
|
+
# {::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest} or an equivalent Hash.
|
571
|
+
#
|
572
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest, ::Hash]
|
573
|
+
# A request object representing the call parameters. Required. To specify no
|
574
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
575
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
576
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
577
|
+
#
|
578
|
+
# @overload update_storage_pool(update_mask: nil, storage_pool: nil)
|
579
|
+
# Pass arguments to `update_storage_pool` via keyword arguments. Note that at
|
580
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
581
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
582
|
+
#
|
583
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
584
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
585
|
+
# StoragePool resource by the update.
|
586
|
+
# The fields specified in the update_mask are relative to the resource, not
|
587
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
588
|
+
# user does not provide a mask then all fields will be overwritten.
|
589
|
+
# @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
|
590
|
+
# Required. The pool being updated
|
591
|
+
#
|
592
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
593
|
+
# @yieldparam response [::Gapic::Operation]
|
594
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
595
|
+
#
|
596
|
+
# @return [::Gapic::Operation]
|
597
|
+
#
|
598
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
599
|
+
#
|
600
|
+
# @example Basic example
|
601
|
+
# require "google/cloud/netapp/v1"
|
602
|
+
#
|
603
|
+
# # Create a client object. The client can be reused for multiple calls.
|
604
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
605
|
+
#
|
606
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
607
|
+
# request = Google::Cloud::NetApp::V1::UpdateStoragePoolRequest.new
|
608
|
+
#
|
609
|
+
# # Call the update_storage_pool method.
|
610
|
+
# result = client.update_storage_pool request
|
611
|
+
#
|
612
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
613
|
+
# # check the status of an operation, cancel it, or wait for results.
|
614
|
+
# # Here is how to wait for a response.
|
615
|
+
# result.wait_until_done! timeout: 60
|
616
|
+
# if result.response?
|
617
|
+
# p result.response
|
618
|
+
# else
|
619
|
+
# puts "No response received."
|
620
|
+
# end
|
621
|
+
#
|
622
|
+
def update_storage_pool request, options = nil
|
623
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
624
|
+
|
625
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest
|
626
|
+
|
627
|
+
# Converts hash and nil to an options object
|
628
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
629
|
+
|
630
|
+
# Customize the options with defaults
|
631
|
+
metadata = @config.rpcs.update_storage_pool.metadata.to_h
|
632
|
+
|
633
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
634
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
635
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
636
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
637
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
638
|
+
|
639
|
+
header_params = {}
|
640
|
+
if request.storage_pool&.name
|
641
|
+
header_params["storage_pool.name"] = request.storage_pool.name
|
642
|
+
end
|
643
|
+
|
644
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
645
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
646
|
+
|
647
|
+
options.apply_defaults timeout: @config.rpcs.update_storage_pool.timeout,
|
648
|
+
metadata: metadata,
|
649
|
+
retry_policy: @config.rpcs.update_storage_pool.retry_policy
|
650
|
+
|
651
|
+
options.apply_defaults timeout: @config.timeout,
|
652
|
+
metadata: @config.metadata,
|
653
|
+
retry_policy: @config.retry_policy
|
654
|
+
|
655
|
+
@net_app_stub.call_rpc :update_storage_pool, request, options: options do |response, operation|
|
656
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
657
|
+
yield response, operation if block_given?
|
658
|
+
return response
|
659
|
+
end
|
660
|
+
rescue ::GRPC::BadStatus => e
|
661
|
+
raise ::Google::Cloud::Error.from_error(e)
|
662
|
+
end
|
663
|
+
|
664
|
+
##
|
665
|
+
# Warning! This operation will permanently delete the storage pool.
|
666
|
+
#
|
667
|
+
# @overload delete_storage_pool(request, options = nil)
|
668
|
+
# Pass arguments to `delete_storage_pool` via a request object, either of type
|
669
|
+
# {::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest} or an equivalent Hash.
|
670
|
+
#
|
671
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest, ::Hash]
|
672
|
+
# A request object representing the call parameters. Required. To specify no
|
673
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
674
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
675
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
676
|
+
#
|
677
|
+
# @overload delete_storage_pool(name: nil)
|
678
|
+
# Pass arguments to `delete_storage_pool` via keyword arguments. Note that at
|
679
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
680
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
681
|
+
#
|
682
|
+
# @param name [::String]
|
683
|
+
# Required. Name of the storage pool
|
684
|
+
#
|
685
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
686
|
+
# @yieldparam response [::Gapic::Operation]
|
687
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
688
|
+
#
|
689
|
+
# @return [::Gapic::Operation]
|
690
|
+
#
|
691
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
692
|
+
#
|
693
|
+
# @example Basic example
|
694
|
+
# require "google/cloud/netapp/v1"
|
695
|
+
#
|
696
|
+
# # Create a client object. The client can be reused for multiple calls.
|
697
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
698
|
+
#
|
699
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
700
|
+
# request = Google::Cloud::NetApp::V1::DeleteStoragePoolRequest.new
|
701
|
+
#
|
702
|
+
# # Call the delete_storage_pool method.
|
703
|
+
# result = client.delete_storage_pool request
|
704
|
+
#
|
705
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
706
|
+
# # check the status of an operation, cancel it, or wait for results.
|
707
|
+
# # Here is how to wait for a response.
|
708
|
+
# result.wait_until_done! timeout: 60
|
709
|
+
# if result.response?
|
710
|
+
# p result.response
|
711
|
+
# else
|
712
|
+
# puts "No response received."
|
713
|
+
# end
|
714
|
+
#
|
715
|
+
def delete_storage_pool request, options = nil
|
716
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
717
|
+
|
718
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest
|
719
|
+
|
720
|
+
# Converts hash and nil to an options object
|
721
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
722
|
+
|
723
|
+
# Customize the options with defaults
|
724
|
+
metadata = @config.rpcs.delete_storage_pool.metadata.to_h
|
725
|
+
|
726
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
727
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
728
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
729
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
730
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
731
|
+
|
732
|
+
header_params = {}
|
733
|
+
if request.name
|
734
|
+
header_params["name"] = request.name
|
735
|
+
end
|
736
|
+
|
737
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
738
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
739
|
+
|
740
|
+
options.apply_defaults timeout: @config.rpcs.delete_storage_pool.timeout,
|
741
|
+
metadata: metadata,
|
742
|
+
retry_policy: @config.rpcs.delete_storage_pool.retry_policy
|
743
|
+
|
744
|
+
options.apply_defaults timeout: @config.timeout,
|
745
|
+
metadata: @config.metadata,
|
746
|
+
retry_policy: @config.retry_policy
|
747
|
+
|
748
|
+
@net_app_stub.call_rpc :delete_storage_pool, request, options: options do |response, operation|
|
749
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
750
|
+
yield response, operation if block_given?
|
751
|
+
return response
|
752
|
+
end
|
753
|
+
rescue ::GRPC::BadStatus => e
|
754
|
+
raise ::Google::Cloud::Error.from_error(e)
|
755
|
+
end
|
756
|
+
|
757
|
+
##
|
758
|
+
# Lists Volumes in a given project.
|
759
|
+
#
|
760
|
+
# @overload list_volumes(request, options = nil)
|
761
|
+
# Pass arguments to `list_volumes` via a request object, either of type
|
762
|
+
# {::Google::Cloud::NetApp::V1::ListVolumesRequest} or an equivalent Hash.
|
763
|
+
#
|
764
|
+
# @param request [::Google::Cloud::NetApp::V1::ListVolumesRequest, ::Hash]
|
765
|
+
# A request object representing the call parameters. Required. To specify no
|
766
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
767
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
768
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
769
|
+
#
|
770
|
+
# @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
771
|
+
# Pass arguments to `list_volumes` via keyword arguments. Note that at
|
772
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
773
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
774
|
+
#
|
775
|
+
# @param parent [::String]
|
776
|
+
# Required. Parent value for ListVolumesRequest
|
777
|
+
# @param page_size [::Integer]
|
778
|
+
# Requested page size. Server may return fewer items than requested.
|
779
|
+
# If unspecified, the server will pick an appropriate default.
|
780
|
+
# @param page_token [::String]
|
781
|
+
# A token identifying a page of results the server should return.
|
782
|
+
# @param filter [::String]
|
783
|
+
# Filtering results
|
784
|
+
# @param order_by [::String]
|
785
|
+
# Hint for how to order the results
|
786
|
+
#
|
787
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
788
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>]
|
789
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
790
|
+
#
|
791
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>]
|
792
|
+
#
|
793
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
794
|
+
#
|
795
|
+
# @example Basic example
|
796
|
+
# require "google/cloud/netapp/v1"
|
797
|
+
#
|
798
|
+
# # Create a client object. The client can be reused for multiple calls.
|
799
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
800
|
+
#
|
801
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
802
|
+
# request = Google::Cloud::NetApp::V1::ListVolumesRequest.new
|
803
|
+
#
|
804
|
+
# # Call the list_volumes method.
|
805
|
+
# result = client.list_volumes request
|
806
|
+
#
|
807
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
808
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
809
|
+
# result.each do |item|
|
810
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::Volume.
|
811
|
+
# p item
|
812
|
+
# end
|
813
|
+
#
|
814
|
+
def list_volumes request, options = nil
|
815
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
816
|
+
|
817
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListVolumesRequest
|
818
|
+
|
819
|
+
# Converts hash and nil to an options object
|
820
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
821
|
+
|
822
|
+
# Customize the options with defaults
|
823
|
+
metadata = @config.rpcs.list_volumes.metadata.to_h
|
824
|
+
|
825
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
826
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
827
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
828
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
829
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
830
|
+
|
831
|
+
header_params = {}
|
832
|
+
if request.parent
|
833
|
+
header_params["parent"] = request.parent
|
834
|
+
end
|
835
|
+
|
836
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
837
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
838
|
+
|
839
|
+
options.apply_defaults timeout: @config.rpcs.list_volumes.timeout,
|
840
|
+
metadata: metadata,
|
841
|
+
retry_policy: @config.rpcs.list_volumes.retry_policy
|
842
|
+
|
843
|
+
options.apply_defaults timeout: @config.timeout,
|
844
|
+
metadata: @config.metadata,
|
845
|
+
retry_policy: @config.retry_policy
|
846
|
+
|
847
|
+
@net_app_stub.call_rpc :list_volumes, request, options: options do |response, operation|
|
848
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_volumes, request, response, operation, options
|
849
|
+
yield response, operation if block_given?
|
850
|
+
return response
|
851
|
+
end
|
852
|
+
rescue ::GRPC::BadStatus => e
|
853
|
+
raise ::Google::Cloud::Error.from_error(e)
|
854
|
+
end
|
855
|
+
|
856
|
+
##
|
857
|
+
# Gets details of a single Volume.
|
858
|
+
#
|
859
|
+
# @overload get_volume(request, options = nil)
|
860
|
+
# Pass arguments to `get_volume` via a request object, either of type
|
861
|
+
# {::Google::Cloud::NetApp::V1::GetVolumeRequest} or an equivalent Hash.
|
862
|
+
#
|
863
|
+
# @param request [::Google::Cloud::NetApp::V1::GetVolumeRequest, ::Hash]
|
864
|
+
# A request object representing the call parameters. Required. To specify no
|
865
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
866
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
867
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
868
|
+
#
|
869
|
+
# @overload get_volume(name: nil)
|
870
|
+
# Pass arguments to `get_volume` via keyword arguments. Note that at
|
871
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
872
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
873
|
+
#
|
874
|
+
# @param name [::String]
|
875
|
+
# Required. Name of the volume
|
876
|
+
#
|
877
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
878
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::Volume]
|
879
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
880
|
+
#
|
881
|
+
# @return [::Google::Cloud::NetApp::V1::Volume]
|
882
|
+
#
|
883
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
884
|
+
#
|
885
|
+
# @example Basic example
|
886
|
+
# require "google/cloud/netapp/v1"
|
887
|
+
#
|
888
|
+
# # Create a client object. The client can be reused for multiple calls.
|
889
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
890
|
+
#
|
891
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
892
|
+
# request = Google::Cloud::NetApp::V1::GetVolumeRequest.new
|
893
|
+
#
|
894
|
+
# # Call the get_volume method.
|
895
|
+
# result = client.get_volume request
|
896
|
+
#
|
897
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::Volume.
|
898
|
+
# p result
|
899
|
+
#
|
900
|
+
def get_volume request, options = nil
|
901
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
902
|
+
|
903
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetVolumeRequest
|
904
|
+
|
905
|
+
# Converts hash and nil to an options object
|
906
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
907
|
+
|
908
|
+
# Customize the options with defaults
|
909
|
+
metadata = @config.rpcs.get_volume.metadata.to_h
|
910
|
+
|
911
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
912
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
913
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
914
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
915
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
916
|
+
|
917
|
+
header_params = {}
|
918
|
+
if request.name
|
919
|
+
header_params["name"] = request.name
|
920
|
+
end
|
921
|
+
|
922
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
923
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
924
|
+
|
925
|
+
options.apply_defaults timeout: @config.rpcs.get_volume.timeout,
|
926
|
+
metadata: metadata,
|
927
|
+
retry_policy: @config.rpcs.get_volume.retry_policy
|
928
|
+
|
929
|
+
options.apply_defaults timeout: @config.timeout,
|
930
|
+
metadata: @config.metadata,
|
931
|
+
retry_policy: @config.retry_policy
|
932
|
+
|
933
|
+
@net_app_stub.call_rpc :get_volume, request, options: options do |response, operation|
|
934
|
+
yield response, operation if block_given?
|
935
|
+
return response
|
936
|
+
end
|
937
|
+
rescue ::GRPC::BadStatus => e
|
938
|
+
raise ::Google::Cloud::Error.from_error(e)
|
939
|
+
end
|
940
|
+
|
941
|
+
##
|
942
|
+
# Creates a new Volume in a given project and location.
|
943
|
+
#
|
944
|
+
# @overload create_volume(request, options = nil)
|
945
|
+
# Pass arguments to `create_volume` via a request object, either of type
|
946
|
+
# {::Google::Cloud::NetApp::V1::CreateVolumeRequest} or an equivalent Hash.
|
947
|
+
#
|
948
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateVolumeRequest, ::Hash]
|
949
|
+
# A request object representing the call parameters. Required. To specify no
|
950
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
951
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
952
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
953
|
+
#
|
954
|
+
# @overload create_volume(parent: nil, volume_id: nil, volume: nil)
|
955
|
+
# Pass arguments to `create_volume` via keyword arguments. Note that at
|
956
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
957
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
958
|
+
#
|
959
|
+
# @param parent [::String]
|
960
|
+
# Required. Value for parent.
|
961
|
+
# @param volume_id [::String]
|
962
|
+
# Required. Id of the requesting volume
|
963
|
+
# If auto-generating Id server-side, remove this field and
|
964
|
+
# Id from the method_signature of Create RPC
|
965
|
+
# @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
|
966
|
+
# Required. The volume being created.
|
967
|
+
#
|
968
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
969
|
+
# @yieldparam response [::Gapic::Operation]
|
970
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
971
|
+
#
|
972
|
+
# @return [::Gapic::Operation]
|
973
|
+
#
|
974
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
975
|
+
#
|
976
|
+
# @example Basic example
|
977
|
+
# require "google/cloud/netapp/v1"
|
978
|
+
#
|
979
|
+
# # Create a client object. The client can be reused for multiple calls.
|
980
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
981
|
+
#
|
982
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
983
|
+
# request = Google::Cloud::NetApp::V1::CreateVolumeRequest.new
|
984
|
+
#
|
985
|
+
# # Call the create_volume method.
|
986
|
+
# result = client.create_volume request
|
987
|
+
#
|
988
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
989
|
+
# # check the status of an operation, cancel it, or wait for results.
|
990
|
+
# # Here is how to wait for a response.
|
991
|
+
# result.wait_until_done! timeout: 60
|
992
|
+
# if result.response?
|
993
|
+
# p result.response
|
994
|
+
# else
|
995
|
+
# puts "No response received."
|
996
|
+
# end
|
997
|
+
#
|
998
|
+
def create_volume request, options = nil
|
999
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1000
|
+
|
1001
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateVolumeRequest
|
1002
|
+
|
1003
|
+
# Converts hash and nil to an options object
|
1004
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1005
|
+
|
1006
|
+
# Customize the options with defaults
|
1007
|
+
metadata = @config.rpcs.create_volume.metadata.to_h
|
1008
|
+
|
1009
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1010
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1011
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1012
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1013
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1014
|
+
|
1015
|
+
header_params = {}
|
1016
|
+
if request.parent
|
1017
|
+
header_params["parent"] = request.parent
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1021
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1022
|
+
|
1023
|
+
options.apply_defaults timeout: @config.rpcs.create_volume.timeout,
|
1024
|
+
metadata: metadata,
|
1025
|
+
retry_policy: @config.rpcs.create_volume.retry_policy
|
1026
|
+
|
1027
|
+
options.apply_defaults timeout: @config.timeout,
|
1028
|
+
metadata: @config.metadata,
|
1029
|
+
retry_policy: @config.retry_policy
|
1030
|
+
|
1031
|
+
@net_app_stub.call_rpc :create_volume, request, options: options do |response, operation|
|
1032
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1033
|
+
yield response, operation if block_given?
|
1034
|
+
return response
|
1035
|
+
end
|
1036
|
+
rescue ::GRPC::BadStatus => e
|
1037
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
##
|
1041
|
+
# Updates the parameters of a single Volume.
|
1042
|
+
#
|
1043
|
+
# @overload update_volume(request, options = nil)
|
1044
|
+
# Pass arguments to `update_volume` via a request object, either of type
|
1045
|
+
# {::Google::Cloud::NetApp::V1::UpdateVolumeRequest} or an equivalent Hash.
|
1046
|
+
#
|
1047
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateVolumeRequest, ::Hash]
|
1048
|
+
# A request object representing the call parameters. Required. To specify no
|
1049
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1050
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1051
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1052
|
+
#
|
1053
|
+
# @overload update_volume(update_mask: nil, volume: nil)
|
1054
|
+
# Pass arguments to `update_volume` via keyword arguments. Note that at
|
1055
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1056
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1057
|
+
#
|
1058
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1059
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1060
|
+
# Volume resource by the update.
|
1061
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1062
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1063
|
+
# user does not provide a mask then all fields will be overwritten.
|
1064
|
+
# @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
|
1065
|
+
# Required. The volume being updated
|
1066
|
+
#
|
1067
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1068
|
+
# @yieldparam response [::Gapic::Operation]
|
1069
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1070
|
+
#
|
1071
|
+
# @return [::Gapic::Operation]
|
1072
|
+
#
|
1073
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1074
|
+
#
|
1075
|
+
# @example Basic example
|
1076
|
+
# require "google/cloud/netapp/v1"
|
1077
|
+
#
|
1078
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1079
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1080
|
+
#
|
1081
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1082
|
+
# request = Google::Cloud::NetApp::V1::UpdateVolumeRequest.new
|
1083
|
+
#
|
1084
|
+
# # Call the update_volume method.
|
1085
|
+
# result = client.update_volume request
|
1086
|
+
#
|
1087
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1088
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1089
|
+
# # Here is how to wait for a response.
|
1090
|
+
# result.wait_until_done! timeout: 60
|
1091
|
+
# if result.response?
|
1092
|
+
# p result.response
|
1093
|
+
# else
|
1094
|
+
# puts "No response received."
|
1095
|
+
# end
|
1096
|
+
#
|
1097
|
+
def update_volume request, options = nil
|
1098
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1099
|
+
|
1100
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateVolumeRequest
|
1101
|
+
|
1102
|
+
# Converts hash and nil to an options object
|
1103
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1104
|
+
|
1105
|
+
# Customize the options with defaults
|
1106
|
+
metadata = @config.rpcs.update_volume.metadata.to_h
|
1107
|
+
|
1108
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1109
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1110
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1111
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1112
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1113
|
+
|
1114
|
+
header_params = {}
|
1115
|
+
if request.volume&.name
|
1116
|
+
header_params["volume.name"] = request.volume.name
|
1117
|
+
end
|
1118
|
+
|
1119
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1120
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1121
|
+
|
1122
|
+
options.apply_defaults timeout: @config.rpcs.update_volume.timeout,
|
1123
|
+
metadata: metadata,
|
1124
|
+
retry_policy: @config.rpcs.update_volume.retry_policy
|
1125
|
+
|
1126
|
+
options.apply_defaults timeout: @config.timeout,
|
1127
|
+
metadata: @config.metadata,
|
1128
|
+
retry_policy: @config.retry_policy
|
1129
|
+
|
1130
|
+
@net_app_stub.call_rpc :update_volume, request, options: options do |response, operation|
|
1131
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1132
|
+
yield response, operation if block_given?
|
1133
|
+
return response
|
1134
|
+
end
|
1135
|
+
rescue ::GRPC::BadStatus => e
|
1136
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
##
|
1140
|
+
# Deletes a single Volume.
|
1141
|
+
#
|
1142
|
+
# @overload delete_volume(request, options = nil)
|
1143
|
+
# Pass arguments to `delete_volume` via a request object, either of type
|
1144
|
+
# {::Google::Cloud::NetApp::V1::DeleteVolumeRequest} or an equivalent Hash.
|
1145
|
+
#
|
1146
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteVolumeRequest, ::Hash]
|
1147
|
+
# A request object representing the call parameters. Required. To specify no
|
1148
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1149
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1150
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1151
|
+
#
|
1152
|
+
# @overload delete_volume(name: nil, force: nil)
|
1153
|
+
# Pass arguments to `delete_volume` via keyword arguments. Note that at
|
1154
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1155
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1156
|
+
#
|
1157
|
+
# @param name [::String]
|
1158
|
+
# Required. Name of the volume
|
1159
|
+
# @param force [::Boolean]
|
1160
|
+
# If this field is set as true, CCFE will not block the volume resource
|
1161
|
+
# deletion even if it has any snapshots resource. (Otherwise, the request
|
1162
|
+
# will only work if the volume has no snapshots.)
|
1163
|
+
#
|
1164
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1165
|
+
# @yieldparam response [::Gapic::Operation]
|
1166
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1167
|
+
#
|
1168
|
+
# @return [::Gapic::Operation]
|
1169
|
+
#
|
1170
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1171
|
+
#
|
1172
|
+
# @example Basic example
|
1173
|
+
# require "google/cloud/netapp/v1"
|
1174
|
+
#
|
1175
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1176
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1177
|
+
#
|
1178
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1179
|
+
# request = Google::Cloud::NetApp::V1::DeleteVolumeRequest.new
|
1180
|
+
#
|
1181
|
+
# # Call the delete_volume method.
|
1182
|
+
# result = client.delete_volume request
|
1183
|
+
#
|
1184
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1185
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1186
|
+
# # Here is how to wait for a response.
|
1187
|
+
# result.wait_until_done! timeout: 60
|
1188
|
+
# if result.response?
|
1189
|
+
# p result.response
|
1190
|
+
# else
|
1191
|
+
# puts "No response received."
|
1192
|
+
# end
|
1193
|
+
#
|
1194
|
+
def delete_volume request, options = nil
|
1195
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1196
|
+
|
1197
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteVolumeRequest
|
1198
|
+
|
1199
|
+
# Converts hash and nil to an options object
|
1200
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1201
|
+
|
1202
|
+
# Customize the options with defaults
|
1203
|
+
metadata = @config.rpcs.delete_volume.metadata.to_h
|
1204
|
+
|
1205
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1206
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1207
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1208
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1209
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1210
|
+
|
1211
|
+
header_params = {}
|
1212
|
+
if request.name
|
1213
|
+
header_params["name"] = request.name
|
1214
|
+
end
|
1215
|
+
|
1216
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1217
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1218
|
+
|
1219
|
+
options.apply_defaults timeout: @config.rpcs.delete_volume.timeout,
|
1220
|
+
metadata: metadata,
|
1221
|
+
retry_policy: @config.rpcs.delete_volume.retry_policy
|
1222
|
+
|
1223
|
+
options.apply_defaults timeout: @config.timeout,
|
1224
|
+
metadata: @config.metadata,
|
1225
|
+
retry_policy: @config.retry_policy
|
1226
|
+
|
1227
|
+
@net_app_stub.call_rpc :delete_volume, request, options: options do |response, operation|
|
1228
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1229
|
+
yield response, operation if block_given?
|
1230
|
+
return response
|
1231
|
+
end
|
1232
|
+
rescue ::GRPC::BadStatus => e
|
1233
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
##
|
1237
|
+
# Revert an existing volume to a specified snapshot.
|
1238
|
+
# Warning! This operation will permanently revert all changes made after the
|
1239
|
+
# snapshot was created.
|
1240
|
+
#
|
1241
|
+
# @overload revert_volume(request, options = nil)
|
1242
|
+
# Pass arguments to `revert_volume` via a request object, either of type
|
1243
|
+
# {::Google::Cloud::NetApp::V1::RevertVolumeRequest} or an equivalent Hash.
|
1244
|
+
#
|
1245
|
+
# @param request [::Google::Cloud::NetApp::V1::RevertVolumeRequest, ::Hash]
|
1246
|
+
# A request object representing the call parameters. Required. To specify no
|
1247
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1248
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1249
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1250
|
+
#
|
1251
|
+
# @overload revert_volume(name: nil, snapshot_id: nil)
|
1252
|
+
# Pass arguments to `revert_volume` via keyword arguments. Note that at
|
1253
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1254
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1255
|
+
#
|
1256
|
+
# @param name [::String]
|
1257
|
+
# Required. The resource name of the volume, in the format of
|
1258
|
+
# projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}.
|
1259
|
+
# @param snapshot_id [::String]
|
1260
|
+
# Required. The snapshot resource ID, in the format 'my-snapshot', where the
|
1261
|
+
# specified ID is the \\{snapshot_id} of the fully qualified name like
|
1262
|
+
# projects/\\{project_id}/locations/\\{location_id}/volumes/\\{volume_id}/snapshots/\\{snapshot_id}
|
1263
|
+
#
|
1264
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1265
|
+
# @yieldparam response [::Gapic::Operation]
|
1266
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1267
|
+
#
|
1268
|
+
# @return [::Gapic::Operation]
|
1269
|
+
#
|
1270
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1271
|
+
#
|
1272
|
+
# @example Basic example
|
1273
|
+
# require "google/cloud/netapp/v1"
|
1274
|
+
#
|
1275
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1276
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1277
|
+
#
|
1278
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1279
|
+
# request = Google::Cloud::NetApp::V1::RevertVolumeRequest.new
|
1280
|
+
#
|
1281
|
+
# # Call the revert_volume method.
|
1282
|
+
# result = client.revert_volume request
|
1283
|
+
#
|
1284
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1285
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1286
|
+
# # Here is how to wait for a response.
|
1287
|
+
# result.wait_until_done! timeout: 60
|
1288
|
+
# if result.response?
|
1289
|
+
# p result.response
|
1290
|
+
# else
|
1291
|
+
# puts "No response received."
|
1292
|
+
# end
|
1293
|
+
#
|
1294
|
+
def revert_volume request, options = nil
|
1295
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1296
|
+
|
1297
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RevertVolumeRequest
|
1298
|
+
|
1299
|
+
# Converts hash and nil to an options object
|
1300
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1301
|
+
|
1302
|
+
# Customize the options with defaults
|
1303
|
+
metadata = @config.rpcs.revert_volume.metadata.to_h
|
1304
|
+
|
1305
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1306
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1307
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1308
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1309
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1310
|
+
|
1311
|
+
header_params = {}
|
1312
|
+
if request.name
|
1313
|
+
header_params["name"] = request.name
|
1314
|
+
end
|
1315
|
+
|
1316
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1317
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1318
|
+
|
1319
|
+
options.apply_defaults timeout: @config.rpcs.revert_volume.timeout,
|
1320
|
+
metadata: metadata,
|
1321
|
+
retry_policy: @config.rpcs.revert_volume.retry_policy
|
1322
|
+
|
1323
|
+
options.apply_defaults timeout: @config.timeout,
|
1324
|
+
metadata: @config.metadata,
|
1325
|
+
retry_policy: @config.retry_policy
|
1326
|
+
|
1327
|
+
@net_app_stub.call_rpc :revert_volume, request, options: options do |response, operation|
|
1328
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1329
|
+
yield response, operation if block_given?
|
1330
|
+
return response
|
1331
|
+
end
|
1332
|
+
rescue ::GRPC::BadStatus => e
|
1333
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
##
|
1337
|
+
# Returns descriptions of all snapshots for a volume.
|
1338
|
+
#
|
1339
|
+
# @overload list_snapshots(request, options = nil)
|
1340
|
+
# Pass arguments to `list_snapshots` via a request object, either of type
|
1341
|
+
# {::Google::Cloud::NetApp::V1::ListSnapshotsRequest} or an equivalent Hash.
|
1342
|
+
#
|
1343
|
+
# @param request [::Google::Cloud::NetApp::V1::ListSnapshotsRequest, ::Hash]
|
1344
|
+
# A request object representing the call parameters. Required. To specify no
|
1345
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1346
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1347
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1348
|
+
#
|
1349
|
+
# @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
1350
|
+
# Pass arguments to `list_snapshots` via keyword arguments. Note that at
|
1351
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1352
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1353
|
+
#
|
1354
|
+
# @param parent [::String]
|
1355
|
+
# Required. The volume for which to retrieve snapshot information,
|
1356
|
+
# in the format
|
1357
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
|
1358
|
+
# @param page_size [::Integer]
|
1359
|
+
# The maximum number of items to return.
|
1360
|
+
# @param page_token [::String]
|
1361
|
+
# The next_page_token value to use if there are additional
|
1362
|
+
# results to retrieve for this list request.
|
1363
|
+
# @param order_by [::String]
|
1364
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
1365
|
+
# @param filter [::String]
|
1366
|
+
# List filter.
|
1367
|
+
#
|
1368
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1369
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>]
|
1370
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1371
|
+
#
|
1372
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>]
|
1373
|
+
#
|
1374
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1375
|
+
#
|
1376
|
+
# @example Basic example
|
1377
|
+
# require "google/cloud/netapp/v1"
|
1378
|
+
#
|
1379
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1380
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1381
|
+
#
|
1382
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1383
|
+
# request = Google::Cloud::NetApp::V1::ListSnapshotsRequest.new
|
1384
|
+
#
|
1385
|
+
# # Call the list_snapshots method.
|
1386
|
+
# result = client.list_snapshots request
|
1387
|
+
#
|
1388
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1389
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1390
|
+
# result.each do |item|
|
1391
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::Snapshot.
|
1392
|
+
# p item
|
1393
|
+
# end
|
1394
|
+
#
|
1395
|
+
def list_snapshots request, options = nil
|
1396
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1397
|
+
|
1398
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListSnapshotsRequest
|
1399
|
+
|
1400
|
+
# Converts hash and nil to an options object
|
1401
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1402
|
+
|
1403
|
+
# Customize the options with defaults
|
1404
|
+
metadata = @config.rpcs.list_snapshots.metadata.to_h
|
1405
|
+
|
1406
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1407
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1408
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1409
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1410
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1411
|
+
|
1412
|
+
header_params = {}
|
1413
|
+
if request.parent
|
1414
|
+
header_params["parent"] = request.parent
|
1415
|
+
end
|
1416
|
+
|
1417
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1418
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1419
|
+
|
1420
|
+
options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
|
1421
|
+
metadata: metadata,
|
1422
|
+
retry_policy: @config.rpcs.list_snapshots.retry_policy
|
1423
|
+
|
1424
|
+
options.apply_defaults timeout: @config.timeout,
|
1425
|
+
metadata: @config.metadata,
|
1426
|
+
retry_policy: @config.retry_policy
|
1427
|
+
|
1428
|
+
@net_app_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
|
1429
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_snapshots, request, response, operation, options
|
1430
|
+
yield response, operation if block_given?
|
1431
|
+
return response
|
1432
|
+
end
|
1433
|
+
rescue ::GRPC::BadStatus => e
|
1434
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1435
|
+
end
|
1436
|
+
|
1437
|
+
##
|
1438
|
+
# Describe a snapshot for a volume.
|
1439
|
+
#
|
1440
|
+
# @overload get_snapshot(request, options = nil)
|
1441
|
+
# Pass arguments to `get_snapshot` via a request object, either of type
|
1442
|
+
# {::Google::Cloud::NetApp::V1::GetSnapshotRequest} or an equivalent Hash.
|
1443
|
+
#
|
1444
|
+
# @param request [::Google::Cloud::NetApp::V1::GetSnapshotRequest, ::Hash]
|
1445
|
+
# A request object representing the call parameters. Required. To specify no
|
1446
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1447
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1448
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1449
|
+
#
|
1450
|
+
# @overload get_snapshot(name: nil)
|
1451
|
+
# Pass arguments to `get_snapshot` via keyword arguments. Note that at
|
1452
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1453
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1454
|
+
#
|
1455
|
+
# @param name [::String]
|
1456
|
+
# Required. The snapshot resource name, in the format
|
1457
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
|
1458
|
+
#
|
1459
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1460
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::Snapshot]
|
1461
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1462
|
+
#
|
1463
|
+
# @return [::Google::Cloud::NetApp::V1::Snapshot]
|
1464
|
+
#
|
1465
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1466
|
+
#
|
1467
|
+
# @example Basic example
|
1468
|
+
# require "google/cloud/netapp/v1"
|
1469
|
+
#
|
1470
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1471
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1472
|
+
#
|
1473
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1474
|
+
# request = Google::Cloud::NetApp::V1::GetSnapshotRequest.new
|
1475
|
+
#
|
1476
|
+
# # Call the get_snapshot method.
|
1477
|
+
# result = client.get_snapshot request
|
1478
|
+
#
|
1479
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::Snapshot.
|
1480
|
+
# p result
|
1481
|
+
#
|
1482
|
+
def get_snapshot request, options = nil
|
1483
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1484
|
+
|
1485
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetSnapshotRequest
|
1486
|
+
|
1487
|
+
# Converts hash and nil to an options object
|
1488
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1489
|
+
|
1490
|
+
# Customize the options with defaults
|
1491
|
+
metadata = @config.rpcs.get_snapshot.metadata.to_h
|
1492
|
+
|
1493
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1494
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1495
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1496
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1497
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1498
|
+
|
1499
|
+
header_params = {}
|
1500
|
+
if request.name
|
1501
|
+
header_params["name"] = request.name
|
1502
|
+
end
|
1503
|
+
|
1504
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1505
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1506
|
+
|
1507
|
+
options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
|
1508
|
+
metadata: metadata,
|
1509
|
+
retry_policy: @config.rpcs.get_snapshot.retry_policy
|
1510
|
+
|
1511
|
+
options.apply_defaults timeout: @config.timeout,
|
1512
|
+
metadata: @config.metadata,
|
1513
|
+
retry_policy: @config.retry_policy
|
1514
|
+
|
1515
|
+
@net_app_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
|
1516
|
+
yield response, operation if block_given?
|
1517
|
+
return response
|
1518
|
+
end
|
1519
|
+
rescue ::GRPC::BadStatus => e
|
1520
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
##
|
1524
|
+
# Create a new snapshot for a volume.
|
1525
|
+
#
|
1526
|
+
# @overload create_snapshot(request, options = nil)
|
1527
|
+
# Pass arguments to `create_snapshot` via a request object, either of type
|
1528
|
+
# {::Google::Cloud::NetApp::V1::CreateSnapshotRequest} or an equivalent Hash.
|
1529
|
+
#
|
1530
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateSnapshotRequest, ::Hash]
|
1531
|
+
# A request object representing the call parameters. Required. To specify no
|
1532
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1533
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1534
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1535
|
+
#
|
1536
|
+
# @overload create_snapshot(parent: nil, snapshot: nil, snapshot_id: nil)
|
1537
|
+
# Pass arguments to `create_snapshot` via keyword arguments. Note that at
|
1538
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1539
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1540
|
+
#
|
1541
|
+
# @param parent [::String]
|
1542
|
+
# Required. The NetApp volume to create the snapshots of, in the format
|
1543
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}`
|
1544
|
+
# @param snapshot [::Google::Cloud::NetApp::V1::Snapshot, ::Hash]
|
1545
|
+
# Required. A snapshot resource
|
1546
|
+
# @param snapshot_id [::String]
|
1547
|
+
# Required. ID of the snapshot to create.
|
1548
|
+
# This value must start with a lowercase letter followed by up to 62
|
1549
|
+
# lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
|
1550
|
+
#
|
1551
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1552
|
+
# @yieldparam response [::Gapic::Operation]
|
1553
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1554
|
+
#
|
1555
|
+
# @return [::Gapic::Operation]
|
1556
|
+
#
|
1557
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1558
|
+
#
|
1559
|
+
# @example Basic example
|
1560
|
+
# require "google/cloud/netapp/v1"
|
1561
|
+
#
|
1562
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1563
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1564
|
+
#
|
1565
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1566
|
+
# request = Google::Cloud::NetApp::V1::CreateSnapshotRequest.new
|
1567
|
+
#
|
1568
|
+
# # Call the create_snapshot method.
|
1569
|
+
# result = client.create_snapshot request
|
1570
|
+
#
|
1571
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1572
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1573
|
+
# # Here is how to wait for a response.
|
1574
|
+
# result.wait_until_done! timeout: 60
|
1575
|
+
# if result.response?
|
1576
|
+
# p result.response
|
1577
|
+
# else
|
1578
|
+
# puts "No response received."
|
1579
|
+
# end
|
1580
|
+
#
|
1581
|
+
def create_snapshot request, options = nil
|
1582
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1583
|
+
|
1584
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateSnapshotRequest
|
1585
|
+
|
1586
|
+
# Converts hash and nil to an options object
|
1587
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1588
|
+
|
1589
|
+
# Customize the options with defaults
|
1590
|
+
metadata = @config.rpcs.create_snapshot.metadata.to_h
|
1591
|
+
|
1592
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1593
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1594
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1595
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1596
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1597
|
+
|
1598
|
+
header_params = {}
|
1599
|
+
if request.parent
|
1600
|
+
header_params["parent"] = request.parent
|
1601
|
+
end
|
1602
|
+
|
1603
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1604
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1605
|
+
|
1606
|
+
options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
|
1607
|
+
metadata: metadata,
|
1608
|
+
retry_policy: @config.rpcs.create_snapshot.retry_policy
|
1609
|
+
|
1610
|
+
options.apply_defaults timeout: @config.timeout,
|
1611
|
+
metadata: @config.metadata,
|
1612
|
+
retry_policy: @config.retry_policy
|
1613
|
+
|
1614
|
+
@net_app_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
|
1615
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1616
|
+
yield response, operation if block_given?
|
1617
|
+
return response
|
1618
|
+
end
|
1619
|
+
rescue ::GRPC::BadStatus => e
|
1620
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1621
|
+
end
|
1622
|
+
|
1623
|
+
##
|
1624
|
+
# Deletes a snapshot.
|
1625
|
+
#
|
1626
|
+
# @overload delete_snapshot(request, options = nil)
|
1627
|
+
# Pass arguments to `delete_snapshot` via a request object, either of type
|
1628
|
+
# {::Google::Cloud::NetApp::V1::DeleteSnapshotRequest} or an equivalent Hash.
|
1629
|
+
#
|
1630
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteSnapshotRequest, ::Hash]
|
1631
|
+
# A request object representing the call parameters. Required. To specify no
|
1632
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1633
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1634
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1635
|
+
#
|
1636
|
+
# @overload delete_snapshot(name: nil)
|
1637
|
+
# Pass arguments to `delete_snapshot` via keyword arguments. Note that at
|
1638
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1639
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1640
|
+
#
|
1641
|
+
# @param name [::String]
|
1642
|
+
# Required. The snapshot resource name, in the format
|
1643
|
+
# `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`
|
1644
|
+
#
|
1645
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1646
|
+
# @yieldparam response [::Gapic::Operation]
|
1647
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1648
|
+
#
|
1649
|
+
# @return [::Gapic::Operation]
|
1650
|
+
#
|
1651
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1652
|
+
#
|
1653
|
+
# @example Basic example
|
1654
|
+
# require "google/cloud/netapp/v1"
|
1655
|
+
#
|
1656
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1657
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1658
|
+
#
|
1659
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1660
|
+
# request = Google::Cloud::NetApp::V1::DeleteSnapshotRequest.new
|
1661
|
+
#
|
1662
|
+
# # Call the delete_snapshot method.
|
1663
|
+
# result = client.delete_snapshot request
|
1664
|
+
#
|
1665
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1666
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1667
|
+
# # Here is how to wait for a response.
|
1668
|
+
# result.wait_until_done! timeout: 60
|
1669
|
+
# if result.response?
|
1670
|
+
# p result.response
|
1671
|
+
# else
|
1672
|
+
# puts "No response received."
|
1673
|
+
# end
|
1674
|
+
#
|
1675
|
+
def delete_snapshot request, options = nil
|
1676
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1677
|
+
|
1678
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteSnapshotRequest
|
1679
|
+
|
1680
|
+
# Converts hash and nil to an options object
|
1681
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1682
|
+
|
1683
|
+
# Customize the options with defaults
|
1684
|
+
metadata = @config.rpcs.delete_snapshot.metadata.to_h
|
1685
|
+
|
1686
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1687
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1688
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1689
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1690
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1691
|
+
|
1692
|
+
header_params = {}
|
1693
|
+
if request.name
|
1694
|
+
header_params["name"] = request.name
|
1695
|
+
end
|
1696
|
+
|
1697
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1698
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1699
|
+
|
1700
|
+
options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
|
1701
|
+
metadata: metadata,
|
1702
|
+
retry_policy: @config.rpcs.delete_snapshot.retry_policy
|
1703
|
+
|
1704
|
+
options.apply_defaults timeout: @config.timeout,
|
1705
|
+
metadata: @config.metadata,
|
1706
|
+
retry_policy: @config.retry_policy
|
1707
|
+
|
1708
|
+
@net_app_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
|
1709
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1710
|
+
yield response, operation if block_given?
|
1711
|
+
return response
|
1712
|
+
end
|
1713
|
+
rescue ::GRPC::BadStatus => e
|
1714
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1715
|
+
end
|
1716
|
+
|
1717
|
+
##
|
1718
|
+
# Updates the settings of a specific snapshot.
|
1719
|
+
#
|
1720
|
+
# @overload update_snapshot(request, options = nil)
|
1721
|
+
# Pass arguments to `update_snapshot` via a request object, either of type
|
1722
|
+
# {::Google::Cloud::NetApp::V1::UpdateSnapshotRequest} or an equivalent Hash.
|
1723
|
+
#
|
1724
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateSnapshotRequest, ::Hash]
|
1725
|
+
# A request object representing the call parameters. Required. To specify no
|
1726
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1727
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1728
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1729
|
+
#
|
1730
|
+
# @overload update_snapshot(update_mask: nil, snapshot: nil)
|
1731
|
+
# Pass arguments to `update_snapshot` via keyword arguments. Note that at
|
1732
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1733
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1734
|
+
#
|
1735
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1736
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
1737
|
+
# this field.
|
1738
|
+
# @param snapshot [::Google::Cloud::NetApp::V1::Snapshot, ::Hash]
|
1739
|
+
# Required. A snapshot resource
|
1740
|
+
#
|
1741
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1742
|
+
# @yieldparam response [::Gapic::Operation]
|
1743
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1744
|
+
#
|
1745
|
+
# @return [::Gapic::Operation]
|
1746
|
+
#
|
1747
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1748
|
+
#
|
1749
|
+
# @example Basic example
|
1750
|
+
# require "google/cloud/netapp/v1"
|
1751
|
+
#
|
1752
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1753
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1754
|
+
#
|
1755
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1756
|
+
# request = Google::Cloud::NetApp::V1::UpdateSnapshotRequest.new
|
1757
|
+
#
|
1758
|
+
# # Call the update_snapshot method.
|
1759
|
+
# result = client.update_snapshot request
|
1760
|
+
#
|
1761
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1762
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1763
|
+
# # Here is how to wait for a response.
|
1764
|
+
# result.wait_until_done! timeout: 60
|
1765
|
+
# if result.response?
|
1766
|
+
# p result.response
|
1767
|
+
# else
|
1768
|
+
# puts "No response received."
|
1769
|
+
# end
|
1770
|
+
#
|
1771
|
+
def update_snapshot request, options = nil
|
1772
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1773
|
+
|
1774
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateSnapshotRequest
|
1775
|
+
|
1776
|
+
# Converts hash and nil to an options object
|
1777
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1778
|
+
|
1779
|
+
# Customize the options with defaults
|
1780
|
+
metadata = @config.rpcs.update_snapshot.metadata.to_h
|
1781
|
+
|
1782
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1783
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1784
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1785
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1786
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1787
|
+
|
1788
|
+
header_params = {}
|
1789
|
+
if request.snapshot&.name
|
1790
|
+
header_params["snapshot.name"] = request.snapshot.name
|
1791
|
+
end
|
1792
|
+
|
1793
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1794
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1795
|
+
|
1796
|
+
options.apply_defaults timeout: @config.rpcs.update_snapshot.timeout,
|
1797
|
+
metadata: metadata,
|
1798
|
+
retry_policy: @config.rpcs.update_snapshot.retry_policy
|
1799
|
+
|
1800
|
+
options.apply_defaults timeout: @config.timeout,
|
1801
|
+
metadata: @config.metadata,
|
1802
|
+
retry_policy: @config.retry_policy
|
1803
|
+
|
1804
|
+
@net_app_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
|
1805
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1806
|
+
yield response, operation if block_given?
|
1807
|
+
return response
|
1808
|
+
end
|
1809
|
+
rescue ::GRPC::BadStatus => e
|
1810
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1811
|
+
end
|
1812
|
+
|
1813
|
+
##
|
1814
|
+
# Lists active directories.
|
1815
|
+
#
|
1816
|
+
# @overload list_active_directories(request, options = nil)
|
1817
|
+
# Pass arguments to `list_active_directories` via a request object, either of type
|
1818
|
+
# {::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest} or an equivalent Hash.
|
1819
|
+
#
|
1820
|
+
# @param request [::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest, ::Hash]
|
1821
|
+
# A request object representing the call parameters. Required. To specify no
|
1822
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1823
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1824
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1825
|
+
#
|
1826
|
+
# @overload list_active_directories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1827
|
+
# Pass arguments to `list_active_directories` via keyword arguments. Note that at
|
1828
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1829
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1830
|
+
#
|
1831
|
+
# @param parent [::String]
|
1832
|
+
# Required. Parent value for ListActiveDirectoriesRequest
|
1833
|
+
# @param page_size [::Integer]
|
1834
|
+
# Requested page size. Server may return fewer items than requested.
|
1835
|
+
# If unspecified, the server will pick an appropriate default.
|
1836
|
+
# @param page_token [::String]
|
1837
|
+
# A token identifying a page of results the server should return.
|
1838
|
+
# @param filter [::String]
|
1839
|
+
# Filtering results
|
1840
|
+
# @param order_by [::String]
|
1841
|
+
# Hint for how to order the results
|
1842
|
+
#
|
1843
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1844
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>]
|
1845
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1846
|
+
#
|
1847
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>]
|
1848
|
+
#
|
1849
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1850
|
+
#
|
1851
|
+
# @example Basic example
|
1852
|
+
# require "google/cloud/netapp/v1"
|
1853
|
+
#
|
1854
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1855
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1856
|
+
#
|
1857
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1858
|
+
# request = Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest.new
|
1859
|
+
#
|
1860
|
+
# # Call the list_active_directories method.
|
1861
|
+
# result = client.list_active_directories request
|
1862
|
+
#
|
1863
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1864
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1865
|
+
# result.each do |item|
|
1866
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::ActiveDirectory.
|
1867
|
+
# p item
|
1868
|
+
# end
|
1869
|
+
#
|
1870
|
+
def list_active_directories request, options = nil
|
1871
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1872
|
+
|
1873
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest
|
1874
|
+
|
1875
|
+
# Converts hash and nil to an options object
|
1876
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1877
|
+
|
1878
|
+
# Customize the options with defaults
|
1879
|
+
metadata = @config.rpcs.list_active_directories.metadata.to_h
|
1880
|
+
|
1881
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1882
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1883
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1884
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1885
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1886
|
+
|
1887
|
+
header_params = {}
|
1888
|
+
if request.parent
|
1889
|
+
header_params["parent"] = request.parent
|
1890
|
+
end
|
1891
|
+
|
1892
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1893
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1894
|
+
|
1895
|
+
options.apply_defaults timeout: @config.rpcs.list_active_directories.timeout,
|
1896
|
+
metadata: metadata,
|
1897
|
+
retry_policy: @config.rpcs.list_active_directories.retry_policy
|
1898
|
+
|
1899
|
+
options.apply_defaults timeout: @config.timeout,
|
1900
|
+
metadata: @config.metadata,
|
1901
|
+
retry_policy: @config.retry_policy
|
1902
|
+
|
1903
|
+
@net_app_stub.call_rpc :list_active_directories, request, options: options do |response, operation|
|
1904
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_active_directories, request, response, operation, options
|
1905
|
+
yield response, operation if block_given?
|
1906
|
+
return response
|
1907
|
+
end
|
1908
|
+
rescue ::GRPC::BadStatus => e
|
1909
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1910
|
+
end
|
1911
|
+
|
1912
|
+
##
|
1913
|
+
# Describes a specified active directory.
|
1914
|
+
#
|
1915
|
+
# @overload get_active_directory(request, options = nil)
|
1916
|
+
# Pass arguments to `get_active_directory` via a request object, either of type
|
1917
|
+
# {::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest} or an equivalent Hash.
|
1918
|
+
#
|
1919
|
+
# @param request [::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest, ::Hash]
|
1920
|
+
# A request object representing the call parameters. Required. To specify no
|
1921
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1922
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1923
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1924
|
+
#
|
1925
|
+
# @overload get_active_directory(name: nil)
|
1926
|
+
# Pass arguments to `get_active_directory` via keyword arguments. Note that at
|
1927
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1928
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1929
|
+
#
|
1930
|
+
# @param name [::String]
|
1931
|
+
# Required. Name of the active directory.
|
1932
|
+
#
|
1933
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1934
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::ActiveDirectory]
|
1935
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1936
|
+
#
|
1937
|
+
# @return [::Google::Cloud::NetApp::V1::ActiveDirectory]
|
1938
|
+
#
|
1939
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1940
|
+
#
|
1941
|
+
# @example Basic example
|
1942
|
+
# require "google/cloud/netapp/v1"
|
1943
|
+
#
|
1944
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1945
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
1946
|
+
#
|
1947
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1948
|
+
# request = Google::Cloud::NetApp::V1::GetActiveDirectoryRequest.new
|
1949
|
+
#
|
1950
|
+
# # Call the get_active_directory method.
|
1951
|
+
# result = client.get_active_directory request
|
1952
|
+
#
|
1953
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::ActiveDirectory.
|
1954
|
+
# p result
|
1955
|
+
#
|
1956
|
+
def get_active_directory request, options = nil
|
1957
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1958
|
+
|
1959
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest
|
1960
|
+
|
1961
|
+
# Converts hash and nil to an options object
|
1962
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1963
|
+
|
1964
|
+
# Customize the options with defaults
|
1965
|
+
metadata = @config.rpcs.get_active_directory.metadata.to_h
|
1966
|
+
|
1967
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1968
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1969
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1970
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
1971
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1972
|
+
|
1973
|
+
header_params = {}
|
1974
|
+
if request.name
|
1975
|
+
header_params["name"] = request.name
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1979
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1980
|
+
|
1981
|
+
options.apply_defaults timeout: @config.rpcs.get_active_directory.timeout,
|
1982
|
+
metadata: metadata,
|
1983
|
+
retry_policy: @config.rpcs.get_active_directory.retry_policy
|
1984
|
+
|
1985
|
+
options.apply_defaults timeout: @config.timeout,
|
1986
|
+
metadata: @config.metadata,
|
1987
|
+
retry_policy: @config.retry_policy
|
1988
|
+
|
1989
|
+
@net_app_stub.call_rpc :get_active_directory, request, options: options do |response, operation|
|
1990
|
+
yield response, operation if block_given?
|
1991
|
+
return response
|
1992
|
+
end
|
1993
|
+
rescue ::GRPC::BadStatus => e
|
1994
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
##
|
1998
|
+
# CreateActiveDirectory
|
1999
|
+
# Creates the active directory specified in the request.
|
2000
|
+
#
|
2001
|
+
# @overload create_active_directory(request, options = nil)
|
2002
|
+
# Pass arguments to `create_active_directory` via a request object, either of type
|
2003
|
+
# {::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest} or an equivalent Hash.
|
2004
|
+
#
|
2005
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest, ::Hash]
|
2006
|
+
# A request object representing the call parameters. Required. To specify no
|
2007
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2008
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2009
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2010
|
+
#
|
2011
|
+
# @overload create_active_directory(parent: nil, active_directory: nil, active_directory_id: nil)
|
2012
|
+
# Pass arguments to `create_active_directory` via keyword arguments. Note that at
|
2013
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2014
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2015
|
+
#
|
2016
|
+
# @param parent [::String]
|
2017
|
+
# Required. Value for parent.
|
2018
|
+
# @param active_directory [::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash]
|
2019
|
+
# Required. Fields of the to be created active directory.
|
2020
|
+
# @param active_directory_id [::String]
|
2021
|
+
# Required. ID of the active directory to create.
|
2022
|
+
#
|
2023
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2024
|
+
# @yieldparam response [::Gapic::Operation]
|
2025
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2026
|
+
#
|
2027
|
+
# @return [::Gapic::Operation]
|
2028
|
+
#
|
2029
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2030
|
+
#
|
2031
|
+
# @example Basic example
|
2032
|
+
# require "google/cloud/netapp/v1"
|
2033
|
+
#
|
2034
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2035
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2036
|
+
#
|
2037
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2038
|
+
# request = Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest.new
|
2039
|
+
#
|
2040
|
+
# # Call the create_active_directory method.
|
2041
|
+
# result = client.create_active_directory request
|
2042
|
+
#
|
2043
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2044
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2045
|
+
# # Here is how to wait for a response.
|
2046
|
+
# result.wait_until_done! timeout: 60
|
2047
|
+
# if result.response?
|
2048
|
+
# p result.response
|
2049
|
+
# else
|
2050
|
+
# puts "No response received."
|
2051
|
+
# end
|
2052
|
+
#
|
2053
|
+
def create_active_directory request, options = nil
|
2054
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2055
|
+
|
2056
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest
|
2057
|
+
|
2058
|
+
# Converts hash and nil to an options object
|
2059
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2060
|
+
|
2061
|
+
# Customize the options with defaults
|
2062
|
+
metadata = @config.rpcs.create_active_directory.metadata.to_h
|
2063
|
+
|
2064
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2065
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2066
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2067
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2068
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2069
|
+
|
2070
|
+
header_params = {}
|
2071
|
+
if request.parent
|
2072
|
+
header_params["parent"] = request.parent
|
2073
|
+
end
|
2074
|
+
|
2075
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2076
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2077
|
+
|
2078
|
+
options.apply_defaults timeout: @config.rpcs.create_active_directory.timeout,
|
2079
|
+
metadata: metadata,
|
2080
|
+
retry_policy: @config.rpcs.create_active_directory.retry_policy
|
2081
|
+
|
2082
|
+
options.apply_defaults timeout: @config.timeout,
|
2083
|
+
metadata: @config.metadata,
|
2084
|
+
retry_policy: @config.retry_policy
|
2085
|
+
|
2086
|
+
@net_app_stub.call_rpc :create_active_directory, request, options: options do |response, operation|
|
2087
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2088
|
+
yield response, operation if block_given?
|
2089
|
+
return response
|
2090
|
+
end
|
2091
|
+
rescue ::GRPC::BadStatus => e
|
2092
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2093
|
+
end
|
2094
|
+
|
2095
|
+
##
|
2096
|
+
# Update the parameters of an active directories.
|
2097
|
+
#
|
2098
|
+
# @overload update_active_directory(request, options = nil)
|
2099
|
+
# Pass arguments to `update_active_directory` via a request object, either of type
|
2100
|
+
# {::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest} or an equivalent Hash.
|
2101
|
+
#
|
2102
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest, ::Hash]
|
2103
|
+
# A request object representing the call parameters. Required. To specify no
|
2104
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2105
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2106
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2107
|
+
#
|
2108
|
+
# @overload update_active_directory(update_mask: nil, active_directory: nil)
|
2109
|
+
# Pass arguments to `update_active_directory` via keyword arguments. Note that at
|
2110
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2111
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2112
|
+
#
|
2113
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2114
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
2115
|
+
# Active Directory resource by the update.
|
2116
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2117
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
2118
|
+
# user does not provide a mask then all fields will be overwritten.
|
2119
|
+
# @param active_directory [::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash]
|
2120
|
+
# Required. The volume being updated
|
2121
|
+
#
|
2122
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2123
|
+
# @yieldparam response [::Gapic::Operation]
|
2124
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2125
|
+
#
|
2126
|
+
# @return [::Gapic::Operation]
|
2127
|
+
#
|
2128
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2129
|
+
#
|
2130
|
+
# @example Basic example
|
2131
|
+
# require "google/cloud/netapp/v1"
|
2132
|
+
#
|
2133
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2134
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2135
|
+
#
|
2136
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2137
|
+
# request = Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest.new
|
2138
|
+
#
|
2139
|
+
# # Call the update_active_directory method.
|
2140
|
+
# result = client.update_active_directory request
|
2141
|
+
#
|
2142
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2143
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2144
|
+
# # Here is how to wait for a response.
|
2145
|
+
# result.wait_until_done! timeout: 60
|
2146
|
+
# if result.response?
|
2147
|
+
# p result.response
|
2148
|
+
# else
|
2149
|
+
# puts "No response received."
|
2150
|
+
# end
|
2151
|
+
#
|
2152
|
+
def update_active_directory request, options = nil
|
2153
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2154
|
+
|
2155
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest
|
2156
|
+
|
2157
|
+
# Converts hash and nil to an options object
|
2158
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2159
|
+
|
2160
|
+
# Customize the options with defaults
|
2161
|
+
metadata = @config.rpcs.update_active_directory.metadata.to_h
|
2162
|
+
|
2163
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2164
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2165
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2166
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2167
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2168
|
+
|
2169
|
+
header_params = {}
|
2170
|
+
if request.active_directory&.name
|
2171
|
+
header_params["active_directory.name"] = request.active_directory.name
|
2172
|
+
end
|
2173
|
+
|
2174
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2175
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2176
|
+
|
2177
|
+
options.apply_defaults timeout: @config.rpcs.update_active_directory.timeout,
|
2178
|
+
metadata: metadata,
|
2179
|
+
retry_policy: @config.rpcs.update_active_directory.retry_policy
|
2180
|
+
|
2181
|
+
options.apply_defaults timeout: @config.timeout,
|
2182
|
+
metadata: @config.metadata,
|
2183
|
+
retry_policy: @config.retry_policy
|
2184
|
+
|
2185
|
+
@net_app_stub.call_rpc :update_active_directory, request, options: options do |response, operation|
|
2186
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2187
|
+
yield response, operation if block_given?
|
2188
|
+
return response
|
2189
|
+
end
|
2190
|
+
rescue ::GRPC::BadStatus => e
|
2191
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2192
|
+
end
|
2193
|
+
|
2194
|
+
##
|
2195
|
+
# Delete the active directory specified in the request.
|
2196
|
+
#
|
2197
|
+
# @overload delete_active_directory(request, options = nil)
|
2198
|
+
# Pass arguments to `delete_active_directory` via a request object, either of type
|
2199
|
+
# {::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest} or an equivalent Hash.
|
2200
|
+
#
|
2201
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest, ::Hash]
|
2202
|
+
# A request object representing the call parameters. Required. To specify no
|
2203
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2204
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2205
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2206
|
+
#
|
2207
|
+
# @overload delete_active_directory(name: nil)
|
2208
|
+
# Pass arguments to `delete_active_directory` via keyword arguments. Note that at
|
2209
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2210
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2211
|
+
#
|
2212
|
+
# @param name [::String]
|
2213
|
+
# Required. Name of the active directory.
|
2214
|
+
#
|
2215
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2216
|
+
# @yieldparam response [::Gapic::Operation]
|
2217
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2218
|
+
#
|
2219
|
+
# @return [::Gapic::Operation]
|
2220
|
+
#
|
2221
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2222
|
+
#
|
2223
|
+
# @example Basic example
|
2224
|
+
# require "google/cloud/netapp/v1"
|
2225
|
+
#
|
2226
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2227
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2228
|
+
#
|
2229
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2230
|
+
# request = Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest.new
|
2231
|
+
#
|
2232
|
+
# # Call the delete_active_directory method.
|
2233
|
+
# result = client.delete_active_directory request
|
2234
|
+
#
|
2235
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2236
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2237
|
+
# # Here is how to wait for a response.
|
2238
|
+
# result.wait_until_done! timeout: 60
|
2239
|
+
# if result.response?
|
2240
|
+
# p result.response
|
2241
|
+
# else
|
2242
|
+
# puts "No response received."
|
2243
|
+
# end
|
2244
|
+
#
|
2245
|
+
def delete_active_directory request, options = nil
|
2246
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2247
|
+
|
2248
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest
|
2249
|
+
|
2250
|
+
# Converts hash and nil to an options object
|
2251
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2252
|
+
|
2253
|
+
# Customize the options with defaults
|
2254
|
+
metadata = @config.rpcs.delete_active_directory.metadata.to_h
|
2255
|
+
|
2256
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2257
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2258
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2259
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2260
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2261
|
+
|
2262
|
+
header_params = {}
|
2263
|
+
if request.name
|
2264
|
+
header_params["name"] = request.name
|
2265
|
+
end
|
2266
|
+
|
2267
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2268
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2269
|
+
|
2270
|
+
options.apply_defaults timeout: @config.rpcs.delete_active_directory.timeout,
|
2271
|
+
metadata: metadata,
|
2272
|
+
retry_policy: @config.rpcs.delete_active_directory.retry_policy
|
2273
|
+
|
2274
|
+
options.apply_defaults timeout: @config.timeout,
|
2275
|
+
metadata: @config.metadata,
|
2276
|
+
retry_policy: @config.retry_policy
|
2277
|
+
|
2278
|
+
@net_app_stub.call_rpc :delete_active_directory, request, options: options do |response, operation|
|
2279
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2280
|
+
yield response, operation if block_given?
|
2281
|
+
return response
|
2282
|
+
end
|
2283
|
+
rescue ::GRPC::BadStatus => e
|
2284
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2285
|
+
end
|
2286
|
+
|
2287
|
+
##
|
2288
|
+
# Returns descriptions of all KMS configs owned by the caller.
|
2289
|
+
#
|
2290
|
+
# @overload list_kms_configs(request, options = nil)
|
2291
|
+
# Pass arguments to `list_kms_configs` via a request object, either of type
|
2292
|
+
# {::Google::Cloud::NetApp::V1::ListKmsConfigsRequest} or an equivalent Hash.
|
2293
|
+
#
|
2294
|
+
# @param request [::Google::Cloud::NetApp::V1::ListKmsConfigsRequest, ::Hash]
|
2295
|
+
# A request object representing the call parameters. Required. To specify no
|
2296
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2297
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2298
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2299
|
+
#
|
2300
|
+
# @overload list_kms_configs(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
2301
|
+
# Pass arguments to `list_kms_configs` via keyword arguments. Note that at
|
2302
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2303
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2304
|
+
#
|
2305
|
+
# @param parent [::String]
|
2306
|
+
# Required. Parent value
|
2307
|
+
# @param page_size [::Integer]
|
2308
|
+
# The maximum number of items to return.
|
2309
|
+
# @param page_token [::String]
|
2310
|
+
# The next_page_token value to use if there are additional
|
2311
|
+
# results to retrieve for this list request.
|
2312
|
+
# @param order_by [::String]
|
2313
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
2314
|
+
# @param filter [::String]
|
2315
|
+
# List filter.
|
2316
|
+
#
|
2317
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2318
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>]
|
2319
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2320
|
+
#
|
2321
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>]
|
2322
|
+
#
|
2323
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2324
|
+
#
|
2325
|
+
# @example Basic example
|
2326
|
+
# require "google/cloud/netapp/v1"
|
2327
|
+
#
|
2328
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2329
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2330
|
+
#
|
2331
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2332
|
+
# request = Google::Cloud::NetApp::V1::ListKmsConfigsRequest.new
|
2333
|
+
#
|
2334
|
+
# # Call the list_kms_configs method.
|
2335
|
+
# result = client.list_kms_configs request
|
2336
|
+
#
|
2337
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2338
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2339
|
+
# result.each do |item|
|
2340
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::KmsConfig.
|
2341
|
+
# p item
|
2342
|
+
# end
|
2343
|
+
#
|
2344
|
+
def list_kms_configs request, options = nil
|
2345
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2346
|
+
|
2347
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListKmsConfigsRequest
|
2348
|
+
|
2349
|
+
# Converts hash and nil to an options object
|
2350
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2351
|
+
|
2352
|
+
# Customize the options with defaults
|
2353
|
+
metadata = @config.rpcs.list_kms_configs.metadata.to_h
|
2354
|
+
|
2355
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2356
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2357
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2358
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2359
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2360
|
+
|
2361
|
+
header_params = {}
|
2362
|
+
if request.parent
|
2363
|
+
header_params["parent"] = request.parent
|
2364
|
+
end
|
2365
|
+
|
2366
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2367
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2368
|
+
|
2369
|
+
options.apply_defaults timeout: @config.rpcs.list_kms_configs.timeout,
|
2370
|
+
metadata: metadata,
|
2371
|
+
retry_policy: @config.rpcs.list_kms_configs.retry_policy
|
2372
|
+
|
2373
|
+
options.apply_defaults timeout: @config.timeout,
|
2374
|
+
metadata: @config.metadata,
|
2375
|
+
retry_policy: @config.retry_policy
|
2376
|
+
|
2377
|
+
@net_app_stub.call_rpc :list_kms_configs, request, options: options do |response, operation|
|
2378
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_kms_configs, request, response, operation, options
|
2379
|
+
yield response, operation if block_given?
|
2380
|
+
return response
|
2381
|
+
end
|
2382
|
+
rescue ::GRPC::BadStatus => e
|
2383
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2384
|
+
end
|
2385
|
+
|
2386
|
+
##
|
2387
|
+
# Creates a new KMS config.
|
2388
|
+
#
|
2389
|
+
# @overload create_kms_config(request, options = nil)
|
2390
|
+
# Pass arguments to `create_kms_config` via a request object, either of type
|
2391
|
+
# {::Google::Cloud::NetApp::V1::CreateKmsConfigRequest} or an equivalent Hash.
|
2392
|
+
#
|
2393
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateKmsConfigRequest, ::Hash]
|
2394
|
+
# A request object representing the call parameters. Required. To specify no
|
2395
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2396
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2397
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2398
|
+
#
|
2399
|
+
# @overload create_kms_config(parent: nil, kms_config_id: nil, kms_config: nil)
|
2400
|
+
# Pass arguments to `create_kms_config` via keyword arguments. Note that at
|
2401
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2402
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2403
|
+
#
|
2404
|
+
# @param parent [::String]
|
2405
|
+
# Required. Value for parent.
|
2406
|
+
# @param kms_config_id [::String]
|
2407
|
+
# Required. Id of the requesting KmsConfig
|
2408
|
+
# If auto-generating Id server-side, remove this field and
|
2409
|
+
# id from the method_signature of Create RPC
|
2410
|
+
# @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
|
2411
|
+
# Required. The required parameters to create a new KmsConfig.
|
2412
|
+
#
|
2413
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2414
|
+
# @yieldparam response [::Gapic::Operation]
|
2415
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2416
|
+
#
|
2417
|
+
# @return [::Gapic::Operation]
|
2418
|
+
#
|
2419
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2420
|
+
#
|
2421
|
+
# @example Basic example
|
2422
|
+
# require "google/cloud/netapp/v1"
|
2423
|
+
#
|
2424
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2425
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2426
|
+
#
|
2427
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2428
|
+
# request = Google::Cloud::NetApp::V1::CreateKmsConfigRequest.new
|
2429
|
+
#
|
2430
|
+
# # Call the create_kms_config method.
|
2431
|
+
# result = client.create_kms_config request
|
2432
|
+
#
|
2433
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2434
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2435
|
+
# # Here is how to wait for a response.
|
2436
|
+
# result.wait_until_done! timeout: 60
|
2437
|
+
# if result.response?
|
2438
|
+
# p result.response
|
2439
|
+
# else
|
2440
|
+
# puts "No response received."
|
2441
|
+
# end
|
2442
|
+
#
|
2443
|
+
def create_kms_config request, options = nil
|
2444
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2445
|
+
|
2446
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateKmsConfigRequest
|
2447
|
+
|
2448
|
+
# Converts hash and nil to an options object
|
2449
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2450
|
+
|
2451
|
+
# Customize the options with defaults
|
2452
|
+
metadata = @config.rpcs.create_kms_config.metadata.to_h
|
2453
|
+
|
2454
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2455
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2456
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2457
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2458
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2459
|
+
|
2460
|
+
header_params = {}
|
2461
|
+
if request.parent
|
2462
|
+
header_params["parent"] = request.parent
|
2463
|
+
end
|
2464
|
+
|
2465
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2466
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2467
|
+
|
2468
|
+
options.apply_defaults timeout: @config.rpcs.create_kms_config.timeout,
|
2469
|
+
metadata: metadata,
|
2470
|
+
retry_policy: @config.rpcs.create_kms_config.retry_policy
|
2471
|
+
|
2472
|
+
options.apply_defaults timeout: @config.timeout,
|
2473
|
+
metadata: @config.metadata,
|
2474
|
+
retry_policy: @config.retry_policy
|
2475
|
+
|
2476
|
+
@net_app_stub.call_rpc :create_kms_config, request, options: options do |response, operation|
|
2477
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2478
|
+
yield response, operation if block_given?
|
2479
|
+
return response
|
2480
|
+
end
|
2481
|
+
rescue ::GRPC::BadStatus => e
|
2482
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2483
|
+
end
|
2484
|
+
|
2485
|
+
##
|
2486
|
+
# Returns the description of the specified KMS config by kms_config_id.
|
2487
|
+
#
|
2488
|
+
# @overload get_kms_config(request, options = nil)
|
2489
|
+
# Pass arguments to `get_kms_config` via a request object, either of type
|
2490
|
+
# {::Google::Cloud::NetApp::V1::GetKmsConfigRequest} or an equivalent Hash.
|
2491
|
+
#
|
2492
|
+
# @param request [::Google::Cloud::NetApp::V1::GetKmsConfigRequest, ::Hash]
|
2493
|
+
# A request object representing the call parameters. Required. To specify no
|
2494
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2495
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2496
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2497
|
+
#
|
2498
|
+
# @overload get_kms_config(name: nil)
|
2499
|
+
# Pass arguments to `get_kms_config` via keyword arguments. Note that at
|
2500
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2501
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2502
|
+
#
|
2503
|
+
# @param name [::String]
|
2504
|
+
# Required. Name of the KmsConfig
|
2505
|
+
#
|
2506
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2507
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::KmsConfig]
|
2508
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2509
|
+
#
|
2510
|
+
# @return [::Google::Cloud::NetApp::V1::KmsConfig]
|
2511
|
+
#
|
2512
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2513
|
+
#
|
2514
|
+
# @example Basic example
|
2515
|
+
# require "google/cloud/netapp/v1"
|
2516
|
+
#
|
2517
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2518
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2519
|
+
#
|
2520
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2521
|
+
# request = Google::Cloud::NetApp::V1::GetKmsConfigRequest.new
|
2522
|
+
#
|
2523
|
+
# # Call the get_kms_config method.
|
2524
|
+
# result = client.get_kms_config request
|
2525
|
+
#
|
2526
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::KmsConfig.
|
2527
|
+
# p result
|
2528
|
+
#
|
2529
|
+
def get_kms_config request, options = nil
|
2530
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2531
|
+
|
2532
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetKmsConfigRequest
|
2533
|
+
|
2534
|
+
# Converts hash and nil to an options object
|
2535
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2536
|
+
|
2537
|
+
# Customize the options with defaults
|
2538
|
+
metadata = @config.rpcs.get_kms_config.metadata.to_h
|
2539
|
+
|
2540
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2541
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2542
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2543
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2544
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2545
|
+
|
2546
|
+
header_params = {}
|
2547
|
+
if request.name
|
2548
|
+
header_params["name"] = request.name
|
2549
|
+
end
|
2550
|
+
|
2551
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2552
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2553
|
+
|
2554
|
+
options.apply_defaults timeout: @config.rpcs.get_kms_config.timeout,
|
2555
|
+
metadata: metadata,
|
2556
|
+
retry_policy: @config.rpcs.get_kms_config.retry_policy
|
2557
|
+
|
2558
|
+
options.apply_defaults timeout: @config.timeout,
|
2559
|
+
metadata: @config.metadata,
|
2560
|
+
retry_policy: @config.retry_policy
|
2561
|
+
|
2562
|
+
@net_app_stub.call_rpc :get_kms_config, request, options: options do |response, operation|
|
2563
|
+
yield response, operation if block_given?
|
2564
|
+
return response
|
2565
|
+
end
|
2566
|
+
rescue ::GRPC::BadStatus => e
|
2567
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2568
|
+
end
|
2569
|
+
|
2570
|
+
##
|
2571
|
+
# Updates the Kms config properties with the full spec
|
2572
|
+
#
|
2573
|
+
# @overload update_kms_config(request, options = nil)
|
2574
|
+
# Pass arguments to `update_kms_config` via a request object, either of type
|
2575
|
+
# {::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest} or an equivalent Hash.
|
2576
|
+
#
|
2577
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest, ::Hash]
|
2578
|
+
# A request object representing the call parameters. Required. To specify no
|
2579
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2580
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2581
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2582
|
+
#
|
2583
|
+
# @overload update_kms_config(update_mask: nil, kms_config: nil)
|
2584
|
+
# Pass arguments to `update_kms_config` via keyword arguments. Note that at
|
2585
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2586
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2587
|
+
#
|
2588
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2589
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
2590
|
+
# KmsConfig resource by the update.
|
2591
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2592
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
2593
|
+
# user does not provide a mask then all fields will be overwritten.
|
2594
|
+
# @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
|
2595
|
+
# Required. The KmsConfig being updated
|
2596
|
+
#
|
2597
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2598
|
+
# @yieldparam response [::Gapic::Operation]
|
2599
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2600
|
+
#
|
2601
|
+
# @return [::Gapic::Operation]
|
2602
|
+
#
|
2603
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2604
|
+
#
|
2605
|
+
# @example Basic example
|
2606
|
+
# require "google/cloud/netapp/v1"
|
2607
|
+
#
|
2608
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2609
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2610
|
+
#
|
2611
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2612
|
+
# request = Google::Cloud::NetApp::V1::UpdateKmsConfigRequest.new
|
2613
|
+
#
|
2614
|
+
# # Call the update_kms_config method.
|
2615
|
+
# result = client.update_kms_config request
|
2616
|
+
#
|
2617
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2618
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2619
|
+
# # Here is how to wait for a response.
|
2620
|
+
# result.wait_until_done! timeout: 60
|
2621
|
+
# if result.response?
|
2622
|
+
# p result.response
|
2623
|
+
# else
|
2624
|
+
# puts "No response received."
|
2625
|
+
# end
|
2626
|
+
#
|
2627
|
+
def update_kms_config request, options = nil
|
2628
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2629
|
+
|
2630
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest
|
2631
|
+
|
2632
|
+
# Converts hash and nil to an options object
|
2633
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2634
|
+
|
2635
|
+
# Customize the options with defaults
|
2636
|
+
metadata = @config.rpcs.update_kms_config.metadata.to_h
|
2637
|
+
|
2638
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2639
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2640
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2641
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2642
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2643
|
+
|
2644
|
+
header_params = {}
|
2645
|
+
if request.kms_config&.name
|
2646
|
+
header_params["kms_config.name"] = request.kms_config.name
|
2647
|
+
end
|
2648
|
+
|
2649
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2650
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2651
|
+
|
2652
|
+
options.apply_defaults timeout: @config.rpcs.update_kms_config.timeout,
|
2653
|
+
metadata: metadata,
|
2654
|
+
retry_policy: @config.rpcs.update_kms_config.retry_policy
|
2655
|
+
|
2656
|
+
options.apply_defaults timeout: @config.timeout,
|
2657
|
+
metadata: @config.metadata,
|
2658
|
+
retry_policy: @config.retry_policy
|
2659
|
+
|
2660
|
+
@net_app_stub.call_rpc :update_kms_config, request, options: options do |response, operation|
|
2661
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2662
|
+
yield response, operation if block_given?
|
2663
|
+
return response
|
2664
|
+
end
|
2665
|
+
rescue ::GRPC::BadStatus => e
|
2666
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2667
|
+
end
|
2668
|
+
|
2669
|
+
##
|
2670
|
+
# Encrypt the existing volumes without CMEK encryption with the desired the
|
2671
|
+
# KMS config for the whole region.
|
2672
|
+
#
|
2673
|
+
# @overload encrypt_volumes(request, options = nil)
|
2674
|
+
# Pass arguments to `encrypt_volumes` via a request object, either of type
|
2675
|
+
# {::Google::Cloud::NetApp::V1::EncryptVolumesRequest} or an equivalent Hash.
|
2676
|
+
#
|
2677
|
+
# @param request [::Google::Cloud::NetApp::V1::EncryptVolumesRequest, ::Hash]
|
2678
|
+
# A request object representing the call parameters. Required. To specify no
|
2679
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2680
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2681
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2682
|
+
#
|
2683
|
+
# @overload encrypt_volumes(name: nil)
|
2684
|
+
# Pass arguments to `encrypt_volumes` via keyword arguments. Note that at
|
2685
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2686
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2687
|
+
#
|
2688
|
+
# @param name [::String]
|
2689
|
+
# Required. Name of the KmsConfig.
|
2690
|
+
#
|
2691
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2692
|
+
# @yieldparam response [::Gapic::Operation]
|
2693
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2694
|
+
#
|
2695
|
+
# @return [::Gapic::Operation]
|
2696
|
+
#
|
2697
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2698
|
+
#
|
2699
|
+
# @example Basic example
|
2700
|
+
# require "google/cloud/netapp/v1"
|
2701
|
+
#
|
2702
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2703
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2704
|
+
#
|
2705
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2706
|
+
# request = Google::Cloud::NetApp::V1::EncryptVolumesRequest.new
|
2707
|
+
#
|
2708
|
+
# # Call the encrypt_volumes method.
|
2709
|
+
# result = client.encrypt_volumes request
|
2710
|
+
#
|
2711
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2712
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2713
|
+
# # Here is how to wait for a response.
|
2714
|
+
# result.wait_until_done! timeout: 60
|
2715
|
+
# if result.response?
|
2716
|
+
# p result.response
|
2717
|
+
# else
|
2718
|
+
# puts "No response received."
|
2719
|
+
# end
|
2720
|
+
#
|
2721
|
+
def encrypt_volumes request, options = nil
|
2722
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2723
|
+
|
2724
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EncryptVolumesRequest
|
2725
|
+
|
2726
|
+
# Converts hash and nil to an options object
|
2727
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2728
|
+
|
2729
|
+
# Customize the options with defaults
|
2730
|
+
metadata = @config.rpcs.encrypt_volumes.metadata.to_h
|
2731
|
+
|
2732
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2733
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2734
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2735
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2736
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2737
|
+
|
2738
|
+
header_params = {}
|
2739
|
+
if request.name
|
2740
|
+
header_params["name"] = request.name
|
2741
|
+
end
|
2742
|
+
|
2743
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2744
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2745
|
+
|
2746
|
+
options.apply_defaults timeout: @config.rpcs.encrypt_volumes.timeout,
|
2747
|
+
metadata: metadata,
|
2748
|
+
retry_policy: @config.rpcs.encrypt_volumes.retry_policy
|
2749
|
+
|
2750
|
+
options.apply_defaults timeout: @config.timeout,
|
2751
|
+
metadata: @config.metadata,
|
2752
|
+
retry_policy: @config.retry_policy
|
2753
|
+
|
2754
|
+
@net_app_stub.call_rpc :encrypt_volumes, request, options: options do |response, operation|
|
2755
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2756
|
+
yield response, operation if block_given?
|
2757
|
+
return response
|
2758
|
+
end
|
2759
|
+
rescue ::GRPC::BadStatus => e
|
2760
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2761
|
+
end
|
2762
|
+
|
2763
|
+
##
|
2764
|
+
# Verifies KMS config reachability.
|
2765
|
+
#
|
2766
|
+
# @overload verify_kms_config(request, options = nil)
|
2767
|
+
# Pass arguments to `verify_kms_config` via a request object, either of type
|
2768
|
+
# {::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest} or an equivalent Hash.
|
2769
|
+
#
|
2770
|
+
# @param request [::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest, ::Hash]
|
2771
|
+
# A request object representing the call parameters. Required. To specify no
|
2772
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2773
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2774
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2775
|
+
#
|
2776
|
+
# @overload verify_kms_config(name: nil)
|
2777
|
+
# Pass arguments to `verify_kms_config` via keyword arguments. Note that at
|
2778
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2779
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2780
|
+
#
|
2781
|
+
# @param name [::String]
|
2782
|
+
# Required. Name of the KMS Config to be verified.
|
2783
|
+
#
|
2784
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2785
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse]
|
2786
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2787
|
+
#
|
2788
|
+
# @return [::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse]
|
2789
|
+
#
|
2790
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2791
|
+
#
|
2792
|
+
# @example Basic example
|
2793
|
+
# require "google/cloud/netapp/v1"
|
2794
|
+
#
|
2795
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2796
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2797
|
+
#
|
2798
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2799
|
+
# request = Google::Cloud::NetApp::V1::VerifyKmsConfigRequest.new
|
2800
|
+
#
|
2801
|
+
# # Call the verify_kms_config method.
|
2802
|
+
# result = client.verify_kms_config request
|
2803
|
+
#
|
2804
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::VerifyKmsConfigResponse.
|
2805
|
+
# p result
|
2806
|
+
#
|
2807
|
+
def verify_kms_config request, options = nil
|
2808
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2809
|
+
|
2810
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest
|
2811
|
+
|
2812
|
+
# Converts hash and nil to an options object
|
2813
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2814
|
+
|
2815
|
+
# Customize the options with defaults
|
2816
|
+
metadata = @config.rpcs.verify_kms_config.metadata.to_h
|
2817
|
+
|
2818
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2819
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2820
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2821
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2822
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2823
|
+
|
2824
|
+
header_params = {}
|
2825
|
+
if request.name
|
2826
|
+
header_params["name"] = request.name
|
2827
|
+
end
|
2828
|
+
|
2829
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2830
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2831
|
+
|
2832
|
+
options.apply_defaults timeout: @config.rpcs.verify_kms_config.timeout,
|
2833
|
+
metadata: metadata,
|
2834
|
+
retry_policy: @config.rpcs.verify_kms_config.retry_policy
|
2835
|
+
|
2836
|
+
options.apply_defaults timeout: @config.timeout,
|
2837
|
+
metadata: @config.metadata,
|
2838
|
+
retry_policy: @config.retry_policy
|
2839
|
+
|
2840
|
+
@net_app_stub.call_rpc :verify_kms_config, request, options: options do |response, operation|
|
2841
|
+
yield response, operation if block_given?
|
2842
|
+
return response
|
2843
|
+
end
|
2844
|
+
rescue ::GRPC::BadStatus => e
|
2845
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2846
|
+
end
|
2847
|
+
|
2848
|
+
##
|
2849
|
+
# Warning! This operation will permanently delete the Kms config.
|
2850
|
+
#
|
2851
|
+
# @overload delete_kms_config(request, options = nil)
|
2852
|
+
# Pass arguments to `delete_kms_config` via a request object, either of type
|
2853
|
+
# {::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest} or an equivalent Hash.
|
2854
|
+
#
|
2855
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest, ::Hash]
|
2856
|
+
# A request object representing the call parameters. Required. To specify no
|
2857
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2858
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2859
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2860
|
+
#
|
2861
|
+
# @overload delete_kms_config(name: nil)
|
2862
|
+
# Pass arguments to `delete_kms_config` via keyword arguments. Note that at
|
2863
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2864
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2865
|
+
#
|
2866
|
+
# @param name [::String]
|
2867
|
+
# Required. Name of the KmsConfig.
|
2868
|
+
#
|
2869
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2870
|
+
# @yieldparam response [::Gapic::Operation]
|
2871
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2872
|
+
#
|
2873
|
+
# @return [::Gapic::Operation]
|
2874
|
+
#
|
2875
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2876
|
+
#
|
2877
|
+
# @example Basic example
|
2878
|
+
# require "google/cloud/netapp/v1"
|
2879
|
+
#
|
2880
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2881
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2882
|
+
#
|
2883
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2884
|
+
# request = Google::Cloud::NetApp::V1::DeleteKmsConfigRequest.new
|
2885
|
+
#
|
2886
|
+
# # Call the delete_kms_config method.
|
2887
|
+
# result = client.delete_kms_config request
|
2888
|
+
#
|
2889
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2890
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2891
|
+
# # Here is how to wait for a response.
|
2892
|
+
# result.wait_until_done! timeout: 60
|
2893
|
+
# if result.response?
|
2894
|
+
# p result.response
|
2895
|
+
# else
|
2896
|
+
# puts "No response received."
|
2897
|
+
# end
|
2898
|
+
#
|
2899
|
+
def delete_kms_config request, options = nil
|
2900
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2901
|
+
|
2902
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest
|
2903
|
+
|
2904
|
+
# Converts hash and nil to an options object
|
2905
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2906
|
+
|
2907
|
+
# Customize the options with defaults
|
2908
|
+
metadata = @config.rpcs.delete_kms_config.metadata.to_h
|
2909
|
+
|
2910
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2911
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2912
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2913
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
2914
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2915
|
+
|
2916
|
+
header_params = {}
|
2917
|
+
if request.name
|
2918
|
+
header_params["name"] = request.name
|
2919
|
+
end
|
2920
|
+
|
2921
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2922
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2923
|
+
|
2924
|
+
options.apply_defaults timeout: @config.rpcs.delete_kms_config.timeout,
|
2925
|
+
metadata: metadata,
|
2926
|
+
retry_policy: @config.rpcs.delete_kms_config.retry_policy
|
2927
|
+
|
2928
|
+
options.apply_defaults timeout: @config.timeout,
|
2929
|
+
metadata: @config.metadata,
|
2930
|
+
retry_policy: @config.retry_policy
|
2931
|
+
|
2932
|
+
@net_app_stub.call_rpc :delete_kms_config, request, options: options do |response, operation|
|
2933
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2934
|
+
yield response, operation if block_given?
|
2935
|
+
return response
|
2936
|
+
end
|
2937
|
+
rescue ::GRPC::BadStatus => e
|
2938
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2939
|
+
end
|
2940
|
+
|
2941
|
+
##
|
2942
|
+
# Returns descriptions of all replications for a volume.
|
2943
|
+
#
|
2944
|
+
# @overload list_replications(request, options = nil)
|
2945
|
+
# Pass arguments to `list_replications` via a request object, either of type
|
2946
|
+
# {::Google::Cloud::NetApp::V1::ListReplicationsRequest} or an equivalent Hash.
|
2947
|
+
#
|
2948
|
+
# @param request [::Google::Cloud::NetApp::V1::ListReplicationsRequest, ::Hash]
|
2949
|
+
# A request object representing the call parameters. Required. To specify no
|
2950
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2951
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2952
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2953
|
+
#
|
2954
|
+
# @overload list_replications(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
2955
|
+
# Pass arguments to `list_replications` via keyword arguments. Note that at
|
2956
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2957
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2958
|
+
#
|
2959
|
+
# @param parent [::String]
|
2960
|
+
# Required. The volume for which to retrieve replication information,
|
2961
|
+
# in the format
|
2962
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
|
2963
|
+
# @param page_size [::Integer]
|
2964
|
+
# The maximum number of items to return.
|
2965
|
+
# @param page_token [::String]
|
2966
|
+
# The next_page_token value to use if there are additional
|
2967
|
+
# results to retrieve for this list request.
|
2968
|
+
# @param order_by [::String]
|
2969
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
2970
|
+
# @param filter [::String]
|
2971
|
+
# List filter.
|
2972
|
+
#
|
2973
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2974
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>]
|
2975
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2976
|
+
#
|
2977
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>]
|
2978
|
+
#
|
2979
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2980
|
+
#
|
2981
|
+
# @example Basic example
|
2982
|
+
# require "google/cloud/netapp/v1"
|
2983
|
+
#
|
2984
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2985
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
2986
|
+
#
|
2987
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2988
|
+
# request = Google::Cloud::NetApp::V1::ListReplicationsRequest.new
|
2989
|
+
#
|
2990
|
+
# # Call the list_replications method.
|
2991
|
+
# result = client.list_replications request
|
2992
|
+
#
|
2993
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2994
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2995
|
+
# result.each do |item|
|
2996
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::Replication.
|
2997
|
+
# p item
|
2998
|
+
# end
|
2999
|
+
#
|
3000
|
+
def list_replications request, options = nil
|
3001
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3002
|
+
|
3003
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListReplicationsRequest
|
3004
|
+
|
3005
|
+
# Converts hash and nil to an options object
|
3006
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3007
|
+
|
3008
|
+
# Customize the options with defaults
|
3009
|
+
metadata = @config.rpcs.list_replications.metadata.to_h
|
3010
|
+
|
3011
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3012
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3013
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3014
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3015
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3016
|
+
|
3017
|
+
header_params = {}
|
3018
|
+
if request.parent
|
3019
|
+
header_params["parent"] = request.parent
|
3020
|
+
end
|
3021
|
+
|
3022
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3023
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3024
|
+
|
3025
|
+
options.apply_defaults timeout: @config.rpcs.list_replications.timeout,
|
3026
|
+
metadata: metadata,
|
3027
|
+
retry_policy: @config.rpcs.list_replications.retry_policy
|
3028
|
+
|
3029
|
+
options.apply_defaults timeout: @config.timeout,
|
3030
|
+
metadata: @config.metadata,
|
3031
|
+
retry_policy: @config.retry_policy
|
3032
|
+
|
3033
|
+
@net_app_stub.call_rpc :list_replications, request, options: options do |response, operation|
|
3034
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_replications, request, response, operation, options
|
3035
|
+
yield response, operation if block_given?
|
3036
|
+
return response
|
3037
|
+
end
|
3038
|
+
rescue ::GRPC::BadStatus => e
|
3039
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3040
|
+
end
|
3041
|
+
|
3042
|
+
##
|
3043
|
+
# Describe a replication for a volume.
|
3044
|
+
#
|
3045
|
+
# @overload get_replication(request, options = nil)
|
3046
|
+
# Pass arguments to `get_replication` via a request object, either of type
|
3047
|
+
# {::Google::Cloud::NetApp::V1::GetReplicationRequest} or an equivalent Hash.
|
3048
|
+
#
|
3049
|
+
# @param request [::Google::Cloud::NetApp::V1::GetReplicationRequest, ::Hash]
|
3050
|
+
# A request object representing the call parameters. Required. To specify no
|
3051
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3052
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3053
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3054
|
+
#
|
3055
|
+
# @overload get_replication(name: nil)
|
3056
|
+
# Pass arguments to `get_replication` via keyword arguments. Note that at
|
3057
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3058
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3059
|
+
#
|
3060
|
+
# @param name [::String]
|
3061
|
+
# Required. The replication resource name, in the format
|
3062
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`
|
3063
|
+
#
|
3064
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3065
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::Replication]
|
3066
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3067
|
+
#
|
3068
|
+
# @return [::Google::Cloud::NetApp::V1::Replication]
|
3069
|
+
#
|
3070
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3071
|
+
#
|
3072
|
+
# @example Basic example
|
3073
|
+
# require "google/cloud/netapp/v1"
|
3074
|
+
#
|
3075
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3076
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3077
|
+
#
|
3078
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3079
|
+
# request = Google::Cloud::NetApp::V1::GetReplicationRequest.new
|
3080
|
+
#
|
3081
|
+
# # Call the get_replication method.
|
3082
|
+
# result = client.get_replication request
|
3083
|
+
#
|
3084
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::Replication.
|
3085
|
+
# p result
|
3086
|
+
#
|
3087
|
+
def get_replication request, options = nil
|
3088
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3089
|
+
|
3090
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetReplicationRequest
|
3091
|
+
|
3092
|
+
# Converts hash and nil to an options object
|
3093
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3094
|
+
|
3095
|
+
# Customize the options with defaults
|
3096
|
+
metadata = @config.rpcs.get_replication.metadata.to_h
|
3097
|
+
|
3098
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3099
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3100
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3101
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3102
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3103
|
+
|
3104
|
+
header_params = {}
|
3105
|
+
if request.name
|
3106
|
+
header_params["name"] = request.name
|
3107
|
+
end
|
3108
|
+
|
3109
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3110
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3111
|
+
|
3112
|
+
options.apply_defaults timeout: @config.rpcs.get_replication.timeout,
|
3113
|
+
metadata: metadata,
|
3114
|
+
retry_policy: @config.rpcs.get_replication.retry_policy
|
3115
|
+
|
3116
|
+
options.apply_defaults timeout: @config.timeout,
|
3117
|
+
metadata: @config.metadata,
|
3118
|
+
retry_policy: @config.retry_policy
|
3119
|
+
|
3120
|
+
@net_app_stub.call_rpc :get_replication, request, options: options do |response, operation|
|
3121
|
+
yield response, operation if block_given?
|
3122
|
+
return response
|
3123
|
+
end
|
3124
|
+
rescue ::GRPC::BadStatus => e
|
3125
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3126
|
+
end
|
3127
|
+
|
3128
|
+
##
|
3129
|
+
# Create a new replication for a volume.
|
3130
|
+
#
|
3131
|
+
# @overload create_replication(request, options = nil)
|
3132
|
+
# Pass arguments to `create_replication` via a request object, either of type
|
3133
|
+
# {::Google::Cloud::NetApp::V1::CreateReplicationRequest} or an equivalent Hash.
|
3134
|
+
#
|
3135
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateReplicationRequest, ::Hash]
|
3136
|
+
# A request object representing the call parameters. Required. To specify no
|
3137
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3138
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3139
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3140
|
+
#
|
3141
|
+
# @overload create_replication(parent: nil, replication: nil, replication_id: nil)
|
3142
|
+
# Pass arguments to `create_replication` via keyword arguments. Note that at
|
3143
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3144
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3145
|
+
#
|
3146
|
+
# @param parent [::String]
|
3147
|
+
# Required. The NetApp volume to create the replications of, in the format
|
3148
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}`
|
3149
|
+
# @param replication [::Google::Cloud::NetApp::V1::Replication, ::Hash]
|
3150
|
+
# Required. A replication resource
|
3151
|
+
# @param replication_id [::String]
|
3152
|
+
# Required. ID of the replication to create.
|
3153
|
+
# This value must start with a lowercase letter followed by up to 62
|
3154
|
+
# lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
|
3155
|
+
#
|
3156
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3157
|
+
# @yieldparam response [::Gapic::Operation]
|
3158
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3159
|
+
#
|
3160
|
+
# @return [::Gapic::Operation]
|
3161
|
+
#
|
3162
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3163
|
+
#
|
3164
|
+
# @example Basic example
|
3165
|
+
# require "google/cloud/netapp/v1"
|
3166
|
+
#
|
3167
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3168
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3169
|
+
#
|
3170
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3171
|
+
# request = Google::Cloud::NetApp::V1::CreateReplicationRequest.new
|
3172
|
+
#
|
3173
|
+
# # Call the create_replication method.
|
3174
|
+
# result = client.create_replication request
|
3175
|
+
#
|
3176
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3177
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3178
|
+
# # Here is how to wait for a response.
|
3179
|
+
# result.wait_until_done! timeout: 60
|
3180
|
+
# if result.response?
|
3181
|
+
# p result.response
|
3182
|
+
# else
|
3183
|
+
# puts "No response received."
|
3184
|
+
# end
|
3185
|
+
#
|
3186
|
+
def create_replication request, options = nil
|
3187
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3188
|
+
|
3189
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateReplicationRequest
|
3190
|
+
|
3191
|
+
# Converts hash and nil to an options object
|
3192
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3193
|
+
|
3194
|
+
# Customize the options with defaults
|
3195
|
+
metadata = @config.rpcs.create_replication.metadata.to_h
|
3196
|
+
|
3197
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3198
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3199
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3200
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3201
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3202
|
+
|
3203
|
+
header_params = {}
|
3204
|
+
if request.parent
|
3205
|
+
header_params["parent"] = request.parent
|
3206
|
+
end
|
3207
|
+
|
3208
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3209
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3210
|
+
|
3211
|
+
options.apply_defaults timeout: @config.rpcs.create_replication.timeout,
|
3212
|
+
metadata: metadata,
|
3213
|
+
retry_policy: @config.rpcs.create_replication.retry_policy
|
3214
|
+
|
3215
|
+
options.apply_defaults timeout: @config.timeout,
|
3216
|
+
metadata: @config.metadata,
|
3217
|
+
retry_policy: @config.retry_policy
|
3218
|
+
|
3219
|
+
@net_app_stub.call_rpc :create_replication, request, options: options do |response, operation|
|
3220
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3221
|
+
yield response, operation if block_given?
|
3222
|
+
return response
|
3223
|
+
end
|
3224
|
+
rescue ::GRPC::BadStatus => e
|
3225
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3226
|
+
end
|
3227
|
+
|
3228
|
+
##
|
3229
|
+
# Deletes a replication.
|
3230
|
+
#
|
3231
|
+
# @overload delete_replication(request, options = nil)
|
3232
|
+
# Pass arguments to `delete_replication` via a request object, either of type
|
3233
|
+
# {::Google::Cloud::NetApp::V1::DeleteReplicationRequest} or an equivalent Hash.
|
3234
|
+
#
|
3235
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteReplicationRequest, ::Hash]
|
3236
|
+
# A request object representing the call parameters. Required. To specify no
|
3237
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3238
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3239
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3240
|
+
#
|
3241
|
+
# @overload delete_replication(name: nil)
|
3242
|
+
# Pass arguments to `delete_replication` via keyword arguments. Note that at
|
3243
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3244
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3245
|
+
#
|
3246
|
+
# @param name [::String]
|
3247
|
+
# Required. The replication resource name, in the format
|
3248
|
+
# `projects/*/locations/*/volumes/*/replications/{replication_id}`
|
3249
|
+
#
|
3250
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3251
|
+
# @yieldparam response [::Gapic::Operation]
|
3252
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3253
|
+
#
|
3254
|
+
# @return [::Gapic::Operation]
|
3255
|
+
#
|
3256
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3257
|
+
#
|
3258
|
+
# @example Basic example
|
3259
|
+
# require "google/cloud/netapp/v1"
|
3260
|
+
#
|
3261
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3262
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3263
|
+
#
|
3264
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3265
|
+
# request = Google::Cloud::NetApp::V1::DeleteReplicationRequest.new
|
3266
|
+
#
|
3267
|
+
# # Call the delete_replication method.
|
3268
|
+
# result = client.delete_replication request
|
3269
|
+
#
|
3270
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3271
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3272
|
+
# # Here is how to wait for a response.
|
3273
|
+
# result.wait_until_done! timeout: 60
|
3274
|
+
# if result.response?
|
3275
|
+
# p result.response
|
3276
|
+
# else
|
3277
|
+
# puts "No response received."
|
3278
|
+
# end
|
3279
|
+
#
|
3280
|
+
def delete_replication request, options = nil
|
3281
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3282
|
+
|
3283
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteReplicationRequest
|
3284
|
+
|
3285
|
+
# Converts hash and nil to an options object
|
3286
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3287
|
+
|
3288
|
+
# Customize the options with defaults
|
3289
|
+
metadata = @config.rpcs.delete_replication.metadata.to_h
|
3290
|
+
|
3291
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3292
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3293
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3294
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3295
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3296
|
+
|
3297
|
+
header_params = {}
|
3298
|
+
if request.name
|
3299
|
+
header_params["name"] = request.name
|
3300
|
+
end
|
3301
|
+
|
3302
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3303
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3304
|
+
|
3305
|
+
options.apply_defaults timeout: @config.rpcs.delete_replication.timeout,
|
3306
|
+
metadata: metadata,
|
3307
|
+
retry_policy: @config.rpcs.delete_replication.retry_policy
|
3308
|
+
|
3309
|
+
options.apply_defaults timeout: @config.timeout,
|
3310
|
+
metadata: @config.metadata,
|
3311
|
+
retry_policy: @config.retry_policy
|
3312
|
+
|
3313
|
+
@net_app_stub.call_rpc :delete_replication, request, options: options do |response, operation|
|
3314
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3315
|
+
yield response, operation if block_given?
|
3316
|
+
return response
|
3317
|
+
end
|
3318
|
+
rescue ::GRPC::BadStatus => e
|
3319
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3320
|
+
end
|
3321
|
+
|
3322
|
+
##
|
3323
|
+
# Updates the settings of a specific replication.
|
3324
|
+
#
|
3325
|
+
# @overload update_replication(request, options = nil)
|
3326
|
+
# Pass arguments to `update_replication` via a request object, either of type
|
3327
|
+
# {::Google::Cloud::NetApp::V1::UpdateReplicationRequest} or an equivalent Hash.
|
3328
|
+
#
|
3329
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateReplicationRequest, ::Hash]
|
3330
|
+
# A request object representing the call parameters. Required. To specify no
|
3331
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3332
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3333
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3334
|
+
#
|
3335
|
+
# @overload update_replication(update_mask: nil, replication: nil)
|
3336
|
+
# Pass arguments to `update_replication` via keyword arguments. Note that at
|
3337
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3338
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3339
|
+
#
|
3340
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3341
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
3342
|
+
# this field.
|
3343
|
+
# @param replication [::Google::Cloud::NetApp::V1::Replication, ::Hash]
|
3344
|
+
# Required. A replication resource
|
3345
|
+
#
|
3346
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3347
|
+
# @yieldparam response [::Gapic::Operation]
|
3348
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3349
|
+
#
|
3350
|
+
# @return [::Gapic::Operation]
|
3351
|
+
#
|
3352
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3353
|
+
#
|
3354
|
+
# @example Basic example
|
3355
|
+
# require "google/cloud/netapp/v1"
|
3356
|
+
#
|
3357
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3358
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3359
|
+
#
|
3360
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3361
|
+
# request = Google::Cloud::NetApp::V1::UpdateReplicationRequest.new
|
3362
|
+
#
|
3363
|
+
# # Call the update_replication method.
|
3364
|
+
# result = client.update_replication request
|
3365
|
+
#
|
3366
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3367
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3368
|
+
# # Here is how to wait for a response.
|
3369
|
+
# result.wait_until_done! timeout: 60
|
3370
|
+
# if result.response?
|
3371
|
+
# p result.response
|
3372
|
+
# else
|
3373
|
+
# puts "No response received."
|
3374
|
+
# end
|
3375
|
+
#
|
3376
|
+
def update_replication request, options = nil
|
3377
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3378
|
+
|
3379
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateReplicationRequest
|
3380
|
+
|
3381
|
+
# Converts hash and nil to an options object
|
3382
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3383
|
+
|
3384
|
+
# Customize the options with defaults
|
3385
|
+
metadata = @config.rpcs.update_replication.metadata.to_h
|
3386
|
+
|
3387
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3388
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3389
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3390
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3391
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3392
|
+
|
3393
|
+
header_params = {}
|
3394
|
+
if request.replication&.name
|
3395
|
+
header_params["replication.name"] = request.replication.name
|
3396
|
+
end
|
3397
|
+
|
3398
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3399
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3400
|
+
|
3401
|
+
options.apply_defaults timeout: @config.rpcs.update_replication.timeout,
|
3402
|
+
metadata: metadata,
|
3403
|
+
retry_policy: @config.rpcs.update_replication.retry_policy
|
3404
|
+
|
3405
|
+
options.apply_defaults timeout: @config.timeout,
|
3406
|
+
metadata: @config.metadata,
|
3407
|
+
retry_policy: @config.retry_policy
|
3408
|
+
|
3409
|
+
@net_app_stub.call_rpc :update_replication, request, options: options do |response, operation|
|
3410
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3411
|
+
yield response, operation if block_given?
|
3412
|
+
return response
|
3413
|
+
end
|
3414
|
+
rescue ::GRPC::BadStatus => e
|
3415
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3416
|
+
end
|
3417
|
+
|
3418
|
+
##
|
3419
|
+
# Stop Cross Region Replication.
|
3420
|
+
#
|
3421
|
+
# @overload stop_replication(request, options = nil)
|
3422
|
+
# Pass arguments to `stop_replication` via a request object, either of type
|
3423
|
+
# {::Google::Cloud::NetApp::V1::StopReplicationRequest} or an equivalent Hash.
|
3424
|
+
#
|
3425
|
+
# @param request [::Google::Cloud::NetApp::V1::StopReplicationRequest, ::Hash]
|
3426
|
+
# A request object representing the call parameters. Required. To specify no
|
3427
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3428
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3429
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3430
|
+
#
|
3431
|
+
# @overload stop_replication(name: nil, force: nil)
|
3432
|
+
# Pass arguments to `stop_replication` via keyword arguments. Note that at
|
3433
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3434
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3435
|
+
#
|
3436
|
+
# @param name [::String]
|
3437
|
+
# Required. The resource name of the replication, in the format of
|
3438
|
+
# projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
|
3439
|
+
# @param force [::Boolean]
|
3440
|
+
# Indicates whether to stop replication forcefully while data transfer is in
|
3441
|
+
# progress.
|
3442
|
+
# Warning! if force is true, this will abort any current transfers
|
3443
|
+
# and can lead to data loss due to partial transfer.
|
3444
|
+
# If force is false, stop replication will fail while data transfer is in
|
3445
|
+
# progress and you will need to retry later.
|
3446
|
+
#
|
3447
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3448
|
+
# @yieldparam response [::Gapic::Operation]
|
3449
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3450
|
+
#
|
3451
|
+
# @return [::Gapic::Operation]
|
3452
|
+
#
|
3453
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3454
|
+
#
|
3455
|
+
# @example Basic example
|
3456
|
+
# require "google/cloud/netapp/v1"
|
3457
|
+
#
|
3458
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3459
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3460
|
+
#
|
3461
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3462
|
+
# request = Google::Cloud::NetApp::V1::StopReplicationRequest.new
|
3463
|
+
#
|
3464
|
+
# # Call the stop_replication method.
|
3465
|
+
# result = client.stop_replication request
|
3466
|
+
#
|
3467
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3468
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3469
|
+
# # Here is how to wait for a response.
|
3470
|
+
# result.wait_until_done! timeout: 60
|
3471
|
+
# if result.response?
|
3472
|
+
# p result.response
|
3473
|
+
# else
|
3474
|
+
# puts "No response received."
|
3475
|
+
# end
|
3476
|
+
#
|
3477
|
+
def stop_replication request, options = nil
|
3478
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3479
|
+
|
3480
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::StopReplicationRequest
|
3481
|
+
|
3482
|
+
# Converts hash and nil to an options object
|
3483
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3484
|
+
|
3485
|
+
# Customize the options with defaults
|
3486
|
+
metadata = @config.rpcs.stop_replication.metadata.to_h
|
3487
|
+
|
3488
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3489
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3490
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3491
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3492
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3493
|
+
|
3494
|
+
header_params = {}
|
3495
|
+
if request.name
|
3496
|
+
header_params["name"] = request.name
|
3497
|
+
end
|
3498
|
+
|
3499
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3500
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3501
|
+
|
3502
|
+
options.apply_defaults timeout: @config.rpcs.stop_replication.timeout,
|
3503
|
+
metadata: metadata,
|
3504
|
+
retry_policy: @config.rpcs.stop_replication.retry_policy
|
3505
|
+
|
3506
|
+
options.apply_defaults timeout: @config.timeout,
|
3507
|
+
metadata: @config.metadata,
|
3508
|
+
retry_policy: @config.retry_policy
|
3509
|
+
|
3510
|
+
@net_app_stub.call_rpc :stop_replication, request, options: options do |response, operation|
|
3511
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3512
|
+
yield response, operation if block_given?
|
3513
|
+
return response
|
3514
|
+
end
|
3515
|
+
rescue ::GRPC::BadStatus => e
|
3516
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3517
|
+
end
|
3518
|
+
|
3519
|
+
##
|
3520
|
+
# Resume Cross Region Replication.
|
3521
|
+
#
|
3522
|
+
# @overload resume_replication(request, options = nil)
|
3523
|
+
# Pass arguments to `resume_replication` via a request object, either of type
|
3524
|
+
# {::Google::Cloud::NetApp::V1::ResumeReplicationRequest} or an equivalent Hash.
|
3525
|
+
#
|
3526
|
+
# @param request [::Google::Cloud::NetApp::V1::ResumeReplicationRequest, ::Hash]
|
3527
|
+
# A request object representing the call parameters. Required. To specify no
|
3528
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3529
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3530
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3531
|
+
#
|
3532
|
+
# @overload resume_replication(name: nil)
|
3533
|
+
# Pass arguments to `resume_replication` via keyword arguments. Note that at
|
3534
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3535
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3536
|
+
#
|
3537
|
+
# @param name [::String]
|
3538
|
+
# Required. The resource name of the replication, in the format of
|
3539
|
+
# projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
|
3540
|
+
#
|
3541
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3542
|
+
# @yieldparam response [::Gapic::Operation]
|
3543
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3544
|
+
#
|
3545
|
+
# @return [::Gapic::Operation]
|
3546
|
+
#
|
3547
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3548
|
+
#
|
3549
|
+
# @example Basic example
|
3550
|
+
# require "google/cloud/netapp/v1"
|
3551
|
+
#
|
3552
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3553
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3554
|
+
#
|
3555
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3556
|
+
# request = Google::Cloud::NetApp::V1::ResumeReplicationRequest.new
|
3557
|
+
#
|
3558
|
+
# # Call the resume_replication method.
|
3559
|
+
# result = client.resume_replication request
|
3560
|
+
#
|
3561
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3562
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3563
|
+
# # Here is how to wait for a response.
|
3564
|
+
# result.wait_until_done! timeout: 60
|
3565
|
+
# if result.response?
|
3566
|
+
# p result.response
|
3567
|
+
# else
|
3568
|
+
# puts "No response received."
|
3569
|
+
# end
|
3570
|
+
#
|
3571
|
+
def resume_replication request, options = nil
|
3572
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3573
|
+
|
3574
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ResumeReplicationRequest
|
3575
|
+
|
3576
|
+
# Converts hash and nil to an options object
|
3577
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3578
|
+
|
3579
|
+
# Customize the options with defaults
|
3580
|
+
metadata = @config.rpcs.resume_replication.metadata.to_h
|
3581
|
+
|
3582
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3583
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3584
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3585
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3586
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3587
|
+
|
3588
|
+
header_params = {}
|
3589
|
+
if request.name
|
3590
|
+
header_params["name"] = request.name
|
3591
|
+
end
|
3592
|
+
|
3593
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3594
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3595
|
+
|
3596
|
+
options.apply_defaults timeout: @config.rpcs.resume_replication.timeout,
|
3597
|
+
metadata: metadata,
|
3598
|
+
retry_policy: @config.rpcs.resume_replication.retry_policy
|
3599
|
+
|
3600
|
+
options.apply_defaults timeout: @config.timeout,
|
3601
|
+
metadata: @config.metadata,
|
3602
|
+
retry_policy: @config.retry_policy
|
3603
|
+
|
3604
|
+
@net_app_stub.call_rpc :resume_replication, request, options: options do |response, operation|
|
3605
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3606
|
+
yield response, operation if block_given?
|
3607
|
+
return response
|
3608
|
+
end
|
3609
|
+
rescue ::GRPC::BadStatus => e
|
3610
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3611
|
+
end
|
3612
|
+
|
3613
|
+
##
|
3614
|
+
# Reverses direction of replication. Source becomes destination and
|
3615
|
+
# destination becomes source.
|
3616
|
+
#
|
3617
|
+
# @overload reverse_replication_direction(request, options = nil)
|
3618
|
+
# Pass arguments to `reverse_replication_direction` via a request object, either of type
|
3619
|
+
# {::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest} or an equivalent Hash.
|
3620
|
+
#
|
3621
|
+
# @param request [::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest, ::Hash]
|
3622
|
+
# A request object representing the call parameters. Required. To specify no
|
3623
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3624
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3625
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3626
|
+
#
|
3627
|
+
# @overload reverse_replication_direction(name: nil)
|
3628
|
+
# Pass arguments to `reverse_replication_direction` via keyword arguments. Note that at
|
3629
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3630
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3631
|
+
#
|
3632
|
+
# @param name [::String]
|
3633
|
+
# Required. The resource name of the replication, in the format of
|
3634
|
+
# projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
|
3635
|
+
#
|
3636
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3637
|
+
# @yieldparam response [::Gapic::Operation]
|
3638
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3639
|
+
#
|
3640
|
+
# @return [::Gapic::Operation]
|
3641
|
+
#
|
3642
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3643
|
+
#
|
3644
|
+
# @example Basic example
|
3645
|
+
# require "google/cloud/netapp/v1"
|
3646
|
+
#
|
3647
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3648
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3649
|
+
#
|
3650
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3651
|
+
# request = Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest.new
|
3652
|
+
#
|
3653
|
+
# # Call the reverse_replication_direction method.
|
3654
|
+
# result = client.reverse_replication_direction request
|
3655
|
+
#
|
3656
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3657
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3658
|
+
# # Here is how to wait for a response.
|
3659
|
+
# result.wait_until_done! timeout: 60
|
3660
|
+
# if result.response?
|
3661
|
+
# p result.response
|
3662
|
+
# else
|
3663
|
+
# puts "No response received."
|
3664
|
+
# end
|
3665
|
+
#
|
3666
|
+
def reverse_replication_direction request, options = nil
|
3667
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3668
|
+
|
3669
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest
|
3670
|
+
|
3671
|
+
# Converts hash and nil to an options object
|
3672
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3673
|
+
|
3674
|
+
# Customize the options with defaults
|
3675
|
+
metadata = @config.rpcs.reverse_replication_direction.metadata.to_h
|
3676
|
+
|
3677
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3678
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3679
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3680
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3681
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3682
|
+
|
3683
|
+
header_params = {}
|
3684
|
+
if request.name
|
3685
|
+
header_params["name"] = request.name
|
3686
|
+
end
|
3687
|
+
|
3688
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3689
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3690
|
+
|
3691
|
+
options.apply_defaults timeout: @config.rpcs.reverse_replication_direction.timeout,
|
3692
|
+
metadata: metadata,
|
3693
|
+
retry_policy: @config.rpcs.reverse_replication_direction.retry_policy
|
3694
|
+
|
3695
|
+
options.apply_defaults timeout: @config.timeout,
|
3696
|
+
metadata: @config.metadata,
|
3697
|
+
retry_policy: @config.retry_policy
|
3698
|
+
|
3699
|
+
@net_app_stub.call_rpc :reverse_replication_direction, request, options: options do |response, operation|
|
3700
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3701
|
+
yield response, operation if block_given?
|
3702
|
+
return response
|
3703
|
+
end
|
3704
|
+
rescue ::GRPC::BadStatus => e
|
3705
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3706
|
+
end
|
3707
|
+
|
3708
|
+
##
|
3709
|
+
# Configuration class for the NetApp API.
|
3710
|
+
#
|
3711
|
+
# This class represents the configuration for NetApp,
|
3712
|
+
# providing control over timeouts, retry behavior, logging, transport
|
3713
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
3714
|
+
# applied individually to specific RPCs. See
|
3715
|
+
# {::Google::Cloud::NetApp::V1::NetApp::Client::Configuration::Rpcs}
|
3716
|
+
# for a list of RPCs that can be configured independently.
|
3717
|
+
#
|
3718
|
+
# Configuration can be applied globally to all clients, or to a single client
|
3719
|
+
# on construction.
|
3720
|
+
#
|
3721
|
+
# @example
|
3722
|
+
#
|
3723
|
+
# # Modify the global config, setting the timeout for
|
3724
|
+
# # list_storage_pools to 20 seconds,
|
3725
|
+
# # and all remaining timeouts to 10 seconds.
|
3726
|
+
# ::Google::Cloud::NetApp::V1::NetApp::Client.configure do |config|
|
3727
|
+
# config.timeout = 10.0
|
3728
|
+
# config.rpcs.list_storage_pools.timeout = 20.0
|
3729
|
+
# end
|
3730
|
+
#
|
3731
|
+
# # Apply the above configuration only to a new client.
|
3732
|
+
# client = ::Google::Cloud::NetApp::V1::NetApp::Client.new do |config|
|
3733
|
+
# config.timeout = 10.0
|
3734
|
+
# config.rpcs.list_storage_pools.timeout = 20.0
|
3735
|
+
# end
|
3736
|
+
#
|
3737
|
+
# @!attribute [rw] endpoint
|
3738
|
+
# The hostname or hostname:port of the service endpoint.
|
3739
|
+
# Defaults to `"netapp.googleapis.com"`.
|
3740
|
+
# @return [::String]
|
3741
|
+
# @!attribute [rw] credentials
|
3742
|
+
# Credentials to send with calls. You may provide any of the following types:
|
3743
|
+
# * (`String`) The path to a service account key file in JSON format
|
3744
|
+
# * (`Hash`) A service account key as a Hash
|
3745
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3746
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3747
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3748
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3749
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3750
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3751
|
+
# * (`nil`) indicating no credentials
|
3752
|
+
# @return [::Object]
|
3753
|
+
# @!attribute [rw] scope
|
3754
|
+
# The OAuth scopes
|
3755
|
+
# @return [::Array<::String>]
|
3756
|
+
# @!attribute [rw] lib_name
|
3757
|
+
# The library name as recorded in instrumentation and logging
|
3758
|
+
# @return [::String]
|
3759
|
+
# @!attribute [rw] lib_version
|
3760
|
+
# The library version as recorded in instrumentation and logging
|
3761
|
+
# @return [::String]
|
3762
|
+
# @!attribute [rw] channel_args
|
3763
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
3764
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
3765
|
+
# @return [::Hash]
|
3766
|
+
# @!attribute [rw] interceptors
|
3767
|
+
# An array of interceptors that are run before calls are executed.
|
3768
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
3769
|
+
# @!attribute [rw] timeout
|
3770
|
+
# The call timeout in seconds.
|
3771
|
+
# @return [::Numeric]
|
3772
|
+
# @!attribute [rw] metadata
|
3773
|
+
# Additional gRPC headers to be sent with the call.
|
3774
|
+
# @return [::Hash{::Symbol=>::String}]
|
3775
|
+
# @!attribute [rw] retry_policy
|
3776
|
+
# The retry policy. The value is a hash with the following keys:
|
3777
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3778
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3779
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3780
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3781
|
+
# trigger a retry.
|
3782
|
+
# @return [::Hash]
|
3783
|
+
# @!attribute [rw] quota_project
|
3784
|
+
# A separate project against which to charge quota.
|
3785
|
+
# @return [::String]
|
3786
|
+
#
|
3787
|
+
class Configuration
|
3788
|
+
extend ::Gapic::Config
|
3789
|
+
|
3790
|
+
DEFAULT_ENDPOINT = "netapp.googleapis.com"
|
3791
|
+
|
3792
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
3793
|
+
config_attr :credentials, nil do |value|
|
3794
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3795
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
3796
|
+
allowed.any? { |klass| klass === value }
|
3797
|
+
end
|
3798
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
3799
|
+
config_attr :lib_name, nil, ::String, nil
|
3800
|
+
config_attr :lib_version, nil, ::String, nil
|
3801
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
3802
|
+
config_attr :interceptors, nil, ::Array, nil
|
3803
|
+
config_attr :timeout, nil, ::Numeric, nil
|
3804
|
+
config_attr :metadata, nil, ::Hash, nil
|
3805
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3806
|
+
config_attr :quota_project, nil, ::String, nil
|
3807
|
+
|
3808
|
+
# @private
|
3809
|
+
def initialize parent_config = nil
|
3810
|
+
@parent_config = parent_config unless parent_config.nil?
|
3811
|
+
|
3812
|
+
yield self if block_given?
|
3813
|
+
end
|
3814
|
+
|
3815
|
+
##
|
3816
|
+
# Configurations for individual RPCs
|
3817
|
+
# @return [Rpcs]
|
3818
|
+
#
|
3819
|
+
def rpcs
|
3820
|
+
@rpcs ||= begin
|
3821
|
+
parent_rpcs = nil
|
3822
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
3823
|
+
Rpcs.new parent_rpcs
|
3824
|
+
end
|
3825
|
+
end
|
3826
|
+
|
3827
|
+
##
|
3828
|
+
# Configuration RPC class for the NetApp API.
|
3829
|
+
#
|
3830
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3831
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3832
|
+
# the following configuration fields:
|
3833
|
+
#
|
3834
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
3835
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3836
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3837
|
+
# include the following keys:
|
3838
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3839
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3840
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3841
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3842
|
+
# trigger a retry.
|
3843
|
+
#
|
3844
|
+
class Rpcs
|
3845
|
+
##
|
3846
|
+
# RPC-specific configuration for `list_storage_pools`
|
3847
|
+
# @return [::Gapic::Config::Method]
|
3848
|
+
#
|
3849
|
+
attr_reader :list_storage_pools
|
3850
|
+
##
|
3851
|
+
# RPC-specific configuration for `create_storage_pool`
|
3852
|
+
# @return [::Gapic::Config::Method]
|
3853
|
+
#
|
3854
|
+
attr_reader :create_storage_pool
|
3855
|
+
##
|
3856
|
+
# RPC-specific configuration for `get_storage_pool`
|
3857
|
+
# @return [::Gapic::Config::Method]
|
3858
|
+
#
|
3859
|
+
attr_reader :get_storage_pool
|
3860
|
+
##
|
3861
|
+
# RPC-specific configuration for `update_storage_pool`
|
3862
|
+
# @return [::Gapic::Config::Method]
|
3863
|
+
#
|
3864
|
+
attr_reader :update_storage_pool
|
3865
|
+
##
|
3866
|
+
# RPC-specific configuration for `delete_storage_pool`
|
3867
|
+
# @return [::Gapic::Config::Method]
|
3868
|
+
#
|
3869
|
+
attr_reader :delete_storage_pool
|
3870
|
+
##
|
3871
|
+
# RPC-specific configuration for `list_volumes`
|
3872
|
+
# @return [::Gapic::Config::Method]
|
3873
|
+
#
|
3874
|
+
attr_reader :list_volumes
|
3875
|
+
##
|
3876
|
+
# RPC-specific configuration for `get_volume`
|
3877
|
+
# @return [::Gapic::Config::Method]
|
3878
|
+
#
|
3879
|
+
attr_reader :get_volume
|
3880
|
+
##
|
3881
|
+
# RPC-specific configuration for `create_volume`
|
3882
|
+
# @return [::Gapic::Config::Method]
|
3883
|
+
#
|
3884
|
+
attr_reader :create_volume
|
3885
|
+
##
|
3886
|
+
# RPC-specific configuration for `update_volume`
|
3887
|
+
# @return [::Gapic::Config::Method]
|
3888
|
+
#
|
3889
|
+
attr_reader :update_volume
|
3890
|
+
##
|
3891
|
+
# RPC-specific configuration for `delete_volume`
|
3892
|
+
# @return [::Gapic::Config::Method]
|
3893
|
+
#
|
3894
|
+
attr_reader :delete_volume
|
3895
|
+
##
|
3896
|
+
# RPC-specific configuration for `revert_volume`
|
3897
|
+
# @return [::Gapic::Config::Method]
|
3898
|
+
#
|
3899
|
+
attr_reader :revert_volume
|
3900
|
+
##
|
3901
|
+
# RPC-specific configuration for `list_snapshots`
|
3902
|
+
# @return [::Gapic::Config::Method]
|
3903
|
+
#
|
3904
|
+
attr_reader :list_snapshots
|
3905
|
+
##
|
3906
|
+
# RPC-specific configuration for `get_snapshot`
|
3907
|
+
# @return [::Gapic::Config::Method]
|
3908
|
+
#
|
3909
|
+
attr_reader :get_snapshot
|
3910
|
+
##
|
3911
|
+
# RPC-specific configuration for `create_snapshot`
|
3912
|
+
# @return [::Gapic::Config::Method]
|
3913
|
+
#
|
3914
|
+
attr_reader :create_snapshot
|
3915
|
+
##
|
3916
|
+
# RPC-specific configuration for `delete_snapshot`
|
3917
|
+
# @return [::Gapic::Config::Method]
|
3918
|
+
#
|
3919
|
+
attr_reader :delete_snapshot
|
3920
|
+
##
|
3921
|
+
# RPC-specific configuration for `update_snapshot`
|
3922
|
+
# @return [::Gapic::Config::Method]
|
3923
|
+
#
|
3924
|
+
attr_reader :update_snapshot
|
3925
|
+
##
|
3926
|
+
# RPC-specific configuration for `list_active_directories`
|
3927
|
+
# @return [::Gapic::Config::Method]
|
3928
|
+
#
|
3929
|
+
attr_reader :list_active_directories
|
3930
|
+
##
|
3931
|
+
# RPC-specific configuration for `get_active_directory`
|
3932
|
+
# @return [::Gapic::Config::Method]
|
3933
|
+
#
|
3934
|
+
attr_reader :get_active_directory
|
3935
|
+
##
|
3936
|
+
# RPC-specific configuration for `create_active_directory`
|
3937
|
+
# @return [::Gapic::Config::Method]
|
3938
|
+
#
|
3939
|
+
attr_reader :create_active_directory
|
3940
|
+
##
|
3941
|
+
# RPC-specific configuration for `update_active_directory`
|
3942
|
+
# @return [::Gapic::Config::Method]
|
3943
|
+
#
|
3944
|
+
attr_reader :update_active_directory
|
3945
|
+
##
|
3946
|
+
# RPC-specific configuration for `delete_active_directory`
|
3947
|
+
# @return [::Gapic::Config::Method]
|
3948
|
+
#
|
3949
|
+
attr_reader :delete_active_directory
|
3950
|
+
##
|
3951
|
+
# RPC-specific configuration for `list_kms_configs`
|
3952
|
+
# @return [::Gapic::Config::Method]
|
3953
|
+
#
|
3954
|
+
attr_reader :list_kms_configs
|
3955
|
+
##
|
3956
|
+
# RPC-specific configuration for `create_kms_config`
|
3957
|
+
# @return [::Gapic::Config::Method]
|
3958
|
+
#
|
3959
|
+
attr_reader :create_kms_config
|
3960
|
+
##
|
3961
|
+
# RPC-specific configuration for `get_kms_config`
|
3962
|
+
# @return [::Gapic::Config::Method]
|
3963
|
+
#
|
3964
|
+
attr_reader :get_kms_config
|
3965
|
+
##
|
3966
|
+
# RPC-specific configuration for `update_kms_config`
|
3967
|
+
# @return [::Gapic::Config::Method]
|
3968
|
+
#
|
3969
|
+
attr_reader :update_kms_config
|
3970
|
+
##
|
3971
|
+
# RPC-specific configuration for `encrypt_volumes`
|
3972
|
+
# @return [::Gapic::Config::Method]
|
3973
|
+
#
|
3974
|
+
attr_reader :encrypt_volumes
|
3975
|
+
##
|
3976
|
+
# RPC-specific configuration for `verify_kms_config`
|
3977
|
+
# @return [::Gapic::Config::Method]
|
3978
|
+
#
|
3979
|
+
attr_reader :verify_kms_config
|
3980
|
+
##
|
3981
|
+
# RPC-specific configuration for `delete_kms_config`
|
3982
|
+
# @return [::Gapic::Config::Method]
|
3983
|
+
#
|
3984
|
+
attr_reader :delete_kms_config
|
3985
|
+
##
|
3986
|
+
# RPC-specific configuration for `list_replications`
|
3987
|
+
# @return [::Gapic::Config::Method]
|
3988
|
+
#
|
3989
|
+
attr_reader :list_replications
|
3990
|
+
##
|
3991
|
+
# RPC-specific configuration for `get_replication`
|
3992
|
+
# @return [::Gapic::Config::Method]
|
3993
|
+
#
|
3994
|
+
attr_reader :get_replication
|
3995
|
+
##
|
3996
|
+
# RPC-specific configuration for `create_replication`
|
3997
|
+
# @return [::Gapic::Config::Method]
|
3998
|
+
#
|
3999
|
+
attr_reader :create_replication
|
4000
|
+
##
|
4001
|
+
# RPC-specific configuration for `delete_replication`
|
4002
|
+
# @return [::Gapic::Config::Method]
|
4003
|
+
#
|
4004
|
+
attr_reader :delete_replication
|
4005
|
+
##
|
4006
|
+
# RPC-specific configuration for `update_replication`
|
4007
|
+
# @return [::Gapic::Config::Method]
|
4008
|
+
#
|
4009
|
+
attr_reader :update_replication
|
4010
|
+
##
|
4011
|
+
# RPC-specific configuration for `stop_replication`
|
4012
|
+
# @return [::Gapic::Config::Method]
|
4013
|
+
#
|
4014
|
+
attr_reader :stop_replication
|
4015
|
+
##
|
4016
|
+
# RPC-specific configuration for `resume_replication`
|
4017
|
+
# @return [::Gapic::Config::Method]
|
4018
|
+
#
|
4019
|
+
attr_reader :resume_replication
|
4020
|
+
##
|
4021
|
+
# RPC-specific configuration for `reverse_replication_direction`
|
4022
|
+
# @return [::Gapic::Config::Method]
|
4023
|
+
#
|
4024
|
+
attr_reader :reverse_replication_direction
|
4025
|
+
|
4026
|
+
# @private
|
4027
|
+
def initialize parent_rpcs = nil
|
4028
|
+
list_storage_pools_config = parent_rpcs.list_storage_pools if parent_rpcs.respond_to? :list_storage_pools
|
4029
|
+
@list_storage_pools = ::Gapic::Config::Method.new list_storage_pools_config
|
4030
|
+
create_storage_pool_config = parent_rpcs.create_storage_pool if parent_rpcs.respond_to? :create_storage_pool
|
4031
|
+
@create_storage_pool = ::Gapic::Config::Method.new create_storage_pool_config
|
4032
|
+
get_storage_pool_config = parent_rpcs.get_storage_pool if parent_rpcs.respond_to? :get_storage_pool
|
4033
|
+
@get_storage_pool = ::Gapic::Config::Method.new get_storage_pool_config
|
4034
|
+
update_storage_pool_config = parent_rpcs.update_storage_pool if parent_rpcs.respond_to? :update_storage_pool
|
4035
|
+
@update_storage_pool = ::Gapic::Config::Method.new update_storage_pool_config
|
4036
|
+
delete_storage_pool_config = parent_rpcs.delete_storage_pool if parent_rpcs.respond_to? :delete_storage_pool
|
4037
|
+
@delete_storage_pool = ::Gapic::Config::Method.new delete_storage_pool_config
|
4038
|
+
list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes
|
4039
|
+
@list_volumes = ::Gapic::Config::Method.new list_volumes_config
|
4040
|
+
get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume
|
4041
|
+
@get_volume = ::Gapic::Config::Method.new get_volume_config
|
4042
|
+
create_volume_config = parent_rpcs.create_volume if parent_rpcs.respond_to? :create_volume
|
4043
|
+
@create_volume = ::Gapic::Config::Method.new create_volume_config
|
4044
|
+
update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume
|
4045
|
+
@update_volume = ::Gapic::Config::Method.new update_volume_config
|
4046
|
+
delete_volume_config = parent_rpcs.delete_volume if parent_rpcs.respond_to? :delete_volume
|
4047
|
+
@delete_volume = ::Gapic::Config::Method.new delete_volume_config
|
4048
|
+
revert_volume_config = parent_rpcs.revert_volume if parent_rpcs.respond_to? :revert_volume
|
4049
|
+
@revert_volume = ::Gapic::Config::Method.new revert_volume_config
|
4050
|
+
list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
|
4051
|
+
@list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
|
4052
|
+
get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot
|
4053
|
+
@get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
|
4054
|
+
create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
|
4055
|
+
@create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
|
4056
|
+
delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot
|
4057
|
+
@delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
|
4058
|
+
update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot
|
4059
|
+
@update_snapshot = ::Gapic::Config::Method.new update_snapshot_config
|
4060
|
+
list_active_directories_config = parent_rpcs.list_active_directories if parent_rpcs.respond_to? :list_active_directories
|
4061
|
+
@list_active_directories = ::Gapic::Config::Method.new list_active_directories_config
|
4062
|
+
get_active_directory_config = parent_rpcs.get_active_directory if parent_rpcs.respond_to? :get_active_directory
|
4063
|
+
@get_active_directory = ::Gapic::Config::Method.new get_active_directory_config
|
4064
|
+
create_active_directory_config = parent_rpcs.create_active_directory if parent_rpcs.respond_to? :create_active_directory
|
4065
|
+
@create_active_directory = ::Gapic::Config::Method.new create_active_directory_config
|
4066
|
+
update_active_directory_config = parent_rpcs.update_active_directory if parent_rpcs.respond_to? :update_active_directory
|
4067
|
+
@update_active_directory = ::Gapic::Config::Method.new update_active_directory_config
|
4068
|
+
delete_active_directory_config = parent_rpcs.delete_active_directory if parent_rpcs.respond_to? :delete_active_directory
|
4069
|
+
@delete_active_directory = ::Gapic::Config::Method.new delete_active_directory_config
|
4070
|
+
list_kms_configs_config = parent_rpcs.list_kms_configs if parent_rpcs.respond_to? :list_kms_configs
|
4071
|
+
@list_kms_configs = ::Gapic::Config::Method.new list_kms_configs_config
|
4072
|
+
create_kms_config_config = parent_rpcs.create_kms_config if parent_rpcs.respond_to? :create_kms_config
|
4073
|
+
@create_kms_config = ::Gapic::Config::Method.new create_kms_config_config
|
4074
|
+
get_kms_config_config = parent_rpcs.get_kms_config if parent_rpcs.respond_to? :get_kms_config
|
4075
|
+
@get_kms_config = ::Gapic::Config::Method.new get_kms_config_config
|
4076
|
+
update_kms_config_config = parent_rpcs.update_kms_config if parent_rpcs.respond_to? :update_kms_config
|
4077
|
+
@update_kms_config = ::Gapic::Config::Method.new update_kms_config_config
|
4078
|
+
encrypt_volumes_config = parent_rpcs.encrypt_volumes if parent_rpcs.respond_to? :encrypt_volumes
|
4079
|
+
@encrypt_volumes = ::Gapic::Config::Method.new encrypt_volumes_config
|
4080
|
+
verify_kms_config_config = parent_rpcs.verify_kms_config if parent_rpcs.respond_to? :verify_kms_config
|
4081
|
+
@verify_kms_config = ::Gapic::Config::Method.new verify_kms_config_config
|
4082
|
+
delete_kms_config_config = parent_rpcs.delete_kms_config if parent_rpcs.respond_to? :delete_kms_config
|
4083
|
+
@delete_kms_config = ::Gapic::Config::Method.new delete_kms_config_config
|
4084
|
+
list_replications_config = parent_rpcs.list_replications if parent_rpcs.respond_to? :list_replications
|
4085
|
+
@list_replications = ::Gapic::Config::Method.new list_replications_config
|
4086
|
+
get_replication_config = parent_rpcs.get_replication if parent_rpcs.respond_to? :get_replication
|
4087
|
+
@get_replication = ::Gapic::Config::Method.new get_replication_config
|
4088
|
+
create_replication_config = parent_rpcs.create_replication if parent_rpcs.respond_to? :create_replication
|
4089
|
+
@create_replication = ::Gapic::Config::Method.new create_replication_config
|
4090
|
+
delete_replication_config = parent_rpcs.delete_replication if parent_rpcs.respond_to? :delete_replication
|
4091
|
+
@delete_replication = ::Gapic::Config::Method.new delete_replication_config
|
4092
|
+
update_replication_config = parent_rpcs.update_replication if parent_rpcs.respond_to? :update_replication
|
4093
|
+
@update_replication = ::Gapic::Config::Method.new update_replication_config
|
4094
|
+
stop_replication_config = parent_rpcs.stop_replication if parent_rpcs.respond_to? :stop_replication
|
4095
|
+
@stop_replication = ::Gapic::Config::Method.new stop_replication_config
|
4096
|
+
resume_replication_config = parent_rpcs.resume_replication if parent_rpcs.respond_to? :resume_replication
|
4097
|
+
@resume_replication = ::Gapic::Config::Method.new resume_replication_config
|
4098
|
+
reverse_replication_direction_config = parent_rpcs.reverse_replication_direction if parent_rpcs.respond_to? :reverse_replication_direction
|
4099
|
+
@reverse_replication_direction = ::Gapic::Config::Method.new reverse_replication_direction_config
|
4100
|
+
|
4101
|
+
yield self if block_given?
|
4102
|
+
end
|
4103
|
+
end
|
4104
|
+
end
|
4105
|
+
end
|
4106
|
+
end
|
4107
|
+
end
|
4108
|
+
end
|
4109
|
+
end
|
4110
|
+
end
|