google-cloud-netapp-v1 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -99
- data/lib/google/cloud/netapp/v1/active_directory_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/backup_pb.rb +57 -0
- data/lib/google/cloud/netapp/v1/backup_policy_pb.rb +56 -0
- data/lib/google/cloud/netapp/v1/backup_vault_pb.rb +56 -0
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +4 -1
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +33 -0
- data/lib/google/cloud/netapp/v1/kms_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/netapp/client.rb +1758 -120
- data/lib/google/cloud/netapp/v1/netapp/operations.rb +28 -6
- data/lib/google/cloud/netapp/v1/netapp/paths.rb +59 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +1649 -116
- data/lib/google/cloud/netapp/v1/netapp/rest/operations.rb +33 -8
- data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +1054 -151
- data/lib/google/cloud/netapp/v1/replication_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/snapshot_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/version.rb +1 -1
- data/lib/google/cloud/netapp/v1/volume_pb.rb +2 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/netapp/v1/active_directory.rb +2 -2
- data/proto_docs/google/cloud/netapp/v1/backup.rb +231 -0
- data/proto_docs/google/cloud/netapp/v1/backup_policy.rb +190 -0
- data/proto_docs/google/cloud/netapp/v1/backup_vault.rb +177 -0
- data/proto_docs/google/cloud/netapp/v1/common.rb +3 -0
- data/proto_docs/google/cloud/netapp/v1/kms.rb +2 -2
- data/proto_docs/google/cloud/netapp/v1/replication.rb +2 -2
- data/proto_docs/google/cloud/netapp/v1/snapshot.rb +2 -2
- data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +5 -3
- data/proto_docs/google/cloud/netapp/v1/volume.rb +31 -2
- metadata +13 -7
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# NetApp Files Google Cloud Service
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "netapp.$UNIVERSE_DOMAIN$"
|
36
|
+
|
34
37
|
include Paths
|
35
38
|
|
36
39
|
# @private
|
@@ -173,6 +176,54 @@ module Google
|
|
173
176
|
|
174
177
|
default_config.rpcs.reverse_replication_direction.timeout = 60.0
|
175
178
|
|
179
|
+
default_config.rpcs.create_backup_vault.timeout = 60.0
|
180
|
+
|
181
|
+
default_config.rpcs.get_backup_vault.timeout = 60.0
|
182
|
+
default_config.rpcs.get_backup_vault.retry_policy = {
|
183
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
184
|
+
}
|
185
|
+
|
186
|
+
default_config.rpcs.list_backup_vaults.timeout = 60.0
|
187
|
+
default_config.rpcs.list_backup_vaults.retry_policy = {
|
188
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
189
|
+
}
|
190
|
+
|
191
|
+
default_config.rpcs.update_backup_vault.timeout = 60.0
|
192
|
+
|
193
|
+
default_config.rpcs.delete_backup_vault.timeout = 60.0
|
194
|
+
|
195
|
+
default_config.rpcs.create_backup.timeout = 60.0
|
196
|
+
|
197
|
+
default_config.rpcs.get_backup.timeout = 60.0
|
198
|
+
default_config.rpcs.get_backup.retry_policy = {
|
199
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
200
|
+
}
|
201
|
+
|
202
|
+
default_config.rpcs.list_backups.timeout = 60.0
|
203
|
+
default_config.rpcs.list_backups.retry_policy = {
|
204
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
205
|
+
}
|
206
|
+
|
207
|
+
default_config.rpcs.delete_backup.timeout = 60.0
|
208
|
+
|
209
|
+
default_config.rpcs.update_backup.timeout = 60.0
|
210
|
+
|
211
|
+
default_config.rpcs.create_backup_policy.timeout = 60.0
|
212
|
+
|
213
|
+
default_config.rpcs.get_backup_policy.timeout = 60.0
|
214
|
+
default_config.rpcs.get_backup_policy.retry_policy = {
|
215
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
216
|
+
}
|
217
|
+
|
218
|
+
default_config.rpcs.list_backup_policies.timeout = 60.0
|
219
|
+
default_config.rpcs.list_backup_policies.retry_policy = {
|
220
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
221
|
+
}
|
222
|
+
|
223
|
+
default_config.rpcs.update_backup_policy.timeout = 60.0
|
224
|
+
|
225
|
+
default_config.rpcs.delete_backup_policy.timeout = 60.0
|
226
|
+
|
176
227
|
default_config
|
177
228
|
end
|
178
229
|
yield @configure if block_given?
|
@@ -199,6 +250,15 @@ module Google
|
|
199
250
|
@config
|
200
251
|
end
|
201
252
|
|
253
|
+
##
|
254
|
+
# The effective universe domain
|
255
|
+
#
|
256
|
+
# @return [String]
|
257
|
+
#
|
258
|
+
def universe_domain
|
259
|
+
@net_app_stub.universe_domain
|
260
|
+
end
|
261
|
+
|
202
262
|
##
|
203
263
|
# Create a new NetApp client object.
|
204
264
|
#
|
@@ -232,8 +292,9 @@ module Google
|
|
232
292
|
credentials = @config.credentials
|
233
293
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
234
294
|
# but only if the default endpoint does not have a region prefix.
|
235
|
-
enable_self_signed_jwt = @config.endpoint
|
236
|
-
|
295
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
296
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
297
|
+
!@config.endpoint.split(".").first.include?("-"))
|
237
298
|
credentials ||= Credentials.default scope: @config.scope,
|
238
299
|
enable_self_signed_jwt: enable_self_signed_jwt
|
239
300
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -246,18 +307,22 @@ module Google
|
|
246
307
|
config.credentials = credentials
|
247
308
|
config.quota_project = @quota_project_id
|
248
309
|
config.endpoint = @config.endpoint
|
310
|
+
config.universe_domain = @config.universe_domain
|
249
311
|
end
|
250
312
|
|
251
313
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
252
314
|
config.credentials = credentials
|
253
315
|
config.quota_project = @quota_project_id
|
254
316
|
config.endpoint = @config.endpoint
|
317
|
+
config.universe_domain = @config.universe_domain
|
255
318
|
end
|
256
319
|
|
257
320
|
@net_app_stub = ::Gapic::ServiceStub.new(
|
258
321
|
::Google::Cloud::NetApp::V1::NetApp::Stub,
|
259
|
-
credentials:
|
260
|
-
endpoint:
|
322
|
+
credentials: credentials,
|
323
|
+
endpoint: @config.endpoint,
|
324
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
325
|
+
universe_domain: @config.universe_domain,
|
261
326
|
channel_args: @config.channel_args,
|
262
327
|
interceptors: @config.interceptors,
|
263
328
|
channel_pool_config: @config.channel_pool
|
@@ -3707,139 +3772,1607 @@ module Google
|
|
3707
3772
|
end
|
3708
3773
|
|
3709
3774
|
##
|
3710
|
-
#
|
3775
|
+
# Creates new backup vault
|
3711
3776
|
#
|
3712
|
-
#
|
3713
|
-
#
|
3714
|
-
#
|
3715
|
-
# applied individually to specific RPCs. See
|
3716
|
-
# {::Google::Cloud::NetApp::V1::NetApp::Client::Configuration::Rpcs}
|
3717
|
-
# for a list of RPCs that can be configured independently.
|
3777
|
+
# @overload create_backup_vault(request, options = nil)
|
3778
|
+
# Pass arguments to `create_backup_vault` via a request object, either of type
|
3779
|
+
# {::Google::Cloud::NetApp::V1::CreateBackupVaultRequest} or an equivalent Hash.
|
3718
3780
|
#
|
3719
|
-
#
|
3720
|
-
#
|
3781
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateBackupVaultRequest, ::Hash]
|
3782
|
+
# A request object representing the call parameters. Required. To specify no
|
3783
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3784
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3785
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3721
3786
|
#
|
3722
|
-
# @
|
3787
|
+
# @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil)
|
3788
|
+
# Pass arguments to `create_backup_vault` via keyword arguments. Note that at
|
3789
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3790
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3723
3791
|
#
|
3724
|
-
#
|
3725
|
-
#
|
3726
|
-
#
|
3727
|
-
#
|
3728
|
-
#
|
3729
|
-
#
|
3730
|
-
#
|
3792
|
+
# @param parent [::String]
|
3793
|
+
# Required. The location to create the backup vaults, in the format
|
3794
|
+
# `projects/{project_id}/locations/{location}`
|
3795
|
+
# @param backup_vault_id [::String]
|
3796
|
+
# Required. The ID to use for the backupVault.
|
3797
|
+
# The ID must be unique within the specified location.
|
3798
|
+
# The max supported length is 63 characters.
|
3799
|
+
# This value must start with a lowercase letter followed by up to 62
|
3800
|
+
# lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
|
3801
|
+
# Values that do not match this pattern will trigger an INVALID_ARGUMENT
|
3802
|
+
# error.
|
3803
|
+
# @param backup_vault [::Google::Cloud::NetApp::V1::BackupVault, ::Hash]
|
3804
|
+
# Required. A backupVault resource
|
3731
3805
|
#
|
3732
|
-
#
|
3733
|
-
#
|
3734
|
-
#
|
3735
|
-
# config.rpcs.list_storage_pools.timeout = 20.0
|
3736
|
-
# end
|
3806
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3807
|
+
# @yieldparam response [::Gapic::Operation]
|
3808
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3737
3809
|
#
|
3738
|
-
#
|
3739
|
-
# The hostname or hostname:port of the service endpoint.
|
3740
|
-
# Defaults to `"netapp.googleapis.com"`.
|
3741
|
-
# @return [::String]
|
3742
|
-
# @!attribute [rw] credentials
|
3743
|
-
# Credentials to send with calls. You may provide any of the following types:
|
3744
|
-
# * (`String`) The path to a service account key file in JSON format
|
3745
|
-
# * (`Hash`) A service account key as a Hash
|
3746
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3747
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3748
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3749
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3750
|
-
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3751
|
-
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3752
|
-
# * (`nil`) indicating no credentials
|
3753
|
-
# @return [::Object]
|
3754
|
-
# @!attribute [rw] scope
|
3755
|
-
# The OAuth scopes
|
3756
|
-
# @return [::Array<::String>]
|
3757
|
-
# @!attribute [rw] lib_name
|
3758
|
-
# The library name as recorded in instrumentation and logging
|
3759
|
-
# @return [::String]
|
3760
|
-
# @!attribute [rw] lib_version
|
3761
|
-
# The library version as recorded in instrumentation and logging
|
3762
|
-
# @return [::String]
|
3763
|
-
# @!attribute [rw] channel_args
|
3764
|
-
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
3765
|
-
# `GRPC::Core::Channel` object is provided as the credential.
|
3766
|
-
# @return [::Hash]
|
3767
|
-
# @!attribute [rw] interceptors
|
3768
|
-
# An array of interceptors that are run before calls are executed.
|
3769
|
-
# @return [::Array<::GRPC::ClientInterceptor>]
|
3770
|
-
# @!attribute [rw] timeout
|
3771
|
-
# The call timeout in seconds.
|
3772
|
-
# @return [::Numeric]
|
3773
|
-
# @!attribute [rw] metadata
|
3774
|
-
# Additional gRPC headers to be sent with the call.
|
3775
|
-
# @return [::Hash{::Symbol=>::String}]
|
3776
|
-
# @!attribute [rw] retry_policy
|
3777
|
-
# The retry policy. The value is a hash with the following keys:
|
3778
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3779
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3780
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3781
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3782
|
-
# trigger a retry.
|
3783
|
-
# @return [::Hash]
|
3784
|
-
# @!attribute [rw] quota_project
|
3785
|
-
# A separate project against which to charge quota.
|
3786
|
-
# @return [::String]
|
3810
|
+
# @return [::Gapic::Operation]
|
3787
3811
|
#
|
3788
|
-
|
3789
|
-
|
3812
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3813
|
+
#
|
3814
|
+
# @example Basic example
|
3815
|
+
# require "google/cloud/netapp/v1"
|
3816
|
+
#
|
3817
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3818
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3819
|
+
#
|
3820
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3821
|
+
# request = Google::Cloud::NetApp::V1::CreateBackupVaultRequest.new
|
3822
|
+
#
|
3823
|
+
# # Call the create_backup_vault method.
|
3824
|
+
# result = client.create_backup_vault request
|
3825
|
+
#
|
3826
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3827
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3828
|
+
# # Here is how to wait for a response.
|
3829
|
+
# result.wait_until_done! timeout: 60
|
3830
|
+
# if result.response?
|
3831
|
+
# p result.response
|
3832
|
+
# else
|
3833
|
+
# puts "No response received."
|
3834
|
+
# end
|
3835
|
+
#
|
3836
|
+
def create_backup_vault request, options = nil
|
3837
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3790
3838
|
|
3791
|
-
|
3839
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupVaultRequest
|
3792
3840
|
|
3793
|
-
|
3794
|
-
|
3795
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3796
|
-
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
3797
|
-
allowed.any? { |klass| klass === value }
|
3798
|
-
end
|
3799
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
3800
|
-
config_attr :lib_name, nil, ::String, nil
|
3801
|
-
config_attr :lib_version, nil, ::String, nil
|
3802
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
3803
|
-
config_attr :interceptors, nil, ::Array, nil
|
3804
|
-
config_attr :timeout, nil, ::Numeric, nil
|
3805
|
-
config_attr :metadata, nil, ::Hash, nil
|
3806
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3807
|
-
config_attr :quota_project, nil, ::String, nil
|
3841
|
+
# Converts hash and nil to an options object
|
3842
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3808
3843
|
|
3809
|
-
#
|
3810
|
-
|
3811
|
-
@parent_config = parent_config unless parent_config.nil?
|
3844
|
+
# Customize the options with defaults
|
3845
|
+
metadata = @config.rpcs.create_backup_vault.metadata.to_h
|
3812
3846
|
|
3813
|
-
|
3847
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3848
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3849
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3850
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3851
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3852
|
+
|
3853
|
+
header_params = {}
|
3854
|
+
if request.parent
|
3855
|
+
header_params["parent"] = request.parent
|
3814
3856
|
end
|
3815
3857
|
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3858
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3859
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3860
|
+
|
3861
|
+
options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout,
|
3862
|
+
metadata: metadata,
|
3863
|
+
retry_policy: @config.rpcs.create_backup_vault.retry_policy
|
3864
|
+
|
3865
|
+
options.apply_defaults timeout: @config.timeout,
|
3866
|
+
metadata: @config.metadata,
|
3867
|
+
retry_policy: @config.retry_policy
|
3868
|
+
|
3869
|
+
@net_app_stub.call_rpc :create_backup_vault, request, options: options do |response, operation|
|
3870
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3871
|
+
yield response, operation if block_given?
|
3872
|
+
return response
|
3826
3873
|
end
|
3874
|
+
rescue ::GRPC::BadStatus => e
|
3875
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3876
|
+
end
|
3827
3877
|
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
3878
|
+
##
|
3879
|
+
# Returns the description of the specified backup vault
|
3880
|
+
#
|
3881
|
+
# @overload get_backup_vault(request, options = nil)
|
3882
|
+
# Pass arguments to `get_backup_vault` via a request object, either of type
|
3883
|
+
# {::Google::Cloud::NetApp::V1::GetBackupVaultRequest} or an equivalent Hash.
|
3884
|
+
#
|
3885
|
+
# @param request [::Google::Cloud::NetApp::V1::GetBackupVaultRequest, ::Hash]
|
3886
|
+
# A request object representing the call parameters. Required. To specify no
|
3887
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3888
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3889
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3890
|
+
#
|
3891
|
+
# @overload get_backup_vault(name: nil)
|
3892
|
+
# Pass arguments to `get_backup_vault` via keyword arguments. Note that at
|
3893
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3894
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3895
|
+
#
|
3896
|
+
# @param name [::String]
|
3897
|
+
# Required. The backupVault resource name, in the format
|
3898
|
+
# `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
|
3899
|
+
#
|
3900
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3901
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::BackupVault]
|
3902
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3903
|
+
#
|
3904
|
+
# @return [::Google::Cloud::NetApp::V1::BackupVault]
|
3905
|
+
#
|
3906
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3907
|
+
#
|
3908
|
+
# @example Basic example
|
3909
|
+
# require "google/cloud/netapp/v1"
|
3910
|
+
#
|
3911
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3912
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
3913
|
+
#
|
3914
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3915
|
+
# request = Google::Cloud::NetApp::V1::GetBackupVaultRequest.new
|
3916
|
+
#
|
3917
|
+
# # Call the get_backup_vault method.
|
3918
|
+
# result = client.get_backup_vault request
|
3919
|
+
#
|
3920
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::BackupVault.
|
3921
|
+
# p result
|
3922
|
+
#
|
3923
|
+
def get_backup_vault request, options = nil
|
3924
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3925
|
+
|
3926
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupVaultRequest
|
3927
|
+
|
3928
|
+
# Converts hash and nil to an options object
|
3929
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3930
|
+
|
3931
|
+
# Customize the options with defaults
|
3932
|
+
metadata = @config.rpcs.get_backup_vault.metadata.to_h
|
3933
|
+
|
3934
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3935
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3936
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3937
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
3938
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3939
|
+
|
3940
|
+
header_params = {}
|
3941
|
+
if request.name
|
3942
|
+
header_params["name"] = request.name
|
3834
3943
|
end
|
3835
3944
|
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3842
|
-
|
3945
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3946
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3947
|
+
|
3948
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout,
|
3949
|
+
metadata: metadata,
|
3950
|
+
retry_policy: @config.rpcs.get_backup_vault.retry_policy
|
3951
|
+
|
3952
|
+
options.apply_defaults timeout: @config.timeout,
|
3953
|
+
metadata: @config.metadata,
|
3954
|
+
retry_policy: @config.retry_policy
|
3955
|
+
|
3956
|
+
@net_app_stub.call_rpc :get_backup_vault, request, options: options do |response, operation|
|
3957
|
+
yield response, operation if block_given?
|
3958
|
+
return response
|
3959
|
+
end
|
3960
|
+
rescue ::GRPC::BadStatus => e
|
3961
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3962
|
+
end
|
3963
|
+
|
3964
|
+
##
|
3965
|
+
# Returns list of all available backup vaults.
|
3966
|
+
#
|
3967
|
+
# @overload list_backup_vaults(request, options = nil)
|
3968
|
+
# Pass arguments to `list_backup_vaults` via a request object, either of type
|
3969
|
+
# {::Google::Cloud::NetApp::V1::ListBackupVaultsRequest} or an equivalent Hash.
|
3970
|
+
#
|
3971
|
+
# @param request [::Google::Cloud::NetApp::V1::ListBackupVaultsRequest, ::Hash]
|
3972
|
+
# A request object representing the call parameters. Required. To specify no
|
3973
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3974
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3975
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3976
|
+
#
|
3977
|
+
# @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
3978
|
+
# Pass arguments to `list_backup_vaults` via keyword arguments. Note that at
|
3979
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3980
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3981
|
+
#
|
3982
|
+
# @param parent [::String]
|
3983
|
+
# Required. The location for which to retrieve backupVault information,
|
3984
|
+
# in the format
|
3985
|
+
# `projects/{project_id}/locations/{location}`.
|
3986
|
+
# @param page_size [::Integer]
|
3987
|
+
# The maximum number of items to return.
|
3988
|
+
# @param page_token [::String]
|
3989
|
+
# The next_page_token value to use if there are additional
|
3990
|
+
# results to retrieve for this list request.
|
3991
|
+
# @param order_by [::String]
|
3992
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
3993
|
+
# @param filter [::String]
|
3994
|
+
# List filter.
|
3995
|
+
#
|
3996
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3997
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>]
|
3998
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3999
|
+
#
|
4000
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupVault>]
|
4001
|
+
#
|
4002
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4003
|
+
#
|
4004
|
+
# @example Basic example
|
4005
|
+
# require "google/cloud/netapp/v1"
|
4006
|
+
#
|
4007
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4008
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4009
|
+
#
|
4010
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4011
|
+
# request = Google::Cloud::NetApp::V1::ListBackupVaultsRequest.new
|
4012
|
+
#
|
4013
|
+
# # Call the list_backup_vaults method.
|
4014
|
+
# result = client.list_backup_vaults request
|
4015
|
+
#
|
4016
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4017
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4018
|
+
# result.each do |item|
|
4019
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::BackupVault.
|
4020
|
+
# p item
|
4021
|
+
# end
|
4022
|
+
#
|
4023
|
+
def list_backup_vaults request, options = nil
|
4024
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4025
|
+
|
4026
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupVaultsRequest
|
4027
|
+
|
4028
|
+
# Converts hash and nil to an options object
|
4029
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4030
|
+
|
4031
|
+
# Customize the options with defaults
|
4032
|
+
metadata = @config.rpcs.list_backup_vaults.metadata.to_h
|
4033
|
+
|
4034
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4035
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4036
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4037
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4038
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4039
|
+
|
4040
|
+
header_params = {}
|
4041
|
+
if request.parent
|
4042
|
+
header_params["parent"] = request.parent
|
4043
|
+
end
|
4044
|
+
|
4045
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4046
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4047
|
+
|
4048
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout,
|
4049
|
+
metadata: metadata,
|
4050
|
+
retry_policy: @config.rpcs.list_backup_vaults.retry_policy
|
4051
|
+
|
4052
|
+
options.apply_defaults timeout: @config.timeout,
|
4053
|
+
metadata: @config.metadata,
|
4054
|
+
retry_policy: @config.retry_policy
|
4055
|
+
|
4056
|
+
@net_app_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation|
|
4057
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_vaults, request, response, operation, options
|
4058
|
+
yield response, operation if block_given?
|
4059
|
+
return response
|
4060
|
+
end
|
4061
|
+
rescue ::GRPC::BadStatus => e
|
4062
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4063
|
+
end
|
4064
|
+
|
4065
|
+
##
|
4066
|
+
# Updates the settings of a specific backup vault.
|
4067
|
+
#
|
4068
|
+
# @overload update_backup_vault(request, options = nil)
|
4069
|
+
# Pass arguments to `update_backup_vault` via a request object, either of type
|
4070
|
+
# {::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest} or an equivalent Hash.
|
4071
|
+
#
|
4072
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest, ::Hash]
|
4073
|
+
# A request object representing the call parameters. Required. To specify no
|
4074
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4075
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4076
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4077
|
+
#
|
4078
|
+
# @overload update_backup_vault(update_mask: nil, backup_vault: nil)
|
4079
|
+
# Pass arguments to `update_backup_vault` via keyword arguments. Note that at
|
4080
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4081
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4082
|
+
#
|
4083
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4084
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
4085
|
+
# Backup resource to be updated.
|
4086
|
+
# The fields specified in the update_mask are relative to the resource, not
|
4087
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
4088
|
+
# user does not provide a mask then all fields will be overwritten.
|
4089
|
+
# @param backup_vault [::Google::Cloud::NetApp::V1::BackupVault, ::Hash]
|
4090
|
+
# Required. The backupVault being updated
|
4091
|
+
#
|
4092
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4093
|
+
# @yieldparam response [::Gapic::Operation]
|
4094
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4095
|
+
#
|
4096
|
+
# @return [::Gapic::Operation]
|
4097
|
+
#
|
4098
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4099
|
+
#
|
4100
|
+
# @example Basic example
|
4101
|
+
# require "google/cloud/netapp/v1"
|
4102
|
+
#
|
4103
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4104
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4105
|
+
#
|
4106
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4107
|
+
# request = Google::Cloud::NetApp::V1::UpdateBackupVaultRequest.new
|
4108
|
+
#
|
4109
|
+
# # Call the update_backup_vault method.
|
4110
|
+
# result = client.update_backup_vault request
|
4111
|
+
#
|
4112
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4113
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4114
|
+
# # Here is how to wait for a response.
|
4115
|
+
# result.wait_until_done! timeout: 60
|
4116
|
+
# if result.response?
|
4117
|
+
# p result.response
|
4118
|
+
# else
|
4119
|
+
# puts "No response received."
|
4120
|
+
# end
|
4121
|
+
#
|
4122
|
+
def update_backup_vault request, options = nil
|
4123
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4124
|
+
|
4125
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest
|
4126
|
+
|
4127
|
+
# Converts hash and nil to an options object
|
4128
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4129
|
+
|
4130
|
+
# Customize the options with defaults
|
4131
|
+
metadata = @config.rpcs.update_backup_vault.metadata.to_h
|
4132
|
+
|
4133
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4134
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4135
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4136
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4137
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4138
|
+
|
4139
|
+
header_params = {}
|
4140
|
+
if request.backup_vault&.name
|
4141
|
+
header_params["backup_vault.name"] = request.backup_vault.name
|
4142
|
+
end
|
4143
|
+
|
4144
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4145
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4146
|
+
|
4147
|
+
options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout,
|
4148
|
+
metadata: metadata,
|
4149
|
+
retry_policy: @config.rpcs.update_backup_vault.retry_policy
|
4150
|
+
|
4151
|
+
options.apply_defaults timeout: @config.timeout,
|
4152
|
+
metadata: @config.metadata,
|
4153
|
+
retry_policy: @config.retry_policy
|
4154
|
+
|
4155
|
+
@net_app_stub.call_rpc :update_backup_vault, request, options: options do |response, operation|
|
4156
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4157
|
+
yield response, operation if block_given?
|
4158
|
+
return response
|
4159
|
+
end
|
4160
|
+
rescue ::GRPC::BadStatus => e
|
4161
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4162
|
+
end
|
4163
|
+
|
4164
|
+
##
|
4165
|
+
# Warning! This operation will permanently delete the backup vault.
|
4166
|
+
#
|
4167
|
+
# @overload delete_backup_vault(request, options = nil)
|
4168
|
+
# Pass arguments to `delete_backup_vault` via a request object, either of type
|
4169
|
+
# {::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest} or an equivalent Hash.
|
4170
|
+
#
|
4171
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest, ::Hash]
|
4172
|
+
# A request object representing the call parameters. Required. To specify no
|
4173
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4174
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4175
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4176
|
+
#
|
4177
|
+
# @overload delete_backup_vault(name: nil)
|
4178
|
+
# Pass arguments to `delete_backup_vault` via keyword arguments. Note that at
|
4179
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4180
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4181
|
+
#
|
4182
|
+
# @param name [::String]
|
4183
|
+
# Required. The backupVault resource name, in the format
|
4184
|
+
# `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
|
4185
|
+
#
|
4186
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4187
|
+
# @yieldparam response [::Gapic::Operation]
|
4188
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4189
|
+
#
|
4190
|
+
# @return [::Gapic::Operation]
|
4191
|
+
#
|
4192
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4193
|
+
#
|
4194
|
+
# @example Basic example
|
4195
|
+
# require "google/cloud/netapp/v1"
|
4196
|
+
#
|
4197
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4198
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4199
|
+
#
|
4200
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4201
|
+
# request = Google::Cloud::NetApp::V1::DeleteBackupVaultRequest.new
|
4202
|
+
#
|
4203
|
+
# # Call the delete_backup_vault method.
|
4204
|
+
# result = client.delete_backup_vault request
|
4205
|
+
#
|
4206
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4207
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4208
|
+
# # Here is how to wait for a response.
|
4209
|
+
# result.wait_until_done! timeout: 60
|
4210
|
+
# if result.response?
|
4211
|
+
# p result.response
|
4212
|
+
# else
|
4213
|
+
# puts "No response received."
|
4214
|
+
# end
|
4215
|
+
#
|
4216
|
+
def delete_backup_vault request, options = nil
|
4217
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4218
|
+
|
4219
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest
|
4220
|
+
|
4221
|
+
# Converts hash and nil to an options object
|
4222
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4223
|
+
|
4224
|
+
# Customize the options with defaults
|
4225
|
+
metadata = @config.rpcs.delete_backup_vault.metadata.to_h
|
4226
|
+
|
4227
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4228
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4229
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4230
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4231
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4232
|
+
|
4233
|
+
header_params = {}
|
4234
|
+
if request.name
|
4235
|
+
header_params["name"] = request.name
|
4236
|
+
end
|
4237
|
+
|
4238
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4239
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4240
|
+
|
4241
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout,
|
4242
|
+
metadata: metadata,
|
4243
|
+
retry_policy: @config.rpcs.delete_backup_vault.retry_policy
|
4244
|
+
|
4245
|
+
options.apply_defaults timeout: @config.timeout,
|
4246
|
+
metadata: @config.metadata,
|
4247
|
+
retry_policy: @config.retry_policy
|
4248
|
+
|
4249
|
+
@net_app_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation|
|
4250
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4251
|
+
yield response, operation if block_given?
|
4252
|
+
return response
|
4253
|
+
end
|
4254
|
+
rescue ::GRPC::BadStatus => e
|
4255
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4256
|
+
end
|
4257
|
+
|
4258
|
+
##
|
4259
|
+
# Creates a backup from the volume specified in the request
|
4260
|
+
# The backup can be created from the given snapshot if specified in the
|
4261
|
+
# request. If no snapshot specified, there'll be a new snapshot taken to
|
4262
|
+
# initiate the backup creation.
|
4263
|
+
#
|
4264
|
+
# @overload create_backup(request, options = nil)
|
4265
|
+
# Pass arguments to `create_backup` via a request object, either of type
|
4266
|
+
# {::Google::Cloud::NetApp::V1::CreateBackupRequest} or an equivalent Hash.
|
4267
|
+
#
|
4268
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateBackupRequest, ::Hash]
|
4269
|
+
# A request object representing the call parameters. Required. To specify no
|
4270
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4271
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4272
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4273
|
+
#
|
4274
|
+
# @overload create_backup(parent: nil, backup_id: nil, backup: nil)
|
4275
|
+
# Pass arguments to `create_backup` via keyword arguments. Note that at
|
4276
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4277
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4278
|
+
#
|
4279
|
+
# @param parent [::String]
|
4280
|
+
# Required. The NetApp backupVault to create the backups of, in the format
|
4281
|
+
# `projects/*/locations/*/backupVaults/{backup_vault_id}`
|
4282
|
+
# @param backup_id [::String]
|
4283
|
+
# Required. The ID to use for the backup.
|
4284
|
+
# The ID must be unique within the specified backupVault.
|
4285
|
+
# This value must start with a lowercase letter followed by up to 62
|
4286
|
+
# lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
|
4287
|
+
# Values that do not match this pattern will trigger an INVALID_ARGUMENT
|
4288
|
+
# error.
|
4289
|
+
# @param backup [::Google::Cloud::NetApp::V1::Backup, ::Hash]
|
4290
|
+
# Required. A backup resource
|
4291
|
+
#
|
4292
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4293
|
+
# @yieldparam response [::Gapic::Operation]
|
4294
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4295
|
+
#
|
4296
|
+
# @return [::Gapic::Operation]
|
4297
|
+
#
|
4298
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4299
|
+
#
|
4300
|
+
# @example Basic example
|
4301
|
+
# require "google/cloud/netapp/v1"
|
4302
|
+
#
|
4303
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4304
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4305
|
+
#
|
4306
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4307
|
+
# request = Google::Cloud::NetApp::V1::CreateBackupRequest.new
|
4308
|
+
#
|
4309
|
+
# # Call the create_backup method.
|
4310
|
+
# result = client.create_backup request
|
4311
|
+
#
|
4312
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4313
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4314
|
+
# # Here is how to wait for a response.
|
4315
|
+
# result.wait_until_done! timeout: 60
|
4316
|
+
# if result.response?
|
4317
|
+
# p result.response
|
4318
|
+
# else
|
4319
|
+
# puts "No response received."
|
4320
|
+
# end
|
4321
|
+
#
|
4322
|
+
def create_backup request, options = nil
|
4323
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4324
|
+
|
4325
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupRequest
|
4326
|
+
|
4327
|
+
# Converts hash and nil to an options object
|
4328
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4329
|
+
|
4330
|
+
# Customize the options with defaults
|
4331
|
+
metadata = @config.rpcs.create_backup.metadata.to_h
|
4332
|
+
|
4333
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4334
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4335
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4336
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4337
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4338
|
+
|
4339
|
+
header_params = {}
|
4340
|
+
if request.parent
|
4341
|
+
header_params["parent"] = request.parent
|
4342
|
+
end
|
4343
|
+
|
4344
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4345
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4346
|
+
|
4347
|
+
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
4348
|
+
metadata: metadata,
|
4349
|
+
retry_policy: @config.rpcs.create_backup.retry_policy
|
4350
|
+
|
4351
|
+
options.apply_defaults timeout: @config.timeout,
|
4352
|
+
metadata: @config.metadata,
|
4353
|
+
retry_policy: @config.retry_policy
|
4354
|
+
|
4355
|
+
@net_app_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
4356
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4357
|
+
yield response, operation if block_given?
|
4358
|
+
return response
|
4359
|
+
end
|
4360
|
+
rescue ::GRPC::BadStatus => e
|
4361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4362
|
+
end
|
4363
|
+
|
4364
|
+
##
|
4365
|
+
# Returns the description of the specified backup
|
4366
|
+
#
|
4367
|
+
# @overload get_backup(request, options = nil)
|
4368
|
+
# Pass arguments to `get_backup` via a request object, either of type
|
4369
|
+
# {::Google::Cloud::NetApp::V1::GetBackupRequest} or an equivalent Hash.
|
4370
|
+
#
|
4371
|
+
# @param request [::Google::Cloud::NetApp::V1::GetBackupRequest, ::Hash]
|
4372
|
+
# A request object representing the call parameters. Required. To specify no
|
4373
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4374
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4375
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4376
|
+
#
|
4377
|
+
# @overload get_backup(name: nil)
|
4378
|
+
# Pass arguments to `get_backup` via keyword arguments. Note that at
|
4379
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4380
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4381
|
+
#
|
4382
|
+
# @param name [::String]
|
4383
|
+
# Required. The backup resource name, in the format
|
4384
|
+
# `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
|
4385
|
+
#
|
4386
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4387
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::Backup]
|
4388
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4389
|
+
#
|
4390
|
+
# @return [::Google::Cloud::NetApp::V1::Backup]
|
4391
|
+
#
|
4392
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4393
|
+
#
|
4394
|
+
# @example Basic example
|
4395
|
+
# require "google/cloud/netapp/v1"
|
4396
|
+
#
|
4397
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4398
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4399
|
+
#
|
4400
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4401
|
+
# request = Google::Cloud::NetApp::V1::GetBackupRequest.new
|
4402
|
+
#
|
4403
|
+
# # Call the get_backup method.
|
4404
|
+
# result = client.get_backup request
|
4405
|
+
#
|
4406
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::Backup.
|
4407
|
+
# p result
|
4408
|
+
#
|
4409
|
+
def get_backup request, options = nil
|
4410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4411
|
+
|
4412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupRequest
|
4413
|
+
|
4414
|
+
# Converts hash and nil to an options object
|
4415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4416
|
+
|
4417
|
+
# Customize the options with defaults
|
4418
|
+
metadata = @config.rpcs.get_backup.metadata.to_h
|
4419
|
+
|
4420
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4421
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4423
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4424
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4425
|
+
|
4426
|
+
header_params = {}
|
4427
|
+
if request.name
|
4428
|
+
header_params["name"] = request.name
|
4429
|
+
end
|
4430
|
+
|
4431
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4432
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4433
|
+
|
4434
|
+
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
4435
|
+
metadata: metadata,
|
4436
|
+
retry_policy: @config.rpcs.get_backup.retry_policy
|
4437
|
+
|
4438
|
+
options.apply_defaults timeout: @config.timeout,
|
4439
|
+
metadata: @config.metadata,
|
4440
|
+
retry_policy: @config.retry_policy
|
4441
|
+
|
4442
|
+
@net_app_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
4443
|
+
yield response, operation if block_given?
|
4444
|
+
return response
|
4445
|
+
end
|
4446
|
+
rescue ::GRPC::BadStatus => e
|
4447
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4448
|
+
end
|
4449
|
+
|
4450
|
+
##
|
4451
|
+
# Returns descriptions of all backups for a backupVault.
|
4452
|
+
#
|
4453
|
+
# @overload list_backups(request, options = nil)
|
4454
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
4455
|
+
# {::Google::Cloud::NetApp::V1::ListBackupsRequest} or an equivalent Hash.
|
4456
|
+
#
|
4457
|
+
# @param request [::Google::Cloud::NetApp::V1::ListBackupsRequest, ::Hash]
|
4458
|
+
# A request object representing the call parameters. Required. To specify no
|
4459
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4460
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4461
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4462
|
+
#
|
4463
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
4464
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
4465
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4466
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4467
|
+
#
|
4468
|
+
# @param parent [::String]
|
4469
|
+
# Required. The backupVault for which to retrieve backup information,
|
4470
|
+
# in the format
|
4471
|
+
# `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
|
4472
|
+
# To retrieve backup information for all locations, use "-" for the
|
4473
|
+
# `{location}` value.
|
4474
|
+
# To retrieve backup information for all backupVaults, use "-" for the
|
4475
|
+
# `{backup_vault_id}` value.
|
4476
|
+
# To retrieve backup information for a volume, use "-" for the
|
4477
|
+
# `{backup_vault_id}` value and specify volume full name with the filter.
|
4478
|
+
# @param page_size [::Integer]
|
4479
|
+
# The maximum number of items to return. The service may return fewer
|
4480
|
+
# than this value. The maximum value
|
4481
|
+
# is 1000; values above 1000 will be coerced to 1000.
|
4482
|
+
# @param page_token [::String]
|
4483
|
+
# The next_page_token value to use if there are additional
|
4484
|
+
# results to retrieve for this list request.
|
4485
|
+
# @param order_by [::String]
|
4486
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
4487
|
+
# @param filter [::String]
|
4488
|
+
# The standard list filter.
|
4489
|
+
# If specified, backups will be returned based on the attribute name that
|
4490
|
+
# matches the filter expression. If empty, then no backups are filtered out.
|
4491
|
+
# See https://google.aip.dev/160
|
4492
|
+
#
|
4493
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4494
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>]
|
4495
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4496
|
+
#
|
4497
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::Backup>]
|
4498
|
+
#
|
4499
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4500
|
+
#
|
4501
|
+
# @example Basic example
|
4502
|
+
# require "google/cloud/netapp/v1"
|
4503
|
+
#
|
4504
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4505
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4506
|
+
#
|
4507
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4508
|
+
# request = Google::Cloud::NetApp::V1::ListBackupsRequest.new
|
4509
|
+
#
|
4510
|
+
# # Call the list_backups method.
|
4511
|
+
# result = client.list_backups request
|
4512
|
+
#
|
4513
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4514
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4515
|
+
# result.each do |item|
|
4516
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::Backup.
|
4517
|
+
# p item
|
4518
|
+
# end
|
4519
|
+
#
|
4520
|
+
def list_backups request, options = nil
|
4521
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4522
|
+
|
4523
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupsRequest
|
4524
|
+
|
4525
|
+
# Converts hash and nil to an options object
|
4526
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4527
|
+
|
4528
|
+
# Customize the options with defaults
|
4529
|
+
metadata = @config.rpcs.list_backups.metadata.to_h
|
4530
|
+
|
4531
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4532
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4533
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4534
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4535
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4536
|
+
|
4537
|
+
header_params = {}
|
4538
|
+
if request.parent
|
4539
|
+
header_params["parent"] = request.parent
|
4540
|
+
end
|
4541
|
+
|
4542
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4543
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4544
|
+
|
4545
|
+
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
4546
|
+
metadata: metadata,
|
4547
|
+
retry_policy: @config.rpcs.list_backups.retry_policy
|
4548
|
+
|
4549
|
+
options.apply_defaults timeout: @config.timeout,
|
4550
|
+
metadata: @config.metadata,
|
4551
|
+
retry_policy: @config.retry_policy
|
4552
|
+
|
4553
|
+
@net_app_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
4554
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backups, request, response, operation, options
|
4555
|
+
yield response, operation if block_given?
|
4556
|
+
return response
|
4557
|
+
end
|
4558
|
+
rescue ::GRPC::BadStatus => e
|
4559
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4560
|
+
end
|
4561
|
+
|
4562
|
+
##
|
4563
|
+
# Warning! This operation will permanently delete the backup.
|
4564
|
+
#
|
4565
|
+
# @overload delete_backup(request, options = nil)
|
4566
|
+
# Pass arguments to `delete_backup` via a request object, either of type
|
4567
|
+
# {::Google::Cloud::NetApp::V1::DeleteBackupRequest} or an equivalent Hash.
|
4568
|
+
#
|
4569
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteBackupRequest, ::Hash]
|
4570
|
+
# A request object representing the call parameters. Required. To specify no
|
4571
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4572
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4573
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4574
|
+
#
|
4575
|
+
# @overload delete_backup(name: nil)
|
4576
|
+
# Pass arguments to `delete_backup` via keyword arguments. Note that at
|
4577
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4578
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4579
|
+
#
|
4580
|
+
# @param name [::String]
|
4581
|
+
# Required. The backup resource name, in the format
|
4582
|
+
# `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
|
4583
|
+
#
|
4584
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4585
|
+
# @yieldparam response [::Gapic::Operation]
|
4586
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4587
|
+
#
|
4588
|
+
# @return [::Gapic::Operation]
|
4589
|
+
#
|
4590
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4591
|
+
#
|
4592
|
+
# @example Basic example
|
4593
|
+
# require "google/cloud/netapp/v1"
|
4594
|
+
#
|
4595
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4596
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4597
|
+
#
|
4598
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4599
|
+
# request = Google::Cloud::NetApp::V1::DeleteBackupRequest.new
|
4600
|
+
#
|
4601
|
+
# # Call the delete_backup method.
|
4602
|
+
# result = client.delete_backup request
|
4603
|
+
#
|
4604
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4605
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4606
|
+
# # Here is how to wait for a response.
|
4607
|
+
# result.wait_until_done! timeout: 60
|
4608
|
+
# if result.response?
|
4609
|
+
# p result.response
|
4610
|
+
# else
|
4611
|
+
# puts "No response received."
|
4612
|
+
# end
|
4613
|
+
#
|
4614
|
+
def delete_backup request, options = nil
|
4615
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4616
|
+
|
4617
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupRequest
|
4618
|
+
|
4619
|
+
# Converts hash and nil to an options object
|
4620
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4621
|
+
|
4622
|
+
# Customize the options with defaults
|
4623
|
+
metadata = @config.rpcs.delete_backup.metadata.to_h
|
4624
|
+
|
4625
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4626
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4627
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4628
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4629
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4630
|
+
|
4631
|
+
header_params = {}
|
4632
|
+
if request.name
|
4633
|
+
header_params["name"] = request.name
|
4634
|
+
end
|
4635
|
+
|
4636
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4637
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4638
|
+
|
4639
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
4640
|
+
metadata: metadata,
|
4641
|
+
retry_policy: @config.rpcs.delete_backup.retry_policy
|
4642
|
+
|
4643
|
+
options.apply_defaults timeout: @config.timeout,
|
4644
|
+
metadata: @config.metadata,
|
4645
|
+
retry_policy: @config.retry_policy
|
4646
|
+
|
4647
|
+
@net_app_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
4648
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4649
|
+
yield response, operation if block_given?
|
4650
|
+
return response
|
4651
|
+
end
|
4652
|
+
rescue ::GRPC::BadStatus => e
|
4653
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4654
|
+
end
|
4655
|
+
|
4656
|
+
##
|
4657
|
+
# Update backup with full spec.
|
4658
|
+
#
|
4659
|
+
# @overload update_backup(request, options = nil)
|
4660
|
+
# Pass arguments to `update_backup` via a request object, either of type
|
4661
|
+
# {::Google::Cloud::NetApp::V1::UpdateBackupRequest} or an equivalent Hash.
|
4662
|
+
#
|
4663
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateBackupRequest, ::Hash]
|
4664
|
+
# A request object representing the call parameters. Required. To specify no
|
4665
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4666
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4667
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4668
|
+
#
|
4669
|
+
# @overload update_backup(update_mask: nil, backup: nil)
|
4670
|
+
# Pass arguments to `update_backup` via keyword arguments. Note that at
|
4671
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4672
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4673
|
+
#
|
4674
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4675
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
4676
|
+
# Backup resource to be updated.
|
4677
|
+
# The fields specified in the update_mask are relative to the resource, not
|
4678
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
4679
|
+
# user does not provide a mask then all fields will be overwritten.
|
4680
|
+
# @param backup [::Google::Cloud::NetApp::V1::Backup, ::Hash]
|
4681
|
+
# Required. The backup being updated
|
4682
|
+
#
|
4683
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4684
|
+
# @yieldparam response [::Gapic::Operation]
|
4685
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4686
|
+
#
|
4687
|
+
# @return [::Gapic::Operation]
|
4688
|
+
#
|
4689
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4690
|
+
#
|
4691
|
+
# @example Basic example
|
4692
|
+
# require "google/cloud/netapp/v1"
|
4693
|
+
#
|
4694
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4695
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4696
|
+
#
|
4697
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4698
|
+
# request = Google::Cloud::NetApp::V1::UpdateBackupRequest.new
|
4699
|
+
#
|
4700
|
+
# # Call the update_backup method.
|
4701
|
+
# result = client.update_backup request
|
4702
|
+
#
|
4703
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4704
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4705
|
+
# # Here is how to wait for a response.
|
4706
|
+
# result.wait_until_done! timeout: 60
|
4707
|
+
# if result.response?
|
4708
|
+
# p result.response
|
4709
|
+
# else
|
4710
|
+
# puts "No response received."
|
4711
|
+
# end
|
4712
|
+
#
|
4713
|
+
def update_backup request, options = nil
|
4714
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4715
|
+
|
4716
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupRequest
|
4717
|
+
|
4718
|
+
# Converts hash and nil to an options object
|
4719
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4720
|
+
|
4721
|
+
# Customize the options with defaults
|
4722
|
+
metadata = @config.rpcs.update_backup.metadata.to_h
|
4723
|
+
|
4724
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4725
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4726
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4727
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4728
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4729
|
+
|
4730
|
+
header_params = {}
|
4731
|
+
if request.backup&.name
|
4732
|
+
header_params["backup.name"] = request.backup.name
|
4733
|
+
end
|
4734
|
+
|
4735
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4736
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4737
|
+
|
4738
|
+
options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
|
4739
|
+
metadata: metadata,
|
4740
|
+
retry_policy: @config.rpcs.update_backup.retry_policy
|
4741
|
+
|
4742
|
+
options.apply_defaults timeout: @config.timeout,
|
4743
|
+
metadata: @config.metadata,
|
4744
|
+
retry_policy: @config.retry_policy
|
4745
|
+
|
4746
|
+
@net_app_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
4747
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4748
|
+
yield response, operation if block_given?
|
4749
|
+
return response
|
4750
|
+
end
|
4751
|
+
rescue ::GRPC::BadStatus => e
|
4752
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4753
|
+
end
|
4754
|
+
|
4755
|
+
##
|
4756
|
+
# Creates new backup policy
|
4757
|
+
#
|
4758
|
+
# @overload create_backup_policy(request, options = nil)
|
4759
|
+
# Pass arguments to `create_backup_policy` via a request object, either of type
|
4760
|
+
# {::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest} or an equivalent Hash.
|
4761
|
+
#
|
4762
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest, ::Hash]
|
4763
|
+
# A request object representing the call parameters. Required. To specify no
|
4764
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4765
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4766
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4767
|
+
#
|
4768
|
+
# @overload create_backup_policy(parent: nil, backup_policy: nil, backup_policy_id: nil)
|
4769
|
+
# Pass arguments to `create_backup_policy` via keyword arguments. Note that at
|
4770
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4771
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4772
|
+
#
|
4773
|
+
# @param parent [::String]
|
4774
|
+
# Required. The location to create the backup policies of, in the format
|
4775
|
+
# `projects/{project_id}/locations/{location}`
|
4776
|
+
# @param backup_policy [::Google::Cloud::NetApp::V1::BackupPolicy, ::Hash]
|
4777
|
+
# Required. A backupPolicy resource
|
4778
|
+
# @param backup_policy_id [::String]
|
4779
|
+
# Required. The ID to use for the backup policy.
|
4780
|
+
# The ID must be unique within the specified location.
|
4781
|
+
# This value must start with a lowercase letter followed by up to 62
|
4782
|
+
# lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
|
4783
|
+
#
|
4784
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4785
|
+
# @yieldparam response [::Gapic::Operation]
|
4786
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4787
|
+
#
|
4788
|
+
# @return [::Gapic::Operation]
|
4789
|
+
#
|
4790
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4791
|
+
#
|
4792
|
+
# @example Basic example
|
4793
|
+
# require "google/cloud/netapp/v1"
|
4794
|
+
#
|
4795
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4796
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4797
|
+
#
|
4798
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4799
|
+
# request = Google::Cloud::NetApp::V1::CreateBackupPolicyRequest.new
|
4800
|
+
#
|
4801
|
+
# # Call the create_backup_policy method.
|
4802
|
+
# result = client.create_backup_policy request
|
4803
|
+
#
|
4804
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4805
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4806
|
+
# # Here is how to wait for a response.
|
4807
|
+
# result.wait_until_done! timeout: 60
|
4808
|
+
# if result.response?
|
4809
|
+
# p result.response
|
4810
|
+
# else
|
4811
|
+
# puts "No response received."
|
4812
|
+
# end
|
4813
|
+
#
|
4814
|
+
def create_backup_policy request, options = nil
|
4815
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4816
|
+
|
4817
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest
|
4818
|
+
|
4819
|
+
# Converts hash and nil to an options object
|
4820
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4821
|
+
|
4822
|
+
# Customize the options with defaults
|
4823
|
+
metadata = @config.rpcs.create_backup_policy.metadata.to_h
|
4824
|
+
|
4825
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4826
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4827
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4828
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4829
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4830
|
+
|
4831
|
+
header_params = {}
|
4832
|
+
if request.parent
|
4833
|
+
header_params["parent"] = request.parent
|
4834
|
+
end
|
4835
|
+
|
4836
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4837
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4838
|
+
|
4839
|
+
options.apply_defaults timeout: @config.rpcs.create_backup_policy.timeout,
|
4840
|
+
metadata: metadata,
|
4841
|
+
retry_policy: @config.rpcs.create_backup_policy.retry_policy
|
4842
|
+
|
4843
|
+
options.apply_defaults timeout: @config.timeout,
|
4844
|
+
metadata: @config.metadata,
|
4845
|
+
retry_policy: @config.retry_policy
|
4846
|
+
|
4847
|
+
@net_app_stub.call_rpc :create_backup_policy, request, options: options do |response, operation|
|
4848
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4849
|
+
yield response, operation if block_given?
|
4850
|
+
return response
|
4851
|
+
end
|
4852
|
+
rescue ::GRPC::BadStatus => e
|
4853
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4854
|
+
end
|
4855
|
+
|
4856
|
+
##
|
4857
|
+
# Returns the description of the specified backup policy by backup_policy_id.
|
4858
|
+
#
|
4859
|
+
# @overload get_backup_policy(request, options = nil)
|
4860
|
+
# Pass arguments to `get_backup_policy` via a request object, either of type
|
4861
|
+
# {::Google::Cloud::NetApp::V1::GetBackupPolicyRequest} or an equivalent Hash.
|
4862
|
+
#
|
4863
|
+
# @param request [::Google::Cloud::NetApp::V1::GetBackupPolicyRequest, ::Hash]
|
4864
|
+
# A request object representing the call parameters. Required. To specify no
|
4865
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4866
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4867
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4868
|
+
#
|
4869
|
+
# @overload get_backup_policy(name: nil)
|
4870
|
+
# Pass arguments to `get_backup_policy` via keyword arguments. Note that at
|
4871
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4872
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4873
|
+
#
|
4874
|
+
# @param name [::String]
|
4875
|
+
# Required. The backupPolicy resource name, in the format
|
4876
|
+
# `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
|
4877
|
+
#
|
4878
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4879
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::BackupPolicy]
|
4880
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4881
|
+
#
|
4882
|
+
# @return [::Google::Cloud::NetApp::V1::BackupPolicy]
|
4883
|
+
#
|
4884
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4885
|
+
#
|
4886
|
+
# @example Basic example
|
4887
|
+
# require "google/cloud/netapp/v1"
|
4888
|
+
#
|
4889
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4890
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4891
|
+
#
|
4892
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4893
|
+
# request = Google::Cloud::NetApp::V1::GetBackupPolicyRequest.new
|
4894
|
+
#
|
4895
|
+
# # Call the get_backup_policy method.
|
4896
|
+
# result = client.get_backup_policy request
|
4897
|
+
#
|
4898
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::BackupPolicy.
|
4899
|
+
# p result
|
4900
|
+
#
|
4901
|
+
def get_backup_policy request, options = nil
|
4902
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4903
|
+
|
4904
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupPolicyRequest
|
4905
|
+
|
4906
|
+
# Converts hash and nil to an options object
|
4907
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4908
|
+
|
4909
|
+
# Customize the options with defaults
|
4910
|
+
metadata = @config.rpcs.get_backup_policy.metadata.to_h
|
4911
|
+
|
4912
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
4913
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4914
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4915
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
4916
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4917
|
+
|
4918
|
+
header_params = {}
|
4919
|
+
if request.name
|
4920
|
+
header_params["name"] = request.name
|
4921
|
+
end
|
4922
|
+
|
4923
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
4924
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
4925
|
+
|
4926
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_policy.timeout,
|
4927
|
+
metadata: metadata,
|
4928
|
+
retry_policy: @config.rpcs.get_backup_policy.retry_policy
|
4929
|
+
|
4930
|
+
options.apply_defaults timeout: @config.timeout,
|
4931
|
+
metadata: @config.metadata,
|
4932
|
+
retry_policy: @config.retry_policy
|
4933
|
+
|
4934
|
+
@net_app_stub.call_rpc :get_backup_policy, request, options: options do |response, operation|
|
4935
|
+
yield response, operation if block_given?
|
4936
|
+
return response
|
4937
|
+
end
|
4938
|
+
rescue ::GRPC::BadStatus => e
|
4939
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4940
|
+
end
|
4941
|
+
|
4942
|
+
##
|
4943
|
+
# Returns list of all available backup policies.
|
4944
|
+
#
|
4945
|
+
# @overload list_backup_policies(request, options = nil)
|
4946
|
+
# Pass arguments to `list_backup_policies` via a request object, either of type
|
4947
|
+
# {::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest} or an equivalent Hash.
|
4948
|
+
#
|
4949
|
+
# @param request [::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest, ::Hash]
|
4950
|
+
# A request object representing the call parameters. Required. To specify no
|
4951
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4952
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4953
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
4954
|
+
#
|
4955
|
+
# @overload list_backup_policies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
4956
|
+
# Pass arguments to `list_backup_policies` via keyword arguments. Note that at
|
4957
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4958
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4959
|
+
#
|
4960
|
+
# @param parent [::String]
|
4961
|
+
# Required. Parent value for ListBackupPoliciesRequest
|
4962
|
+
# @param page_size [::Integer]
|
4963
|
+
# Requested page size. Server may return fewer items than requested.
|
4964
|
+
# If unspecified, the server will pick an appropriate default.
|
4965
|
+
# @param page_token [::String]
|
4966
|
+
# A token identifying a page of results the server should return.
|
4967
|
+
# @param filter [::String]
|
4968
|
+
# Filtering results
|
4969
|
+
# @param order_by [::String]
|
4970
|
+
# Hint for how to order the results
|
4971
|
+
#
|
4972
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
4973
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>]
|
4974
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
4975
|
+
#
|
4976
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::BackupPolicy>]
|
4977
|
+
#
|
4978
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
4979
|
+
#
|
4980
|
+
# @example Basic example
|
4981
|
+
# require "google/cloud/netapp/v1"
|
4982
|
+
#
|
4983
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4984
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
4985
|
+
#
|
4986
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4987
|
+
# request = Google::Cloud::NetApp::V1::ListBackupPoliciesRequest.new
|
4988
|
+
#
|
4989
|
+
# # Call the list_backup_policies method.
|
4990
|
+
# result = client.list_backup_policies request
|
4991
|
+
#
|
4992
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4993
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4994
|
+
# result.each do |item|
|
4995
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::BackupPolicy.
|
4996
|
+
# p item
|
4997
|
+
# end
|
4998
|
+
#
|
4999
|
+
def list_backup_policies request, options = nil
|
5000
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5001
|
+
|
5002
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest
|
5003
|
+
|
5004
|
+
# Converts hash and nil to an options object
|
5005
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5006
|
+
|
5007
|
+
# Customize the options with defaults
|
5008
|
+
metadata = @config.rpcs.list_backup_policies.metadata.to_h
|
5009
|
+
|
5010
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
5011
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5012
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5013
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
5014
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5015
|
+
|
5016
|
+
header_params = {}
|
5017
|
+
if request.parent
|
5018
|
+
header_params["parent"] = request.parent
|
5019
|
+
end
|
5020
|
+
|
5021
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5022
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5023
|
+
|
5024
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_policies.timeout,
|
5025
|
+
metadata: metadata,
|
5026
|
+
retry_policy: @config.rpcs.list_backup_policies.retry_policy
|
5027
|
+
|
5028
|
+
options.apply_defaults timeout: @config.timeout,
|
5029
|
+
metadata: @config.metadata,
|
5030
|
+
retry_policy: @config.retry_policy
|
5031
|
+
|
5032
|
+
@net_app_stub.call_rpc :list_backup_policies, request, options: options do |response, operation|
|
5033
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_policies, request, response, operation, options
|
5034
|
+
yield response, operation if block_given?
|
5035
|
+
return response
|
5036
|
+
end
|
5037
|
+
rescue ::GRPC::BadStatus => e
|
5038
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5039
|
+
end
|
5040
|
+
|
5041
|
+
##
|
5042
|
+
# Updates settings of a specific backup policy.
|
5043
|
+
#
|
5044
|
+
# @overload update_backup_policy(request, options = nil)
|
5045
|
+
# Pass arguments to `update_backup_policy` via a request object, either of type
|
5046
|
+
# {::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest} or an equivalent Hash.
|
5047
|
+
#
|
5048
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest, ::Hash]
|
5049
|
+
# A request object representing the call parameters. Required. To specify no
|
5050
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5051
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5052
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5053
|
+
#
|
5054
|
+
# @overload update_backup_policy(update_mask: nil, backup_policy: nil)
|
5055
|
+
# Pass arguments to `update_backup_policy` via keyword arguments. Note that at
|
5056
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5057
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5058
|
+
#
|
5059
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
5060
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
5061
|
+
# Backup Policy resource by the update.
|
5062
|
+
# The fields specified in the update_mask are relative to the resource, not
|
5063
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
5064
|
+
# user does not provide a mask then all fields will be overwritten.
|
5065
|
+
# @param backup_policy [::Google::Cloud::NetApp::V1::BackupPolicy, ::Hash]
|
5066
|
+
# Required. The backup policy being updated
|
5067
|
+
#
|
5068
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5069
|
+
# @yieldparam response [::Gapic::Operation]
|
5070
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5071
|
+
#
|
5072
|
+
# @return [::Gapic::Operation]
|
5073
|
+
#
|
5074
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5075
|
+
#
|
5076
|
+
# @example Basic example
|
5077
|
+
# require "google/cloud/netapp/v1"
|
5078
|
+
#
|
5079
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5080
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
5081
|
+
#
|
5082
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5083
|
+
# request = Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest.new
|
5084
|
+
#
|
5085
|
+
# # Call the update_backup_policy method.
|
5086
|
+
# result = client.update_backup_policy request
|
5087
|
+
#
|
5088
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
5089
|
+
# # check the status of an operation, cancel it, or wait for results.
|
5090
|
+
# # Here is how to wait for a response.
|
5091
|
+
# result.wait_until_done! timeout: 60
|
5092
|
+
# if result.response?
|
5093
|
+
# p result.response
|
5094
|
+
# else
|
5095
|
+
# puts "No response received."
|
5096
|
+
# end
|
5097
|
+
#
|
5098
|
+
def update_backup_policy request, options = nil
|
5099
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5100
|
+
|
5101
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest
|
5102
|
+
|
5103
|
+
# Converts hash and nil to an options object
|
5104
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5105
|
+
|
5106
|
+
# Customize the options with defaults
|
5107
|
+
metadata = @config.rpcs.update_backup_policy.metadata.to_h
|
5108
|
+
|
5109
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
5110
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5111
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5112
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
5113
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5114
|
+
|
5115
|
+
header_params = {}
|
5116
|
+
if request.backup_policy&.name
|
5117
|
+
header_params["backup_policy.name"] = request.backup_policy.name
|
5118
|
+
end
|
5119
|
+
|
5120
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5121
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5122
|
+
|
5123
|
+
options.apply_defaults timeout: @config.rpcs.update_backup_policy.timeout,
|
5124
|
+
metadata: metadata,
|
5125
|
+
retry_policy: @config.rpcs.update_backup_policy.retry_policy
|
5126
|
+
|
5127
|
+
options.apply_defaults timeout: @config.timeout,
|
5128
|
+
metadata: @config.metadata,
|
5129
|
+
retry_policy: @config.retry_policy
|
5130
|
+
|
5131
|
+
@net_app_stub.call_rpc :update_backup_policy, request, options: options do |response, operation|
|
5132
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5133
|
+
yield response, operation if block_given?
|
5134
|
+
return response
|
5135
|
+
end
|
5136
|
+
rescue ::GRPC::BadStatus => e
|
5137
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5138
|
+
end
|
5139
|
+
|
5140
|
+
##
|
5141
|
+
# Warning! This operation will permanently delete the backup policy.
|
5142
|
+
#
|
5143
|
+
# @overload delete_backup_policy(request, options = nil)
|
5144
|
+
# Pass arguments to `delete_backup_policy` via a request object, either of type
|
5145
|
+
# {::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest} or an equivalent Hash.
|
5146
|
+
#
|
5147
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest, ::Hash]
|
5148
|
+
# A request object representing the call parameters. Required. To specify no
|
5149
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5150
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5151
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5152
|
+
#
|
5153
|
+
# @overload delete_backup_policy(name: nil)
|
5154
|
+
# Pass arguments to `delete_backup_policy` via keyword arguments. Note that at
|
5155
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5156
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5157
|
+
#
|
5158
|
+
# @param name [::String]
|
5159
|
+
# Required. The backup policy resource name, in the format
|
5160
|
+
# `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
|
5161
|
+
#
|
5162
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5163
|
+
# @yieldparam response [::Gapic::Operation]
|
5164
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5165
|
+
#
|
5166
|
+
# @return [::Gapic::Operation]
|
5167
|
+
#
|
5168
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5169
|
+
#
|
5170
|
+
# @example Basic example
|
5171
|
+
# require "google/cloud/netapp/v1"
|
5172
|
+
#
|
5173
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5174
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
5175
|
+
#
|
5176
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5177
|
+
# request = Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest.new
|
5178
|
+
#
|
5179
|
+
# # Call the delete_backup_policy method.
|
5180
|
+
# result = client.delete_backup_policy request
|
5181
|
+
#
|
5182
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
5183
|
+
# # check the status of an operation, cancel it, or wait for results.
|
5184
|
+
# # Here is how to wait for a response.
|
5185
|
+
# result.wait_until_done! timeout: 60
|
5186
|
+
# if result.response?
|
5187
|
+
# p result.response
|
5188
|
+
# else
|
5189
|
+
# puts "No response received."
|
5190
|
+
# end
|
5191
|
+
#
|
5192
|
+
def delete_backup_policy request, options = nil
|
5193
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5194
|
+
|
5195
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest
|
5196
|
+
|
5197
|
+
# Converts hash and nil to an options object
|
5198
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5199
|
+
|
5200
|
+
# Customize the options with defaults
|
5201
|
+
metadata = @config.rpcs.delete_backup_policy.metadata.to_h
|
5202
|
+
|
5203
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
5204
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5205
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5206
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
5207
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5208
|
+
|
5209
|
+
header_params = {}
|
5210
|
+
if request.name
|
5211
|
+
header_params["name"] = request.name
|
5212
|
+
end
|
5213
|
+
|
5214
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5215
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5216
|
+
|
5217
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup_policy.timeout,
|
5218
|
+
metadata: metadata,
|
5219
|
+
retry_policy: @config.rpcs.delete_backup_policy.retry_policy
|
5220
|
+
|
5221
|
+
options.apply_defaults timeout: @config.timeout,
|
5222
|
+
metadata: @config.metadata,
|
5223
|
+
retry_policy: @config.retry_policy
|
5224
|
+
|
5225
|
+
@net_app_stub.call_rpc :delete_backup_policy, request, options: options do |response, operation|
|
5226
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5227
|
+
yield response, operation if block_given?
|
5228
|
+
return response
|
5229
|
+
end
|
5230
|
+
rescue ::GRPC::BadStatus => e
|
5231
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5232
|
+
end
|
5233
|
+
|
5234
|
+
##
|
5235
|
+
# Configuration class for the NetApp API.
|
5236
|
+
#
|
5237
|
+
# This class represents the configuration for NetApp,
|
5238
|
+
# providing control over timeouts, retry behavior, logging, transport
|
5239
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
5240
|
+
# applied individually to specific RPCs. See
|
5241
|
+
# {::Google::Cloud::NetApp::V1::NetApp::Client::Configuration::Rpcs}
|
5242
|
+
# for a list of RPCs that can be configured independently.
|
5243
|
+
#
|
5244
|
+
# Configuration can be applied globally to all clients, or to a single client
|
5245
|
+
# on construction.
|
5246
|
+
#
|
5247
|
+
# @example
|
5248
|
+
#
|
5249
|
+
# # Modify the global config, setting the timeout for
|
5250
|
+
# # list_storage_pools to 20 seconds,
|
5251
|
+
# # and all remaining timeouts to 10 seconds.
|
5252
|
+
# ::Google::Cloud::NetApp::V1::NetApp::Client.configure do |config|
|
5253
|
+
# config.timeout = 10.0
|
5254
|
+
# config.rpcs.list_storage_pools.timeout = 20.0
|
5255
|
+
# end
|
5256
|
+
#
|
5257
|
+
# # Apply the above configuration only to a new client.
|
5258
|
+
# client = ::Google::Cloud::NetApp::V1::NetApp::Client.new do |config|
|
5259
|
+
# config.timeout = 10.0
|
5260
|
+
# config.rpcs.list_storage_pools.timeout = 20.0
|
5261
|
+
# end
|
5262
|
+
#
|
5263
|
+
# @!attribute [rw] endpoint
|
5264
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
5265
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
5266
|
+
# @return [::String,nil]
|
5267
|
+
# @!attribute [rw] credentials
|
5268
|
+
# Credentials to send with calls. You may provide any of the following types:
|
5269
|
+
# * (`String`) The path to a service account key file in JSON format
|
5270
|
+
# * (`Hash`) A service account key as a Hash
|
5271
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
5272
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
5273
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
5274
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
5275
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
5276
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
5277
|
+
# * (`nil`) indicating no credentials
|
5278
|
+
# @return [::Object]
|
5279
|
+
# @!attribute [rw] scope
|
5280
|
+
# The OAuth scopes
|
5281
|
+
# @return [::Array<::String>]
|
5282
|
+
# @!attribute [rw] lib_name
|
5283
|
+
# The library name as recorded in instrumentation and logging
|
5284
|
+
# @return [::String]
|
5285
|
+
# @!attribute [rw] lib_version
|
5286
|
+
# The library version as recorded in instrumentation and logging
|
5287
|
+
# @return [::String]
|
5288
|
+
# @!attribute [rw] channel_args
|
5289
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
5290
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
5291
|
+
# @return [::Hash]
|
5292
|
+
# @!attribute [rw] interceptors
|
5293
|
+
# An array of interceptors that are run before calls are executed.
|
5294
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
5295
|
+
# @!attribute [rw] timeout
|
5296
|
+
# The call timeout in seconds.
|
5297
|
+
# @return [::Numeric]
|
5298
|
+
# @!attribute [rw] metadata
|
5299
|
+
# Additional gRPC headers to be sent with the call.
|
5300
|
+
# @return [::Hash{::Symbol=>::String}]
|
5301
|
+
# @!attribute [rw] retry_policy
|
5302
|
+
# The retry policy. The value is a hash with the following keys:
|
5303
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
5304
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
5305
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
5306
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
5307
|
+
# trigger a retry.
|
5308
|
+
# @return [::Hash]
|
5309
|
+
# @!attribute [rw] quota_project
|
5310
|
+
# A separate project against which to charge quota.
|
5311
|
+
# @return [::String]
|
5312
|
+
# @!attribute [rw] universe_domain
|
5313
|
+
# The universe domain within which to make requests. This determines the
|
5314
|
+
# default endpoint URL. The default value of nil uses the environment
|
5315
|
+
# universe (usually the default "googleapis.com" universe).
|
5316
|
+
# @return [::String,nil]
|
5317
|
+
#
|
5318
|
+
class Configuration
|
5319
|
+
extend ::Gapic::Config
|
5320
|
+
|
5321
|
+
# @private
|
5322
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
5323
|
+
DEFAULT_ENDPOINT = "netapp.googleapis.com"
|
5324
|
+
|
5325
|
+
config_attr :endpoint, nil, ::String, nil
|
5326
|
+
config_attr :credentials, nil do |value|
|
5327
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
5328
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
5329
|
+
allowed.any? { |klass| klass === value }
|
5330
|
+
end
|
5331
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
5332
|
+
config_attr :lib_name, nil, ::String, nil
|
5333
|
+
config_attr :lib_version, nil, ::String, nil
|
5334
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
5335
|
+
config_attr :interceptors, nil, ::Array, nil
|
5336
|
+
config_attr :timeout, nil, ::Numeric, nil
|
5337
|
+
config_attr :metadata, nil, ::Hash, nil
|
5338
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
5339
|
+
config_attr :quota_project, nil, ::String, nil
|
5340
|
+
config_attr :universe_domain, nil, ::String, nil
|
5341
|
+
|
5342
|
+
# @private
|
5343
|
+
def initialize parent_config = nil
|
5344
|
+
@parent_config = parent_config unless parent_config.nil?
|
5345
|
+
|
5346
|
+
yield self if block_given?
|
5347
|
+
end
|
5348
|
+
|
5349
|
+
##
|
5350
|
+
# Configurations for individual RPCs
|
5351
|
+
# @return [Rpcs]
|
5352
|
+
#
|
5353
|
+
def rpcs
|
5354
|
+
@rpcs ||= begin
|
5355
|
+
parent_rpcs = nil
|
5356
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
5357
|
+
Rpcs.new parent_rpcs
|
5358
|
+
end
|
5359
|
+
end
|
5360
|
+
|
5361
|
+
##
|
5362
|
+
# Configuration for the channel pool
|
5363
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
5364
|
+
#
|
5365
|
+
def channel_pool
|
5366
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
5367
|
+
end
|
5368
|
+
|
5369
|
+
##
|
5370
|
+
# Configuration RPC class for the NetApp API.
|
5371
|
+
#
|
5372
|
+
# Includes fields providing the configuration for each RPC in this service.
|
5373
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
5374
|
+
# the following configuration fields:
|
5375
|
+
#
|
3843
5376
|
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
3844
5377
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3845
5378
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
@@ -4031,6 +5564,81 @@ module Google
|
|
4031
5564
|
# @return [::Gapic::Config::Method]
|
4032
5565
|
#
|
4033
5566
|
attr_reader :reverse_replication_direction
|
5567
|
+
##
|
5568
|
+
# RPC-specific configuration for `create_backup_vault`
|
5569
|
+
# @return [::Gapic::Config::Method]
|
5570
|
+
#
|
5571
|
+
attr_reader :create_backup_vault
|
5572
|
+
##
|
5573
|
+
# RPC-specific configuration for `get_backup_vault`
|
5574
|
+
# @return [::Gapic::Config::Method]
|
5575
|
+
#
|
5576
|
+
attr_reader :get_backup_vault
|
5577
|
+
##
|
5578
|
+
# RPC-specific configuration for `list_backup_vaults`
|
5579
|
+
# @return [::Gapic::Config::Method]
|
5580
|
+
#
|
5581
|
+
attr_reader :list_backup_vaults
|
5582
|
+
##
|
5583
|
+
# RPC-specific configuration for `update_backup_vault`
|
5584
|
+
# @return [::Gapic::Config::Method]
|
5585
|
+
#
|
5586
|
+
attr_reader :update_backup_vault
|
5587
|
+
##
|
5588
|
+
# RPC-specific configuration for `delete_backup_vault`
|
5589
|
+
# @return [::Gapic::Config::Method]
|
5590
|
+
#
|
5591
|
+
attr_reader :delete_backup_vault
|
5592
|
+
##
|
5593
|
+
# RPC-specific configuration for `create_backup`
|
5594
|
+
# @return [::Gapic::Config::Method]
|
5595
|
+
#
|
5596
|
+
attr_reader :create_backup
|
5597
|
+
##
|
5598
|
+
# RPC-specific configuration for `get_backup`
|
5599
|
+
# @return [::Gapic::Config::Method]
|
5600
|
+
#
|
5601
|
+
attr_reader :get_backup
|
5602
|
+
##
|
5603
|
+
# RPC-specific configuration for `list_backups`
|
5604
|
+
# @return [::Gapic::Config::Method]
|
5605
|
+
#
|
5606
|
+
attr_reader :list_backups
|
5607
|
+
##
|
5608
|
+
# RPC-specific configuration for `delete_backup`
|
5609
|
+
# @return [::Gapic::Config::Method]
|
5610
|
+
#
|
5611
|
+
attr_reader :delete_backup
|
5612
|
+
##
|
5613
|
+
# RPC-specific configuration for `update_backup`
|
5614
|
+
# @return [::Gapic::Config::Method]
|
5615
|
+
#
|
5616
|
+
attr_reader :update_backup
|
5617
|
+
##
|
5618
|
+
# RPC-specific configuration for `create_backup_policy`
|
5619
|
+
# @return [::Gapic::Config::Method]
|
5620
|
+
#
|
5621
|
+
attr_reader :create_backup_policy
|
5622
|
+
##
|
5623
|
+
# RPC-specific configuration for `get_backup_policy`
|
5624
|
+
# @return [::Gapic::Config::Method]
|
5625
|
+
#
|
5626
|
+
attr_reader :get_backup_policy
|
5627
|
+
##
|
5628
|
+
# RPC-specific configuration for `list_backup_policies`
|
5629
|
+
# @return [::Gapic::Config::Method]
|
5630
|
+
#
|
5631
|
+
attr_reader :list_backup_policies
|
5632
|
+
##
|
5633
|
+
# RPC-specific configuration for `update_backup_policy`
|
5634
|
+
# @return [::Gapic::Config::Method]
|
5635
|
+
#
|
5636
|
+
attr_reader :update_backup_policy
|
5637
|
+
##
|
5638
|
+
# RPC-specific configuration for `delete_backup_policy`
|
5639
|
+
# @return [::Gapic::Config::Method]
|
5640
|
+
#
|
5641
|
+
attr_reader :delete_backup_policy
|
4034
5642
|
|
4035
5643
|
# @private
|
4036
5644
|
def initialize parent_rpcs = nil
|
@@ -4106,6 +5714,36 @@ module Google
|
|
4106
5714
|
@resume_replication = ::Gapic::Config::Method.new resume_replication_config
|
4107
5715
|
reverse_replication_direction_config = parent_rpcs.reverse_replication_direction if parent_rpcs.respond_to? :reverse_replication_direction
|
4108
5716
|
@reverse_replication_direction = ::Gapic::Config::Method.new reverse_replication_direction_config
|
5717
|
+
create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault
|
5718
|
+
@create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config
|
5719
|
+
get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault
|
5720
|
+
@get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config
|
5721
|
+
list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults
|
5722
|
+
@list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config
|
5723
|
+
update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault
|
5724
|
+
@update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config
|
5725
|
+
delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault
|
5726
|
+
@delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config
|
5727
|
+
create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
|
5728
|
+
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
5729
|
+
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
5730
|
+
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
5731
|
+
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
5732
|
+
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
5733
|
+
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
5734
|
+
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
5735
|
+
update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
|
5736
|
+
@update_backup = ::Gapic::Config::Method.new update_backup_config
|
5737
|
+
create_backup_policy_config = parent_rpcs.create_backup_policy if parent_rpcs.respond_to? :create_backup_policy
|
5738
|
+
@create_backup_policy = ::Gapic::Config::Method.new create_backup_policy_config
|
5739
|
+
get_backup_policy_config = parent_rpcs.get_backup_policy if parent_rpcs.respond_to? :get_backup_policy
|
5740
|
+
@get_backup_policy = ::Gapic::Config::Method.new get_backup_policy_config
|
5741
|
+
list_backup_policies_config = parent_rpcs.list_backup_policies if parent_rpcs.respond_to? :list_backup_policies
|
5742
|
+
@list_backup_policies = ::Gapic::Config::Method.new list_backup_policies_config
|
5743
|
+
update_backup_policy_config = parent_rpcs.update_backup_policy if parent_rpcs.respond_to? :update_backup_policy
|
5744
|
+
@update_backup_policy = ::Gapic::Config::Method.new update_backup_policy_config
|
5745
|
+
delete_backup_policy_config = parent_rpcs.delete_backup_policy if parent_rpcs.respond_to? :delete_backup_policy
|
5746
|
+
@delete_backup_policy = ::Gapic::Config::Method.new delete_backup_policy_config
|
4109
5747
|
|
4110
5748
|
yield self if block_given?
|
4111
5749
|
end
|