Class: Google::Cloud::NetApp::V1::NetApp::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/netapp/v1/netapp/client.rb

Overview

Client for the NetApp service.

NetApp Files Google Cloud Service

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#active_directory_path, #backup_path, #backup_policy_path, #backup_vault_path, #host_group_path, #kms_config_path, #location_path, #network_path, #quota_rule_path, #replication_path, #snapshot_path, #storage_pool_path, #volume_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new NetApp client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::NetApp::V1::NetApp::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the NetApp client.

Yield Parameters:



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 281

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/netapp/v1/cloud_netapp_service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @net_app_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::NetApp::V1::NetApp::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @net_app_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @net_app_stub.endpoint
    config.universe_domain = @net_app_stub.universe_domain
    config.logger = @net_app_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


359
360
361
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 359

def location_client
  @location_client
end

#operations_client::Google::Cloud::NetApp::V1::NetApp::Operations (readonly)

Get the associated client for long-running operations.



352
353
354
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 352

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the NetApp Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all NetApp clients
::Google::Cloud::NetApp::V1::NetApp::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 63

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "NetApp", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.list_storage_pools.timeout = 60.0
    default_config.rpcs.list_storage_pools.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_storage_pool.timeout = 60.0

    default_config.rpcs.get_storage_pool.timeout = 60.0
    default_config.rpcs.get_storage_pool.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.update_storage_pool.timeout = 60.0

    default_config.rpcs.delete_storage_pool.timeout = 60.0

    default_config.rpcs.list_volumes.timeout = 60.0
    default_config.rpcs.list_volumes.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_volume.timeout = 60.0
    default_config.rpcs.get_volume.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_volume.timeout = 60.0

    default_config.rpcs.update_volume.timeout = 60.0

    default_config.rpcs.delete_volume.timeout = 60.0

    default_config.rpcs.revert_volume.timeout = 60.0

    default_config.rpcs.list_snapshots.timeout = 60.0
    default_config.rpcs.list_snapshots.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_snapshot.timeout = 60.0
    default_config.rpcs.get_snapshot.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_snapshot.timeout = 60.0

    default_config.rpcs.delete_snapshot.timeout = 60.0

    default_config.rpcs.update_snapshot.timeout = 60.0

    default_config.rpcs.list_active_directories.timeout = 60.0
    default_config.rpcs.list_active_directories.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_active_directory.timeout = 60.0
    default_config.rpcs.get_active_directory.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_active_directory.timeout = 60.0

    default_config.rpcs.update_active_directory.timeout = 60.0

    default_config.rpcs.delete_active_directory.timeout = 60.0

    default_config.rpcs.list_kms_configs.timeout = 60.0
    default_config.rpcs.list_kms_configs.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_kms_config.timeout = 60.0

    default_config.rpcs.get_kms_config.timeout = 60.0
    default_config.rpcs.get_kms_config.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.update_kms_config.timeout = 60.0

    default_config.rpcs.encrypt_volumes.timeout = 60.0

    default_config.rpcs.verify_kms_config.timeout = 60.0

    default_config.rpcs.delete_kms_config.timeout = 60.0

    default_config.rpcs.list_replications.timeout = 60.0
    default_config.rpcs.list_replications.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_replication.timeout = 60.0
    default_config.rpcs.get_replication.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_replication.timeout = 60.0

    default_config.rpcs.delete_replication.timeout = 60.0

    default_config.rpcs.update_replication.timeout = 60.0

    default_config.rpcs.stop_replication.timeout = 60.0

    default_config.rpcs.resume_replication.timeout = 60.0

    default_config.rpcs.reverse_replication_direction.timeout = 60.0

    default_config.rpcs.create_backup_vault.timeout = 60.0

    default_config.rpcs.get_backup_vault.timeout = 60.0
    default_config.rpcs.get_backup_vault.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_backup_vaults.timeout = 60.0
    default_config.rpcs.list_backup_vaults.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.update_backup_vault.timeout = 60.0

    default_config.rpcs.delete_backup_vault.timeout = 60.0

    default_config.rpcs.create_backup.timeout = 60.0

    default_config.rpcs.get_backup.timeout = 60.0
    default_config.rpcs.get_backup.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_backups.timeout = 60.0
    default_config.rpcs.list_backups.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_backup.timeout = 60.0

    default_config.rpcs.update_backup.timeout = 60.0

    default_config.rpcs.create_backup_policy.timeout = 60.0

    default_config.rpcs.get_backup_policy.timeout = 60.0
    default_config.rpcs.get_backup_policy.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_backup_policies.timeout = 60.0
    default_config.rpcs.list_backup_policies.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.update_backup_policy.timeout = 60.0

    default_config.rpcs.delete_backup_policy.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the NetApp Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



251
252
253
254
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 251

def configure
  yield @config if block_given?
  @config
end

#create_active_directory(request, options = nil) ⇒ ::Gapic::Operation #create_active_directory(parent: nil, active_directory: nil, active_directory_id: nil) ⇒ ::Gapic::Operation

CreateActiveDirectory Creates the active directory specified in the request.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest.new

# Call the create_active_directory method.
result = client.create_active_directory request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_active_directory(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_active_directory via a request object, either of type CreateActiveDirectoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_active_directory(parent: nil, active_directory: nil, active_directory_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_active_directory via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • active_directory (::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash) (defaults to: nil)

      Required. Fields of the to be created active directory.

    • active_directory_id (::String) (defaults to: nil)

      Required. ID of the active directory to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter , the last a letter or a number, and a 63 character maximum.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2463

def create_active_directory request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateActiveDirectoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_active_directory..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_active_directory.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_active_directory.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_active_directory, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_backup(request, options = nil) ⇒ ::Gapic::Operation #create_backup(parent: nil, backup_id: nil, backup: nil) ⇒ ::Gapic::Operation

Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateBackupRequest.new

# Call the create_backup method.
result = client.create_backup request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_backup(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backup via a request object, either of type CreateBackupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateBackupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_backup(parent: nil, backup_id: nil, backup: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backup via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The NetApp backupVault to create the backups of, in the format projects/*/locations/*/backupVaults/{backup_vault_id}

    • backup_id (::String) (defaults to: nil)

      Required. The ID to use for the backup. The ID must be unique within the specified backupVault. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

    • backup (::Google::Cloud::NetApp::V1::Backup, ::Hash) (defaults to: nil)

      Required. A backup resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4886

def create_backup request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_backup..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_backup.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_backup.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_backup, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_backup_policy(request, options = nil) ⇒ ::Gapic::Operation #create_backup_policy(parent: nil, backup_policy: nil, backup_policy_id: nil) ⇒ ::Gapic::Operation

Creates new backup policy

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateBackupPolicyRequest.new

# Call the create_backup_policy method.
result = client.create_backup_policy request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_backup_policy(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backup_policy via a request object, either of type CreateBackupPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_backup_policy(parent: nil, backup_policy: nil, backup_policy_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backup_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The location to create the backup policies of, in the format projects/{project_id}/locations/{location}

    • backup_policy (::Google::Cloud::NetApp::V1::BackupPolicy, ::Hash) (defaults to: nil)

      Required. A backupPolicy resource

    • backup_policy_id (::String) (defaults to: nil)

      Required. The ID to use for the backup policy. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5383

def create_backup_policy request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_backup_policy..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_backup_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_backup_policy.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_backup_policy, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_backup_vault(request, options = nil) ⇒ ::Gapic::Operation #create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil) ⇒ ::Gapic::Operation

Creates new backup vault

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateBackupVaultRequest.new

# Call the create_backup_vault method.
result = client.create_backup_vault request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_backup_vault(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backup_vault via a request object, either of type CreateBackupVaultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateBackupVaultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backup_vault via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The location to create the backup vaults, in the format projects/{project_id}/locations/{location}

    • backup_vault_id (::String) (defaults to: nil)

      Required. The ID to use for the backupVault. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

    • backup_vault (::Google::Cloud::NetApp::V1::BackupVault, ::Hash) (defaults to: nil)

      Required. A backupVault resource

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4397

def create_backup_vault request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupVaultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_backup_vault..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_backup_vault.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_backup_vault.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_backup_vault, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_host_group(request, options = nil) ⇒ ::Gapic::Operation #create_host_group(parent: nil, host_group: nil, host_group_id: nil) ⇒ ::Gapic::Operation

Creates a new host group.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateHostGroupRequest.new

# Call the create_host_group method.
result = client.create_host_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_host_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_host_group via a request object, either of type CreateHostGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateHostGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_host_group(parent: nil, host_group: nil, host_group_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_host_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for CreateHostGroupRequest

    • host_group (::Google::Cloud::NetApp::V1::HostGroup, ::Hash) (defaults to: nil)

      Required. Fields of the host group to create.

    • host_group_id (::String) (defaults to: nil)

      Required. ID of the host group to create. Must be unique within the parent resource. Must contain only letters, numbers, and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6637

def create_host_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateHostGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_host_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_host_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_host_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_host_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_kms_config(request, options = nil) ⇒ ::Gapic::Operation #create_kms_config(parent: nil, kms_config_id: nil, kms_config: nil) ⇒ ::Gapic::Operation

Creates a new KMS config.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateKmsConfigRequest.new

# Call the create_kms_config method.
result = client.create_kms_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_kms_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_kms_config via a request object, either of type CreateKmsConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateKmsConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_kms_config(parent: nil, kms_config_id: nil, kms_config: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_kms_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • kms_config_id (::String) (defaults to: nil)

      Required. Id of the requesting KmsConfig. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

    • kms_config (::Google::Cloud::NetApp::V1::KmsConfig, ::Hash) (defaults to: nil)

      Required. The required parameters to create a new KmsConfig.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2858

def create_kms_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateKmsConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_kms_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_kms_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_kms_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_kms_config, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_quota_rule(request, options = nil) ⇒ ::Gapic::Operation #create_quota_rule(parent: nil, quota_rule: nil, quota_rule_id: nil) ⇒ ::Gapic::Operation

Creates a new quota rule.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateQuotaRuleRequest.new

# Call the create_quota_rule method.
result = client.create_quota_rule request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_quota_rule(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_quota_rule via a request object, either of type CreateQuotaRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateQuotaRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_quota_rule(parent: nil, quota_rule: nil, quota_rule_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_quota_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for CreateQuotaRuleRequest

    • quota_rule (::Google::Cloud::NetApp::V1::QuotaRule, ::Hash) (defaults to: nil)

      Required. Fields of the to be created quota rule.

    • quota_rule_id (::String) (defaults to: nil)

      Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6050

def create_quota_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateQuotaRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_quota_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_quota_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_quota_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_quota_rule, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_replication(request, options = nil) ⇒ ::Gapic::Operation #create_replication(parent: nil, replication: nil, replication_id: nil) ⇒ ::Gapic::Operation

Create a new replication for a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateReplicationRequest.new

# Call the create_replication method.
result = client.create_replication request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_replication(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_replication via a request object, either of type CreateReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_replication(parent: nil, replication: nil, replication_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The NetApp volume to create the replications of, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}

    • replication (::Google::Cloud::NetApp::V1::Replication, ::Hash) (defaults to: nil)

      Required. A replication resource

    • replication_id (::String) (defaults to: nil)

      Required. ID of the replication to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3607

def create_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_replication, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_snapshot(request, options = nil) ⇒ ::Gapic::Operation #create_snapshot(parent: nil, snapshot: nil, snapshot_id: nil) ⇒ ::Gapic::Operation

Create a new snapshot for a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateSnapshotRequest.new

# Call the create_snapshot method.
result = client.create_snapshot request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_snapshot(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_snapshot via a request object, either of type CreateSnapshotRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateSnapshotRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_snapshot(parent: nil, snapshot: nil, snapshot_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The NetApp volume to create the snapshots of, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}

    • snapshot (::Google::Cloud::NetApp::V1::Snapshot, ::Hash) (defaults to: nil)

      Required. A snapshot resource

    • snapshot_id (::String) (defaults to: nil)

      Required. ID of the snapshot to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1984

def create_snapshot request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateSnapshotRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_snapshot..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_snapshot.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_snapshot.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_storage_pool(request, options = nil) ⇒ ::Gapic::Operation #create_storage_pool(parent: nil, storage_pool_id: nil, storage_pool: nil) ⇒ ::Gapic::Operation

Creates a new storage pool.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateStoragePoolRequest.new

# Call the create_storage_pool method.
result = client.create_storage_pool request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_storage_pool(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_storage_pool via a request object, either of type CreateStoragePoolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateStoragePoolRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_storage_pool(parent: nil, storage_pool_id: nil, storage_pool: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_storage_pool via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • storage_pool_id (::String) (defaults to: nil)

      Required. Id of the requesting storage pool. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

    • storage_pool (::Google::Cloud::NetApp::V1::StoragePool, ::Hash) (defaults to: nil)

      Required. The required parameters to create a new storage pool.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 531

def create_storage_pool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateStoragePoolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_storage_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_storage_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_storage_pool.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_storage_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_volume(request, options = nil) ⇒ ::Gapic::Operation #create_volume(parent: nil, volume_id: nil, volume: nil) ⇒ ::Gapic::Operation

Creates a new Volume in a given project and location.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::CreateVolumeRequest.new

# Call the create_volume method.
result = client.create_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_volume(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_volume via a request object, either of type CreateVolumeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::CreateVolumeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_volume(parent: nil, volume_id: nil, volume: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • volume_id (::String) (defaults to: nil)

      Required. Id of the requesting volume. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

    • volume (::Google::Cloud::NetApp::V1::Volume, ::Hash) (defaults to: nil)

      Required. The volume being created.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1288

def create_volume request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateVolumeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_volume..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_volume.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_volume.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :create_volume, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_active_directory(request, options = nil) ⇒ ::Gapic::Operation #delete_active_directory(name: nil) ⇒ ::Gapic::Operation

Delete the active directory specified in the request.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest.new

# Call the delete_active_directory method.
result = client.delete_active_directory request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_active_directory(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_active_directory via a request object, either of type DeleteActiveDirectoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_active_directory(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_active_directory via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the active directory.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2657

def delete_active_directory request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteActiveDirectoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_active_directory..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_active_directory.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_active_directory.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_active_directory, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_backup(request, options = nil) ⇒ ::Gapic::Operation #delete_backup(name: nil) ⇒ ::Gapic::Operation

Warning! This operation will permanently delete the backup.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteBackupRequest.new

# Call the delete_backup method.
result = client.delete_backup request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_backup(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backup via a request object, either of type DeleteBackupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteBackupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_backup(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backup via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The backup resource name, in the format projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5180

def delete_backup request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_backup..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_backup.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_backup.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_backup, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_backup_policy(request, options = nil) ⇒ ::Gapic::Operation #delete_backup_policy(name: nil) ⇒ ::Gapic::Operation

Warning! This operation will permanently delete the backup policy.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest.new

# Call the delete_backup_policy method.
result = client.delete_backup_policy request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_backup_policy(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backup_policy via a request object, either of type DeleteBackupPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_backup_policy(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backup_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The backup policy resource name, in the format projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5764

def delete_backup_policy request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_backup_policy..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_backup_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_backup_policy.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_backup_policy, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_backup_vault(request, options = nil) ⇒ ::Gapic::Operation #delete_backup_vault(name: nil) ⇒ ::Gapic::Operation

Warning! This operation will permanently delete the backup vault.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteBackupVaultRequest.new

# Call the delete_backup_vault method.
result = client.delete_backup_vault request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_backup_vault(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backup_vault via a request object, either of type DeleteBackupVaultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_backup_vault(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backup_vault via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The backupVault resource name, in the format projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4780

def delete_backup_vault request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_backup_vault..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_backup_vault.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_backup_vault.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_host_group(request, options = nil) ⇒ ::Gapic::Operation #delete_host_group(name: nil) ⇒ ::Gapic::Operation

Deletes a host group.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteHostGroupRequest.new

# Call the delete_host_group method.
result = client.delete_host_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_host_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_host_group via a request object, either of type DeleteHostGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteHostGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_host_group(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_host_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6832

def delete_host_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteHostGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_host_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_host_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_host_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_host_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_kms_config(request, options = nil) ⇒ ::Gapic::Operation #delete_kms_config(name: nil) ⇒ ::Gapic::Operation

Warning! This operation will permanently delete the Kms config.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteKmsConfigRequest.new

# Call the delete_kms_config method.
result = client.delete_kms_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_kms_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_kms_config via a request object, either of type DeleteKmsConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_kms_config(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_kms_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the KmsConfig.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3317

def delete_kms_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteKmsConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_kms_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_kms_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_kms_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_kms_config, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_quota_rule(request, options = nil) ⇒ ::Gapic::Operation #delete_quota_rule(name: nil) ⇒ ::Gapic::Operation

Deletes a quota rule.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest.new

# Call the delete_quota_rule method.
result = client.delete_quota_rule request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_quota_rule(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_quota_rule via a request object, either of type DeleteQuotaRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_quota_rule(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_quota_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the quota rule.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6244

def delete_quota_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteQuotaRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_quota_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_quota_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_quota_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_quota_rule, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_replication(request, options = nil) ⇒ ::Gapic::Operation #delete_replication(name: nil) ⇒ ::Gapic::Operation

Deletes a replication.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteReplicationRequest.new

# Call the delete_replication method.
result = client.delete_replication request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_replication(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_replication via a request object, either of type DeleteReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_replication(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The replication resource name, in the format projects/*/locations/*/volumes/*/replications/{replication_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3702

def delete_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_replication, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_snapshot(request, options = nil) ⇒ ::Gapic::Operation #delete_snapshot(name: nil) ⇒ ::Gapic::Operation

Deletes a snapshot.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteSnapshotRequest.new

# Call the delete_snapshot method.
result = client.delete_snapshot request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_snapshot(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_snapshot via a request object, either of type DeleteSnapshotRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteSnapshotRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_snapshot(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The snapshot resource name, in the format projects/*/locations/*/volumes/*/snapshots/{snapshot_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2079

def delete_snapshot request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteSnapshotRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_snapshot..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_snapshot.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_snapshot.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_storage_pool(request, options = nil) ⇒ ::Gapic::Operation #delete_storage_pool(name: nil) ⇒ ::Gapic::Operation

Warning! This operation will permanently delete the storage pool.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteStoragePoolRequest.new

# Call the delete_storage_pool method.
result = client.delete_storage_pool request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_storage_pool(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_storage_pool via a request object, either of type DeleteStoragePoolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_storage_pool(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_storage_pool via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the storage pool

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 810

def delete_storage_pool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteStoragePoolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_storage_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_storage_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_storage_pool.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_storage_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_volume(request, options = nil) ⇒ ::Gapic::Operation #delete_volume(name: nil, force: nil) ⇒ ::Gapic::Operation

Deletes a single Volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::DeleteVolumeRequest.new

# Call the delete_volume method.
result = client.delete_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_volume(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_volume via a request object, either of type DeleteVolumeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::DeleteVolumeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_volume(name: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the volume

    • force (::Boolean) (defaults to: nil)

      If this field is set as true, CCFE will not block the volume resource deletion even if it has any snapshots resource. (Otherwise, the request will only work if the volume has no snapshots.)

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1486

def delete_volume request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteVolumeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_volume..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_volume.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_volume.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :delete_volume, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#encrypt_volumes(request, options = nil) ⇒ ::Gapic::Operation #encrypt_volumes(name: nil) ⇒ ::Gapic::Operation

Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::EncryptVolumesRequest.new

# Call the encrypt_volumes method.
result = client.encrypt_volumes request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #encrypt_volumes(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to encrypt_volumes via a request object, either of type EncryptVolumesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::EncryptVolumesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #encrypt_volumes(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to encrypt_volumes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the KmsConfig.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3138

def encrypt_volumes request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EncryptVolumesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.encrypt_volumes..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.encrypt_volumes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.encrypt_volumes.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :encrypt_volumes, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#establish_peering(request, options = nil) ⇒ ::Gapic::Operation #establish_peering(name: nil, peer_cluster_name: nil, peer_svm_name: nil, peer_ip_addresses: nil, peer_volume_name: nil) ⇒ ::Gapic::Operation

Establish replication peering.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::EstablishPeeringRequest.new

# Call the establish_peering method.
result = client.establish_peering request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #establish_peering(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to establish_peering via a request object, either of type EstablishPeeringRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::EstablishPeeringRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #establish_peering(name: nil, peer_cluster_name: nil, peer_svm_name: nil, peer_ip_addresses: nil, peer_volume_name: nil) ⇒ ::Gapic::Operation

    Pass arguments to establish_peering via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.

    • peer_cluster_name (::String) (defaults to: nil)

      Required. Name of the user's local source cluster to be peered with the destination cluster.

    • peer_svm_name (::String) (defaults to: nil)

      Required. Name of the user's local source vserver svm to be peered with the destination vserver svm.

    • peer_ip_addresses (::Array<::String>) (defaults to: nil)

      Optional. List of IPv4 ip addresses to be used for peering.

    • peer_volume_name (::String) (defaults to: nil)

      Required. Name of the user's local source volume to be peered with the destination volume.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4198

def establish_peering request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EstablishPeeringRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.establish_peering..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.establish_peering.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.establish_peering.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :establish_peering, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#establish_volume_peering(request, options = nil) ⇒ ::Gapic::Operation #establish_volume_peering(name: nil, peer_cluster_name: nil, peer_svm_name: nil, peer_ip_addresses: nil, peer_volume_name: nil) ⇒ ::Gapic::Operation

Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::EstablishVolumePeeringRequest.new

# Call the establish_volume_peering method.
result = client.establish_volume_peering request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #establish_volume_peering(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to establish_volume_peering via a request object, either of type EstablishVolumePeeringRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::EstablishVolumePeeringRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #establish_volume_peering(name: nil, peer_cluster_name: nil, peer_svm_name: nil, peer_ip_addresses: nil, peer_volume_name: nil) ⇒ ::Gapic::Operation

    Pass arguments to establish_volume_peering via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The volume resource name, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}

    • peer_cluster_name (::String) (defaults to: nil)

      Required. Name of the user's local source cluster to be peered with the destination cluster.

    • peer_svm_name (::String) (defaults to: nil)

      Required. Name of the user's local source vserver svm to be peered with the destination vserver svm.

    • peer_ip_addresses (::Array<::String>) (defaults to: nil)

      Optional. List of IPv4 ip addresses to be used for peering.

    • peer_volume_name (::String) (defaults to: nil)

      Required. Name of the user's local source volume to be peered with the destination volume.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1694

def establish_volume_peering request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EstablishVolumePeeringRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.establish_volume_peering..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.establish_volume_peering.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.establish_volume_peering.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :establish_volume_peering, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#execute_ontap_delete(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapDeleteResponse #execute_ontap_delete(ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapDeleteResponse

ExecuteOntapDelete dispatches the ONTAP DELETE request to the StoragePool cluster.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ExecuteOntapDeleteRequest.new

# Call the execute_ontap_delete method.
result = client.execute_ontap_delete request

# The returned object is of type Google::Cloud::NetApp::V1::ExecuteOntapDeleteResponse.
p result

Overloads:

  • #execute_ontap_delete(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapDeleteResponse

    Pass arguments to execute_ontap_delete via a request object, either of type ExecuteOntapDeleteRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ExecuteOntapDeleteRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #execute_ontap_delete(ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapDeleteResponse

    Pass arguments to execute_ontap_delete via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • ontap_path (::String) (defaults to: nil)

      Required. The resource path of the ONTAP resource. Format: projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}. For example: projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 7116

def execute_ontap_delete request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ExecuteOntapDeleteRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.execute_ontap_delete..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.ontap_path
    header_params["ontap_path"] = request.ontap_path
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.execute_ontap_delete.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.execute_ontap_delete.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :execute_ontap_delete, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#execute_ontap_get(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapGetResponse #execute_ontap_get(ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapGetResponse

ExecuteOntapGet dispatches the ONTAP GET request to the StoragePool cluster.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ExecuteOntapGetRequest.new

# Call the execute_ontap_get method.
result = client.execute_ontap_get request

# The returned object is of type Google::Cloud::NetApp::V1::ExecuteOntapGetResponse.
p result

Overloads:

  • #execute_ontap_get(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapGetResponse

    Pass arguments to execute_ontap_get via a request object, either of type ExecuteOntapGetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ExecuteOntapGetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #execute_ontap_get(ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapGetResponse

    Pass arguments to execute_ontap_get via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • ontap_path (::String) (defaults to: nil)

      Required. The resource path of the ONTAP resource. Format: projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}. For example: projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 7026

def execute_ontap_get request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ExecuteOntapGetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.execute_ontap_get..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.ontap_path
    header_params["ontap_path"] = request.ontap_path
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.execute_ontap_get.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.execute_ontap_get.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :execute_ontap_get, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#execute_ontap_patch(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPatchResponse #execute_ontap_patch(body: nil, ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPatchResponse

ExecuteOntapPatch dispatches the ONTAP PATCH request to the StoragePool cluster.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ExecuteOntapPatchRequest.new

# Call the execute_ontap_patch method.
result = client.execute_ontap_patch request

# The returned object is of type Google::Cloud::NetApp::V1::ExecuteOntapPatchResponse.
p result

Overloads:

  • #execute_ontap_patch(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPatchResponse

    Pass arguments to execute_ontap_patch via a request object, either of type ExecuteOntapPatchRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ExecuteOntapPatchRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #execute_ontap_patch(body: nil, ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPatchResponse

    Pass arguments to execute_ontap_patch via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • body (::Google::Protobuf::Struct, ::Hash) (defaults to: nil)

      Required. The raw JSON body of the request. The body should be in the format of the ONTAP resource. For example:

      {
        "body": {
          "field1": "value1",
          "field2": "value2",
        }
      }
      
    • ontap_path (::String) (defaults to: nil)

      Required. The resource path of the ONTAP resource. Format: projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}. For example: projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 7218

def execute_ontap_patch request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ExecuteOntapPatchRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.execute_ontap_patch..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.ontap_path
    header_params["ontap_path"] = request.ontap_path
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.execute_ontap_patch.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.execute_ontap_patch.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :execute_ontap_patch, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#execute_ontap_post(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPostResponse #execute_ontap_post(body: nil, ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPostResponse

ExecuteOntapPost dispatches the ONTAP POST request to the StoragePool cluster.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ExecuteOntapPostRequest.new

# Call the execute_ontap_post method.
result = client.execute_ontap_post request

# The returned object is of type Google::Cloud::NetApp::V1::ExecuteOntapPostResponse.
p result

Overloads:

  • #execute_ontap_post(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPostResponse

    Pass arguments to execute_ontap_post via a request object, either of type ExecuteOntapPostRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ExecuteOntapPostRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #execute_ontap_post(body: nil, ontap_path: nil) ⇒ ::Google::Cloud::NetApp::V1::ExecuteOntapPostResponse

    Pass arguments to execute_ontap_post via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • body (::Google::Protobuf::Struct, ::Hash) (defaults to: nil)

      Required. The raw JSON body of the request. The body should be in the format of the ONTAP resource. For example:

      {
        "body": {
          "field1": "value1",
          "field2": "value2",
        }
      }
      
    • ontap_path (::String) (defaults to: nil)

      Required. The resource path of the ONTAP resource. Format: projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}. For example: projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6936

def execute_ontap_post request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ExecuteOntapPostRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.execute_ontap_post..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.ontap_path
    header_params["ontap_path"] = request.ontap_path
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.execute_ontap_post.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.execute_ontap_post.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :execute_ontap_post, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_active_directory(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ActiveDirectory #get_active_directory(name: nil) ⇒ ::Google::Cloud::NetApp::V1::ActiveDirectory

Describes a specified active directory.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetActiveDirectoryRequest.new

# Call the get_active_directory method.
result = client.get_active_directory request

# The returned object is of type Google::Cloud::NetApp::V1::ActiveDirectory.
p result

Overloads:

  • #get_active_directory(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::ActiveDirectory

    Pass arguments to get_active_directory via a request object, either of type GetActiveDirectoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_active_directory(name: nil) ⇒ ::Google::Cloud::NetApp::V1::ActiveDirectory

    Pass arguments to get_active_directory via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the active directory.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2363

def get_active_directory request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetActiveDirectoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_active_directory..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_active_directory.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_active_directory.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_active_directory, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_backup(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Backup #get_backup(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Backup

Returns the description of the specified backup

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetBackupRequest.new

# Call the get_backup method.
result = client.get_backup request

# The returned object is of type Google::Cloud::NetApp::V1::Backup.
p result

Overloads:

  • #get_backup(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Backup

    Pass arguments to get_backup via a request object, either of type GetBackupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetBackupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_backup(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Backup

    Pass arguments to get_backup via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The backup resource name, in the format projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4974

def get_backup request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_backup..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_backup.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_backup.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_backup, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_backup_policy(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::BackupPolicy #get_backup_policy(name: nil) ⇒ ::Google::Cloud::NetApp::V1::BackupPolicy

Returns the description of the specified backup policy by backup_policy_id.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetBackupPolicyRequest.new

# Call the get_backup_policy method.
result = client.get_backup_policy request

# The returned object is of type Google::Cloud::NetApp::V1::BackupPolicy.
p result

Overloads:

  • #get_backup_policy(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::BackupPolicy

    Pass arguments to get_backup_policy via a request object, either of type GetBackupPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetBackupPolicyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_backup_policy(name: nil) ⇒ ::Google::Cloud::NetApp::V1::BackupPolicy

    Pass arguments to get_backup_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The backupPolicy resource name, in the format projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5471

def get_backup_policy request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupPolicyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_backup_policy..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_backup_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_backup_policy.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_backup_policy, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_backup_vault(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::BackupVault #get_backup_vault(name: nil) ⇒ ::Google::Cloud::NetApp::V1::BackupVault

Returns the description of the specified backup vault

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetBackupVaultRequest.new

# Call the get_backup_vault method.
result = client.get_backup_vault request

# The returned object is of type Google::Cloud::NetApp::V1::BackupVault.
p result

Overloads:

  • #get_backup_vault(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::BackupVault

    Pass arguments to get_backup_vault via a request object, either of type GetBackupVaultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetBackupVaultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_backup_vault(name: nil) ⇒ ::Google::Cloud::NetApp::V1::BackupVault

    Pass arguments to get_backup_vault via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The backupVault resource name, in the format projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4485

def get_backup_vault request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupVaultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_backup_vault..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_backup_vault.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_backup_vault.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_backup_vault, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_host_group(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::HostGroup #get_host_group(name: nil) ⇒ ::Google::Cloud::NetApp::V1::HostGroup

Returns details of the specified host group.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetHostGroupRequest.new

# Call the get_host_group method.
result = client.get_host_group request

# The returned object is of type Google::Cloud::NetApp::V1::HostGroup.
p result

Overloads:

  • #get_host_group(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::HostGroup

    Pass arguments to get_host_group via a request object, either of type GetHostGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetHostGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_host_group(name: nil) ⇒ ::Google::Cloud::NetApp::V1::HostGroup

    Pass arguments to get_host_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6538

def get_host_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetHostGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_host_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_host_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_host_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_host_group, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_kms_config(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::KmsConfig #get_kms_config(name: nil) ⇒ ::Google::Cloud::NetApp::V1::KmsConfig

Returns the description of the specified KMS config by kms_config_id.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetKmsConfigRequest.new

# Call the get_kms_config method.
result = client.get_kms_config request

# The returned object is of type Google::Cloud::NetApp::V1::KmsConfig.
p result

Overloads:

  • #get_kms_config(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::KmsConfig

    Pass arguments to get_kms_config via a request object, either of type GetKmsConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetKmsConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_kms_config(name: nil) ⇒ ::Google::Cloud::NetApp::V1::KmsConfig

    Pass arguments to get_kms_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the KmsConfig

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2945

def get_kms_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetKmsConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_kms_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_kms_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_kms_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_kms_config, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_quota_rule(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::QuotaRule #get_quota_rule(name: nil) ⇒ ::Google::Cloud::NetApp::V1::QuotaRule

Returns details of the specified quota rule.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetQuotaRuleRequest.new

# Call the get_quota_rule method.
result = client.get_quota_rule request

# The returned object is of type Google::Cloud::NetApp::V1::QuotaRule.
p result

Overloads:

  • #get_quota_rule(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::QuotaRule

    Pass arguments to get_quota_rule via a request object, either of type GetQuotaRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetQuotaRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_quota_rule(name: nil) ⇒ ::Google::Cloud::NetApp::V1::QuotaRule

    Pass arguments to get_quota_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the quota rule

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5951

def get_quota_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetQuotaRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_quota_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_quota_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_quota_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_quota_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_replication(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Replication #get_replication(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Replication

Describe a replication for a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetReplicationRequest.new

# Call the get_replication method.
result = client.get_replication request

# The returned object is of type Google::Cloud::NetApp::V1::Replication.
p result

Overloads:

  • #get_replication(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Replication

    Pass arguments to get_replication via a request object, either of type GetReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_replication(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Replication

    Pass arguments to get_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The replication resource name, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3507

def get_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_replication, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_snapshot(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Snapshot #get_snapshot(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Snapshot

Describe a snapshot for a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetSnapshotRequest.new

# Call the get_snapshot method.
result = client.get_snapshot request

# The returned object is of type Google::Cloud::NetApp::V1::Snapshot.
p result

Overloads:

  • #get_snapshot(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Snapshot

    Pass arguments to get_snapshot via a request object, either of type GetSnapshotRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetSnapshotRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_snapshot(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Snapshot

    Pass arguments to get_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The snapshot resource name, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1884

def get_snapshot request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetSnapshotRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_snapshot..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_snapshot.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_snapshot.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_storage_pool(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::StoragePool #get_storage_pool(name: nil) ⇒ ::Google::Cloud::NetApp::V1::StoragePool

Returns the description of the specified storage pool by poolId.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetStoragePoolRequest.new

# Call the get_storage_pool method.
result = client.get_storage_pool request

# The returned object is of type Google::Cloud::NetApp::V1::StoragePool.
p result

Overloads:

  • #get_storage_pool(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::StoragePool

    Pass arguments to get_storage_pool via a request object, either of type GetStoragePoolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetStoragePoolRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_storage_pool(name: nil) ⇒ ::Google::Cloud::NetApp::V1::StoragePool

    Pass arguments to get_storage_pool via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the storage pool

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 618

def get_storage_pool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetStoragePoolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_storage_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_storage_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_storage_pool.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_storage_pool, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_volume(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Volume #get_volume(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Volume

Gets details of a single Volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::GetVolumeRequest.new

# Call the get_volume method.
result = client.get_volume request

# The returned object is of type Google::Cloud::NetApp::V1::Volume.
p result

Overloads:

  • #get_volume(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::Volume

    Pass arguments to get_volume via a request object, either of type GetVolumeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::GetVolumeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_volume(name: nil) ⇒ ::Google::Cloud::NetApp::V1::Volume

    Pass arguments to get_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the volume

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1189

def get_volume request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetVolumeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_volume..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_volume.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_volume.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :get_volume, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_active_directories(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory> #list_active_directories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>

Lists active directories.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest.new

# Call the list_active_directories method.
result = client.list_active_directories request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::ActiveDirectory.
  p item
end

Overloads:

  • #list_active_directories(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>

    Pass arguments to list_active_directories via a request object, either of type ListActiveDirectoriesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_active_directories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::ActiveDirectory>

    Pass arguments to list_active_directories via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListActiveDirectoriesRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2276

def list_active_directories request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListActiveDirectoriesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_active_directories..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_active_directories.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_active_directories.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_active_directories, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_active_directories, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_backup_policies(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy> #list_backup_policies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>

Returns list of all available backup policies.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListBackupPoliciesRequest.new

# Call the list_backup_policies method.
result = client.list_backup_policies request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::BackupPolicy.
  p item
end

Overloads:

  • #list_backup_policies(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>

    Pass arguments to list_backup_policies via a request object, either of type ListBackupPoliciesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_backup_policies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>

    Pass arguments to list_backup_policies via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListBackupPoliciesRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5569

def list_backup_policies request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_backup_policies..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_backup_policies.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_backup_policies.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_backup_policies, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_policies, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_backup_vaults(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault> #list_backup_vaults(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>

Returns list of all available backup vaults.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListBackupVaultsRequest.new

# Call the list_backup_vaults method.
result = client.list_backup_vaults request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::BackupVault.
  p item
end

Overloads:

  • #list_backup_vaults(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>

    Pass arguments to list_backup_vaults via a request object, either of type ListBackupVaultsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListBackupVaultsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_backup_vaults(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>

    Pass arguments to list_backup_vaults via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The location for which to retrieve backupVault information, in the format projects/{project_id}/locations/{location}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return.

    • page_token (::String) (defaults to: nil)

      The next_page_token value to use if there are additional results to retrieve for this list request.

    • order_by (::String) (defaults to: nil)

      Sort results. Supported values are "name", "name desc" or "" (unsorted).

    • filter (::String) (defaults to: nil)

      List filter.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4585

def list_backup_vaults request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupVaultsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_backup_vaults..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_backup_vaults.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_backup_vaults.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_vaults, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_backups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup> #list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>

Returns descriptions of all backups for a backupVault.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListBackupsRequest.new

# Call the list_backups method.
result = client.list_backups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::Backup.
  p item
end

Overloads:

  • #list_backups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>

    Pass arguments to list_backups via a request object, either of type ListBackupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListBackupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>

    Pass arguments to list_backups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The backupVault for which to retrieve backup information, in the format projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}. To retrieve backup information for all locations, use "-" for the {location} value. To retrieve backup information for all backupVaults, use "-" for the {backup_vault_id} value. To retrieve backup information for a volume, use "-" for the {backup_vault_id} value and specify volume full name with the filter.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      The next_page_token value to use if there are additional results to retrieve for this list request.

    • order_by (::String) (defaults to: nil)

      Sort results. Supported values are "name", "name desc" or "" (unsorted).

    • filter (::String) (defaults to: nil)

      The standard list filter. If specified, backups will be returned based on the attribute name that matches the filter expression. If empty, then no backups are filtered out. See https://google.aip.dev/160

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5085

def list_backups request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_backups..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_backups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_backups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_backups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backups, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_host_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup> #list_host_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>

Returns a list of host groups in a location. Use - as location to list host groups across all locations.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListHostGroupsRequest.new

# Call the list_host_groups method.
result = client.list_host_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::HostGroup.
  p item
end

Overloads:

  • #list_host_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>

    Pass arguments to list_host_groups via a request object, either of type ListHostGroupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListHostGroupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_host_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>

    Pass arguments to list_host_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListHostGroupsRequest

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Optional. Filter to apply to the request.

    • order_by (::String) (defaults to: nil)

      Optional. Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6449

def list_host_groups request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListHostGroupsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_host_groups..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_host_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_host_groups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_host_groups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_host_groups, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_kms_configs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig> #list_kms_configs(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>

Returns descriptions of all KMS configs owned by the caller.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListKmsConfigsRequest.new

# Call the list_kms_configs method.
result = client.list_kms_configs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::KmsConfig.
  p item
end

Overloads:

  • #list_kms_configs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>

    Pass arguments to list_kms_configs via a request object, either of type ListKmsConfigsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListKmsConfigsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_kms_configs(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::KmsConfig>

    Pass arguments to list_kms_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return.

    • page_token (::String) (defaults to: nil)

      The next_page_token value to use if there are additional results to retrieve for this list request.

    • order_by (::String) (defaults to: nil)

      Sort results. Supported values are "name", "name desc" or "" (unsorted).

    • filter (::String) (defaults to: nil)

      List filter.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2757

def list_kms_configs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListKmsConfigsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_kms_configs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_kms_configs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_kms_configs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_kms_configs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_kms_configs, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_quota_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::QuotaRule> #list_quota_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::QuotaRule>

Returns list of all quota rules in a location.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListQuotaRulesRequest.new

# Call the list_quota_rules method.
result = client.list_quota_rules request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::QuotaRule.
  p item
end

Overloads:

  • #list_quota_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::QuotaRule>

    Pass arguments to list_quota_rules via a request object, either of type ListQuotaRulesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListQuotaRulesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_quota_rules(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::QuotaRule>

    Pass arguments to list_quota_rules via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListQuotaRulesRequest

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Optional. Filtering results

    • order_by (::String) (defaults to: nil)

      Optional. Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5864

def list_quota_rules request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListQuotaRulesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_quota_rules..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_quota_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_quota_rules.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_quota_rules, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_quota_rules, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_replications(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication> #list_replications(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>

Returns descriptions of all replications for a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListReplicationsRequest.new

# Call the list_replications method.
result = client.list_replications request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::Replication.
  p item
end

Overloads:

  • #list_replications(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>

    Pass arguments to list_replications via a request object, either of type ListReplicationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListReplicationsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_replications(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Replication>

    Pass arguments to list_replications via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The volume for which to retrieve replication information, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return.

    • page_token (::String) (defaults to: nil)

      The next_page_token value to use if there are additional results to retrieve for this list request.

    • order_by (::String) (defaults to: nil)

      Sort results. Supported values are "name", "name desc" or "" (unsorted).

    • filter (::String) (defaults to: nil)

      List filter.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3419

def list_replications request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListReplicationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_replications..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_replications.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_replications.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_replications, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_replications, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_snapshots(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot> #list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>

Returns descriptions of all snapshots for a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListSnapshotsRequest.new

# Call the list_snapshots method.
result = client.list_snapshots request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::Snapshot.
  p item
end

Overloads:

  • #list_snapshots(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>

    Pass arguments to list_snapshots via a request object, either of type ListSnapshotsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListSnapshotsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Snapshot>

    Pass arguments to list_snapshots via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The volume for which to retrieve snapshot information, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return.

    • page_token (::String) (defaults to: nil)

      The next_page_token value to use if there are additional results to retrieve for this list request.

    • order_by (::String) (defaults to: nil)

      Sort results. Supported values are "name", "name desc" or "" (unsorted).

    • filter (::String) (defaults to: nil)

      List filter.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1796

def list_snapshots request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListSnapshotsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_snapshots..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_snapshots.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_snapshots.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_snapshots, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_storage_pools(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool> #list_storage_pools(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>

Returns descriptions of all storage pools owned by the caller.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListStoragePoolsRequest.new

# Call the list_storage_pools method.
result = client.list_storage_pools request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::StoragePool.
  p item
end

Overloads:

  • #list_storage_pools(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>

    Pass arguments to list_storage_pools via a request object, either of type ListStoragePoolsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListStoragePoolsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_storage_pools(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::StoragePool>

    Pass arguments to list_storage_pools via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of items to return.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value to use if there are additional results to retrieve for this list request.

    • order_by (::String) (defaults to: nil)

      Optional. Sort results. Supported values are "name", "name desc" or "" (unsorted).

    • filter (::String) (defaults to: nil)

      Optional. List filter.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 430

def list_storage_pools request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListStoragePoolsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_storage_pools..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_storage_pools.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_storage_pools.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_storage_pools, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_storage_pools, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_volumes(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume> #list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>

Lists Volumes in a given project.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ListVolumesRequest.new

# Call the list_volumes method.
result = client.list_volumes request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::NetApp::V1::Volume.
  p item
end

Overloads:

  • #list_volumes(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>

    Pass arguments to list_volumes via a request object, either of type ListVolumesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ListVolumesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Volume>

    Pass arguments to list_volumes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListVolumesRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1102

def list_volumes request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListVolumesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_volumes..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_volumes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_volumes.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :list_volumes, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_volumes, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


366
367
368
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 366

def logger
  @net_app_stub.logger
end

#restore_backup_files(request, options = nil) ⇒ ::Gapic::Operation #restore_backup_files(name: nil, backup: nil, file_list: nil, restore_destination_path: nil) ⇒ ::Gapic::Operation

Restore files from a backup to a volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::RestoreBackupFilesRequest.new

# Call the restore_backup_files method.
result = client.restore_backup_files request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #restore_backup_files(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to restore_backup_files via a request object, either of type RestoreBackupFilesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #restore_backup_files(name: nil, backup: nil, file_list: nil, restore_destination_path: nil) ⇒ ::Gapic::Operation

    Pass arguments to restore_backup_files via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The volume resource name, in the format projects/{project_id}/locations/{location}/volumes/{volume_id}

    • backup (::String) (defaults to: nil)

      Required. The backup resource name, in the format projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}

    • file_list (::Array<::String>) (defaults to: nil)

      Required. List of files to be restored, specified by their absolute path in the source volume.

    • restore_destination_path (::String) (defaults to: nil)

      Optional. Absolute directory path in the destination volume. This is required if the file_list is provided.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6348

def restore_backup_files request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.restore_backup_files..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.restore_backup_files.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.restore_backup_files.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :restore_backup_files, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#resume_replication(request, options = nil) ⇒ ::Gapic::Operation #resume_replication(name: nil) ⇒ ::Gapic::Operation

Resume Cross Region Replication.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ResumeReplicationRequest.new

# Call the resume_replication method.
result = client.resume_replication request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #resume_replication(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to resume_replication via a request object, either of type ResumeReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ResumeReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #resume_replication(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to resume_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3996

def resume_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ResumeReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.resume_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.resume_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.resume_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :resume_replication, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#reverse_replication_direction(request, options = nil) ⇒ ::Gapic::Operation #reverse_replication_direction(name: nil) ⇒ ::Gapic::Operation

Reverses direction of replication. Source becomes destination and destination becomes source.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest.new

# Call the reverse_replication_direction method.
result = client.reverse_replication_direction request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #reverse_replication_direction(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to reverse_replication_direction via a request object, either of type ReverseReplicationDirectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #reverse_replication_direction(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to reverse_replication_direction via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4092

def reverse_replication_direction request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ReverseReplicationDirectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.reverse_replication_direction..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.reverse_replication_direction.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.reverse_replication_direction.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :reverse_replication_direction, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#revert_volume(request, options = nil) ⇒ ::Gapic::Operation #revert_volume(name: nil, snapshot_id: nil) ⇒ ::Gapic::Operation

Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::RevertVolumeRequest.new

# Call the revert_volume method.
result = client.revert_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #revert_volume(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to revert_volume via a request object, either of type RevertVolumeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::RevertVolumeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #revert_volume(name: nil, snapshot_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to revert_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the volume, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}.

    • snapshot_id (::String) (defaults to: nil)

      Required. The snapshot resource ID, in the format 'my-snapshot', where the specified ID is the {snapshot_id} of the fully qualified name like projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1587

def revert_volume request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RevertVolumeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.revert_volume..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.revert_volume.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.revert_volume.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :revert_volume, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#stop_replication(request, options = nil) ⇒ ::Gapic::Operation #stop_replication(name: nil, force: nil) ⇒ ::Gapic::Operation

Stop Cross Region Replication.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::StopReplicationRequest.new

# Call the stop_replication method.
result = client.stop_replication request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #stop_replication(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to stop_replication via a request object, either of type StopReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::StopReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #stop_replication(name: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to stop_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.

    • force (::Boolean) (defaults to: nil)

      Indicates whether to stop replication forcefully while data transfer is in progress. Warning! if force is true, this will abort any current transfers and can lead to data loss due to partial transfer. If force is false, stop replication will fail while data transfer is in progress and you will need to retry later.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3901

def stop_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::StopReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.stop_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.stop_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.stop_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :stop_replication, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#switch_active_replica_zone(request, options = nil) ⇒ ::Gapic::Operation #switch_active_replica_zone(name: nil) ⇒ ::Gapic::Operation

This operation will switch the active/replica zone for a regional storagePool.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::SwitchActiveReplicaZoneRequest.new

# Call the switch_active_replica_zone method.
result = client.switch_active_replica_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #switch_active_replica_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to switch_active_replica_zone via a request object, either of type SwitchActiveReplicaZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::SwitchActiveReplicaZoneRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #switch_active_replica_zone(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to switch_active_replica_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the storage pool

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1002

def switch_active_replica_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::SwitchActiveReplicaZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.switch_active_replica_zone..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.switch_active_replica_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.switch_active_replica_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :switch_active_replica_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#sync_replication(request, options = nil) ⇒ ::Gapic::Operation #sync_replication(name: nil) ⇒ ::Gapic::Operation

Syncs the replication. This will invoke one time volume data transfer from source to destination.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::SyncReplicationRequest.new

# Call the sync_replication method.
result = client.sync_replication request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #sync_replication(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to sync_replication via a request object, either of type SyncReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::SyncReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #sync_replication(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to sync_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4294

def sync_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::SyncReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.sync_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.sync_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.sync_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :sync_replication, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


261
262
263
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 261

def universe_domain
  @net_app_stub.universe_domain
end

#update_active_directory(request, options = nil) ⇒ ::Gapic::Operation #update_active_directory(update_mask: nil, active_directory: nil) ⇒ ::Gapic::Operation

Update the parameters of an active directories.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest.new

# Call the update_active_directory method.
result = client.update_active_directory request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_active_directory(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_active_directory via a request object, either of type UpdateActiveDirectoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_active_directory(update_mask: nil, active_directory: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_active_directory via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Active Directory resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • active_directory (::Google::Cloud::NetApp::V1::ActiveDirectory, ::Hash) (defaults to: nil)

      Required. The volume being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2563

def update_active_directory request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateActiveDirectoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_active_directory..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.active_directory&.name
    header_params["active_directory.name"] = request.active_directory.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_active_directory.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_active_directory.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_active_directory, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_backup(request, options = nil) ⇒ ::Gapic::Operation #update_backup(update_mask: nil, backup: nil) ⇒ ::Gapic::Operation

Update backup with full spec.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateBackupRequest.new

# Call the update_backup method.
result = client.update_backup request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_backup(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backup via a request object, either of type UpdateBackupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateBackupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_backup(update_mask: nil, backup: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backup via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • backup (::Google::Cloud::NetApp::V1::Backup, ::Hash) (defaults to: nil)

      Required. The backup being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5280

def update_backup request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_backup..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.backup&.name
    header_params["backup.name"] = request.backup.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_backup.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_backup.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_backup, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_backup_policy(request, options = nil) ⇒ ::Gapic::Operation #update_backup_policy(update_mask: nil, backup_policy: nil) ⇒ ::Gapic::Operation

Updates settings of a specific backup policy.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest.new

# Call the update_backup_policy method.
result = client.update_backup_policy request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_backup_policy(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backup_policy via a request object, either of type UpdateBackupPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_backup_policy(update_mask: nil, backup_policy: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backup_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Backup Policy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • backup_policy (::Google::Cloud::NetApp::V1::BackupPolicy, ::Hash) (defaults to: nil)

      Required. The backup policy being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 5669

def update_backup_policy request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_backup_policy..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.backup_policy&.name
    header_params["backup_policy.name"] = request.backup_policy.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_backup_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_backup_policy.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_backup_policy, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_backup_vault(request, options = nil) ⇒ ::Gapic::Operation #update_backup_vault(update_mask: nil, backup_vault: nil) ⇒ ::Gapic::Operation

Updates the settings of a specific backup vault.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateBackupVaultRequest.new

# Call the update_backup_vault method.
result = client.update_backup_vault request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_backup_vault(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backup_vault via a request object, either of type UpdateBackupVaultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_backup_vault(update_mask: nil, backup_vault: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backup_vault via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • backup_vault (::Google::Cloud::NetApp::V1::BackupVault, ::Hash) (defaults to: nil)

      Required. The backupVault being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 4685

def update_backup_vault request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_backup_vault..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.backup_vault&.name
    header_params["backup_vault.name"] = request.backup_vault.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_backup_vault.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_backup_vault.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_backup_vault, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_host_group(request, options = nil) ⇒ ::Gapic::Operation #update_host_group(host_group: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates an existing host group.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateHostGroupRequest.new

# Call the update_host_group method.
result = client.update_host_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_host_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_host_group via a request object, either of type UpdateHostGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateHostGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_host_group(host_group: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_host_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • host_group (::Google::Cloud::NetApp::V1::HostGroup, ::Hash) (defaults to: nil)

      Required. The host group to update. The host group's name field is used to identify the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. The list of fields to update.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6736

def update_host_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateHostGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_host_group..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.host_group&.name
    header_params["host_group.name"] = request.host_group.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_host_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_host_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_host_group, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_kms_config(request, options = nil) ⇒ ::Gapic::Operation #update_kms_config(update_mask: nil, kms_config: nil) ⇒ ::Gapic::Operation

Updates the Kms config properties with the full spec

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateKmsConfigRequest.new

# Call the update_kms_config method.
result = client.update_kms_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_kms_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_kms_config via a request object, either of type UpdateKmsConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_kms_config(update_mask: nil, kms_config: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_kms_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the KmsConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • kms_config (::Google::Cloud::NetApp::V1::KmsConfig, ::Hash) (defaults to: nil)

      Required. The KmsConfig being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3043

def update_kms_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateKmsConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_kms_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.kms_config&.name
    header_params["kms_config.name"] = request.kms_config.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_kms_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_kms_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_kms_config, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_quota_rule(request, options = nil) ⇒ ::Gapic::Operation #update_quota_rule(update_mask: nil, quota_rule: nil) ⇒ ::Gapic::Operation

Updates a quota rule.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest.new

# Call the update_quota_rule method.
result = client.update_quota_rule request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_quota_rule(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_quota_rule via a request object, either of type UpdateQuotaRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_quota_rule(update_mask: nil, quota_rule: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_quota_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the Quota Rule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • quota_rule (::Google::Cloud::NetApp::V1::QuotaRule, ::Hash) (defaults to: nil)

      Required. The quota rule being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 6150

def update_quota_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateQuotaRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_quota_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.quota_rule&.name
    header_params["quota_rule.name"] = request.quota_rule.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_quota_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_quota_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_quota_rule, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_replication(request, options = nil) ⇒ ::Gapic::Operation #update_replication(update_mask: nil, replication: nil) ⇒ ::Gapic::Operation

Updates the settings of a specific replication.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateReplicationRequest.new

# Call the update_replication method.
result = client.update_replication request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_replication(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_replication via a request object, either of type UpdateReplicationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateReplicationRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_replication(update_mask: nil, replication: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_replication via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3799

def update_replication request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateReplicationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_replication..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.replication&.name
    header_params["replication.name"] = request.replication.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_replication.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_replication.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_replication, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_snapshot(request, options = nil) ⇒ ::Gapic::Operation #update_snapshot(update_mask: nil, snapshot: nil) ⇒ ::Gapic::Operation

Updates the settings of a specific snapshot.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateSnapshotRequest.new

# Call the update_snapshot method.
result = client.update_snapshot request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_snapshot(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_snapshot via a request object, either of type UpdateSnapshotRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateSnapshotRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_snapshot(update_mask: nil, snapshot: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 2176

def update_snapshot request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateSnapshotRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_snapshot..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.snapshot&.name
    header_params["snapshot.name"] = request.snapshot.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_snapshot.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_snapshot.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_storage_pool(request, options = nil) ⇒ ::Gapic::Operation #update_storage_pool(update_mask: nil, storage_pool: nil) ⇒ ::Gapic::Operation

Updates the storage pool properties with the full spec

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateStoragePoolRequest.new

# Call the update_storage_pool method.
result = client.update_storage_pool request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_storage_pool(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_storage_pool via a request object, either of type UpdateStoragePoolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_storage_pool(update_mask: nil, storage_pool: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_storage_pool via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the StoragePool resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • storage_pool (::Google::Cloud::NetApp::V1::StoragePool, ::Hash) (defaults to: nil)

      Required. The pool being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 716

def update_storage_pool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateStoragePoolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_storage_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.storage_pool&.name
    header_params["storage_pool.name"] = request.storage_pool.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_storage_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_storage_pool.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_storage_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_volume(request, options = nil) ⇒ ::Gapic::Operation #update_volume(update_mask: nil, volume: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Volume.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::UpdateVolumeRequest.new

# Call the update_volume method.
result = client.update_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_volume(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_volume via a request object, either of type UpdateVolumeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::UpdateVolumeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_volume(update_mask: nil, volume: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Volume resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • volume (::Google::Cloud::NetApp::V1::Volume, ::Hash) (defaults to: nil)

      Required. The volume being updated

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 1388

def update_volume request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateVolumeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_volume..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.volume&.name
    header_params["volume.name"] = request.volume.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_volume.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_volume.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :update_volume, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#validate_directory_service(request, options = nil) ⇒ ::Gapic::Operation #validate_directory_service(name: nil, directory_service_type: nil) ⇒ ::Gapic::Operation

ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::ValidateDirectoryServiceRequest.new

# Call the validate_directory_service method.
result = client.validate_directory_service request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #validate_directory_service(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to validate_directory_service via a request object, either of type ValidateDirectoryServiceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::ValidateDirectoryServiceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #validate_directory_service(name: nil, directory_service_type: nil) ⇒ ::Gapic::Operation

    Pass arguments to validate_directory_service via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 907

def validate_directory_service request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ValidateDirectoryServiceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.validate_directory_service..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.validate_directory_service.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.validate_directory_service.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :validate_directory_service, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#verify_kms_config(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse #verify_kms_config(name: nil) ⇒ ::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse

Verifies KMS config reachability.

Examples:

Basic example

require "google/cloud/netapp/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::NetApp::V1::NetApp::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::NetApp::V1::VerifyKmsConfigRequest.new

# Call the verify_kms_config method.
result = client.verify_kms_config request

# The returned object is of type Google::Cloud::NetApp::V1::VerifyKmsConfigResponse.
p result

Overloads:

  • #verify_kms_config(request, options = nil) ⇒ ::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse

    Pass arguments to verify_kms_config via a request object, either of type VerifyKmsConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #verify_kms_config(name: nil) ⇒ ::Google::Cloud::NetApp::V1::VerifyKmsConfigResponse

    Pass arguments to verify_kms_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the KMS Config to be verified.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
# File 'lib/google/cloud/netapp/v1/netapp/client.rb', line 3225

def verify_kms_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::VerifyKmsConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.verify_kms_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::NetApp::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.verify_kms_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.verify_kms_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @net_app_stub.call_rpc :verify_kms_config, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end