google-cloud-lustre-v1 1.0.1 → 1.2.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/README.md +1 -2
- data/lib/google/cloud/lustre/v1/bindings_override.rb +58 -1
- data/lib/google/cloud/lustre/v1/directory_policy_pb.rb +31 -0
- data/lib/google/cloud/lustre/v1/instance_pb.rb +16 -1
- data/lib/google/cloud/lustre/v1/lustre/client.rb +1249 -124
- data/lib/google/cloud/lustre/v1/lustre/credentials.rb +1 -1
- data/lib/google/cloud/lustre/v1/lustre/operations.rb +1 -1
- data/lib/google/cloud/lustre/v1/lustre/paths.rb +107 -1
- data/lib/google/cloud/lustre/v1/lustre/rest/client.rb +1173 -117
- data/lib/google/cloud/lustre/v1/lustre/rest/operations.rb +1 -1
- data/lib/google/cloud/lustre/v1/lustre/rest/service_stub.rb +615 -1
- data/lib/google/cloud/lustre/v1/lustre/rest.rb +1 -1
- data/lib/google/cloud/lustre/v1/lustre.rb +1 -1
- data/lib/google/cloud/lustre/v1/lustre_pb.rb +3 -1
- data/lib/google/cloud/lustre/v1/lustre_services_pb.rb +21 -1
- data/lib/google/cloud/lustre/v1/mirror_pb.rb +37 -0
- data/lib/google/cloud/lustre/v1/rest.rb +1 -1
- data/lib/google/cloud/lustre/v1/transfer_pb.rb +1 -1
- data/lib/google/cloud/lustre/v1/version.rb +1 -1
- data/lib/google/cloud/lustre/v1.rb +1 -1
- data/lib/google-cloud-lustre-v1.rb +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/field_info.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/cloud/lustre/v1/directory_policy.rb +142 -0
- data/proto_docs/google/cloud/lustre/v1/instance.rb +294 -7
- data/proto_docs/google/cloud/lustre/v1/mirror.rb +298 -0
- data/proto_docs/google/cloud/lustre/v1/transfer.rb +13 -1
- data/proto_docs/google/longrunning/operations.rb +1 -1
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/rpc/code.rb +1 -1
- data/proto_docs/google/rpc/status.rb +1 -1
- data/proto_docs/google/type/date.rb +56 -0
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/timeofday.rb +49 -0
- metadata +30 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -20,6 +20,7 @@ require "google/cloud/errors"
|
|
|
20
20
|
require "google/cloud/lustre/v1/lustre_pb"
|
|
21
21
|
require "google/cloud/lustre/v1/lustre/rest/service_stub"
|
|
22
22
|
require "google/cloud/location/rest"
|
|
23
|
+
require "google/iam/v1/rest"
|
|
23
24
|
|
|
24
25
|
module Google
|
|
25
26
|
module Cloud
|
|
@@ -180,6 +181,15 @@ module Google
|
|
|
180
181
|
config.bindings_override = @config.bindings_override
|
|
181
182
|
config.logger = @lustre_stub.logger if config.respond_to? :logger=
|
|
182
183
|
end
|
|
184
|
+
|
|
185
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
|
186
|
+
config.credentials = credentials
|
|
187
|
+
config.quota_project = @quota_project_id
|
|
188
|
+
config.endpoint = @lustre_stub.endpoint
|
|
189
|
+
config.universe_domain = @lustre_stub.universe_domain
|
|
190
|
+
config.bindings_override = @config.bindings_override
|
|
191
|
+
config.logger = @lustre_stub.logger if config.respond_to? :logger=
|
|
192
|
+
end
|
|
183
193
|
end
|
|
184
194
|
|
|
185
195
|
##
|
|
@@ -196,6 +206,13 @@ module Google
|
|
|
196
206
|
#
|
|
197
207
|
attr_reader :location_client
|
|
198
208
|
|
|
209
|
+
##
|
|
210
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
211
|
+
#
|
|
212
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
|
213
|
+
#
|
|
214
|
+
attr_reader :iam_policy_client
|
|
215
|
+
|
|
199
216
|
##
|
|
200
217
|
# The logger used for request/response debug logging.
|
|
201
218
|
#
|
|
@@ -618,7 +635,7 @@ module Google
|
|
|
618
635
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
619
636
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
620
637
|
#
|
|
621
|
-
# @overload delete_instance(name: nil, request_id: nil)
|
|
638
|
+
# @overload delete_instance(name: nil, request_id: nil, force: nil)
|
|
622
639
|
# Pass arguments to `delete_instance` via keyword arguments. Note that at
|
|
623
640
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
624
641
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -640,6 +657,10 @@ module Google
|
|
|
640
657
|
#
|
|
641
658
|
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
642
659
|
# not supported (00000000-0000-0000-0000-000000000000).
|
|
660
|
+
# @param force [::Boolean]
|
|
661
|
+
# Optional. If set to true, any sub-resources from this instance will also be
|
|
662
|
+
# deleted. Otherwise, the request will only work if the instance has no
|
|
663
|
+
# sub-resources.
|
|
643
664
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
644
665
|
# @yieldparam result [::Gapic::Operation]
|
|
645
666
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -707,6 +728,99 @@ module Google
|
|
|
707
728
|
raise ::Google::Cloud::Error.from_error(e)
|
|
708
729
|
end
|
|
709
730
|
|
|
731
|
+
##
|
|
732
|
+
# Reschedules a planned maintenance event for a specific instance.
|
|
733
|
+
#
|
|
734
|
+
# @overload reschedule_maintenance(request, options = nil)
|
|
735
|
+
# Pass arguments to `reschedule_maintenance` via a request object, either of type
|
|
736
|
+
# {::Google::Cloud::Lustre::V1::RescheduleMaintenanceRequest} or an equivalent Hash.
|
|
737
|
+
#
|
|
738
|
+
# @param request [::Google::Cloud::Lustre::V1::RescheduleMaintenanceRequest, ::Hash]
|
|
739
|
+
# A request object representing the call parameters. Required. To specify no
|
|
740
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
741
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
742
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
743
|
+
#
|
|
744
|
+
# @overload reschedule_maintenance(name: nil, reschedule: nil, request_id: nil)
|
|
745
|
+
# Pass arguments to `reschedule_maintenance` via keyword arguments. Note that at
|
|
746
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
747
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
748
|
+
#
|
|
749
|
+
# @param name [::String]
|
|
750
|
+
# Required. Format:
|
|
751
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}
|
|
752
|
+
# @param reschedule [::Google::Cloud::Lustre::V1::RescheduleMaintenanceRequest::Reschedule, ::Hash]
|
|
753
|
+
# Required. The desired reschedule settings.
|
|
754
|
+
# @param request_id [::String]
|
|
755
|
+
# Optional. A unique identifier for this request. A random UUID is
|
|
756
|
+
# recommended. This request is only idempotent if a `request_id` is provided.
|
|
757
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
758
|
+
# @yieldparam result [::Gapic::Operation]
|
|
759
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
760
|
+
#
|
|
761
|
+
# @return [::Gapic::Operation]
|
|
762
|
+
#
|
|
763
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
764
|
+
#
|
|
765
|
+
# @example Basic example
|
|
766
|
+
# require "google/cloud/lustre/v1"
|
|
767
|
+
#
|
|
768
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
769
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
770
|
+
#
|
|
771
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
772
|
+
# request = Google::Cloud::Lustre::V1::RescheduleMaintenanceRequest.new
|
|
773
|
+
#
|
|
774
|
+
# # Call the reschedule_maintenance method.
|
|
775
|
+
# result = client.reschedule_maintenance request
|
|
776
|
+
#
|
|
777
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
778
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
779
|
+
# # Here is how to wait for a response.
|
|
780
|
+
# result.wait_until_done! timeout: 60
|
|
781
|
+
# if result.response?
|
|
782
|
+
# p result.response
|
|
783
|
+
# else
|
|
784
|
+
# puts "No response received."
|
|
785
|
+
# end
|
|
786
|
+
#
|
|
787
|
+
def reschedule_maintenance request, options = nil
|
|
788
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
789
|
+
|
|
790
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::RescheduleMaintenanceRequest
|
|
791
|
+
|
|
792
|
+
# Converts hash and nil to an options object
|
|
793
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
794
|
+
|
|
795
|
+
# Customize the options with defaults
|
|
796
|
+
call_metadata = @config.rpcs.reschedule_maintenance.metadata.to_h
|
|
797
|
+
|
|
798
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
799
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
800
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
801
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
802
|
+
transports_version_send: [:rest]
|
|
803
|
+
|
|
804
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
805
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
806
|
+
|
|
807
|
+
options.apply_defaults timeout: @config.rpcs.reschedule_maintenance.timeout,
|
|
808
|
+
metadata: call_metadata,
|
|
809
|
+
retry_policy: @config.rpcs.reschedule_maintenance.retry_policy
|
|
810
|
+
|
|
811
|
+
options.apply_defaults timeout: @config.timeout,
|
|
812
|
+
metadata: @config.metadata,
|
|
813
|
+
retry_policy: @config.retry_policy
|
|
814
|
+
|
|
815
|
+
@lustre_stub.reschedule_maintenance request, options do |result, operation|
|
|
816
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
817
|
+
yield result, operation if block_given?
|
|
818
|
+
throw :response, result
|
|
819
|
+
end
|
|
820
|
+
rescue ::Gapic::Rest::Error => e
|
|
821
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
822
|
+
end
|
|
823
|
+
|
|
710
824
|
##
|
|
711
825
|
# Imports data from Cloud Storage to a Managed Lustre instance.
|
|
712
826
|
#
|
|
@@ -739,6 +853,12 @@ module Google
|
|
|
739
853
|
# @param service_account [::String]
|
|
740
854
|
# Optional. User-specified service account used to perform the transfer.
|
|
741
855
|
# If unspecified, the default Managed Lustre service agent will be used.
|
|
856
|
+
#
|
|
857
|
+
# Use one of the following formats:
|
|
858
|
+
#
|
|
859
|
+
# * `{EMAIL_ADDRESS_OR_UNIQUE_ID}`
|
|
860
|
+
# * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
|
|
861
|
+
# * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
|
|
742
862
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
743
863
|
# @yieldparam result [::Gapic::Operation]
|
|
744
864
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -840,6 +960,12 @@ module Google
|
|
|
840
960
|
# @param service_account [::String]
|
|
841
961
|
# Optional. User-specified service account used to perform the transfer.
|
|
842
962
|
# If unspecified, the Managed Lustre service agent is used.
|
|
963
|
+
#
|
|
964
|
+
# Use one of the following formats:
|
|
965
|
+
#
|
|
966
|
+
# * `{EMAIL_ADDRESS_OR_UNIQUE_ID}`
|
|
967
|
+
# * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
|
|
968
|
+
# * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
|
|
843
969
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
844
970
|
# @yieldparam result [::Gapic::Operation]
|
|
845
971
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -908,135 +1034,995 @@ module Google
|
|
|
908
1034
|
end
|
|
909
1035
|
|
|
910
1036
|
##
|
|
911
|
-
#
|
|
1037
|
+
# Creates a new mirror in a given instance.
|
|
912
1038
|
#
|
|
913
|
-
#
|
|
914
|
-
#
|
|
915
|
-
#
|
|
916
|
-
# applied individually to specific RPCs. See
|
|
917
|
-
# {::Google::Cloud::Lustre::V1::Lustre::Rest::Client::Configuration::Rpcs}
|
|
918
|
-
# for a list of RPCs that can be configured independently.
|
|
1039
|
+
# @overload create_mirror(request, options = nil)
|
|
1040
|
+
# Pass arguments to `create_mirror` via a request object, either of type
|
|
1041
|
+
# {::Google::Cloud::Lustre::V1::CreateMirrorRequest} or an equivalent Hash.
|
|
919
1042
|
#
|
|
920
|
-
#
|
|
921
|
-
#
|
|
1043
|
+
# @param request [::Google::Cloud::Lustre::V1::CreateMirrorRequest, ::Hash]
|
|
1044
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1045
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1046
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1047
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
922
1048
|
#
|
|
923
|
-
# @
|
|
1049
|
+
# @overload create_mirror(parent: nil, mirror_id: nil, mirror: nil, request_id: nil)
|
|
1050
|
+
# Pass arguments to `create_mirror` via keyword arguments. Note that at
|
|
1051
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1052
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
924
1053
|
#
|
|
925
|
-
#
|
|
926
|
-
#
|
|
927
|
-
#
|
|
928
|
-
#
|
|
929
|
-
#
|
|
930
|
-
# config.rpcs.list_instances.timeout = 20.0
|
|
931
|
-
# end
|
|
1054
|
+
# @param parent [::String]
|
|
1055
|
+
# Required. Parent instance resource where the mirror will be created, in the
|
|
1056
|
+
# format: `projects/{project}/locations/{location}/instances/{instance}`
|
|
1057
|
+
# @param mirror_id [::String]
|
|
1058
|
+
# Required. The ID to use for the mirror.
|
|
932
1059
|
#
|
|
933
|
-
#
|
|
934
|
-
#
|
|
935
|
-
#
|
|
936
|
-
#
|
|
937
|
-
# end
|
|
1060
|
+
# * Must contain only lowercase letters, numbers, and hyphens.
|
|
1061
|
+
# * Must start with a letter.
|
|
1062
|
+
# * Must be between 1-63 characters.
|
|
1063
|
+
# * Must end with a number or a letter.
|
|
938
1064
|
#
|
|
939
|
-
#
|
|
940
|
-
#
|
|
941
|
-
#
|
|
942
|
-
# @
|
|
943
|
-
#
|
|
944
|
-
#
|
|
945
|
-
#
|
|
946
|
-
#
|
|
947
|
-
#
|
|
948
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
949
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
950
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
951
|
-
# * (`nil`) indicating no credentials
|
|
1065
|
+
# The ID cannot be changed after the mirror is created.
|
|
1066
|
+
# @param mirror [::Google::Cloud::Lustre::V1::Mirror, ::Hash]
|
|
1067
|
+
# Required. The mirror to create.
|
|
1068
|
+
# @param request_id [::String]
|
|
1069
|
+
# Optional. The unique ID to identify requests. Specify a unique request ID
|
|
1070
|
+
# so that if you must retry your request, the server will know to ignore
|
|
1071
|
+
# the request if it has already been completed. The server guarantees that a
|
|
1072
|
+
# request doesn't result in creation of duplicate mirrors for at least 60
|
|
1073
|
+
# minutes.
|
|
952
1074
|
#
|
|
953
|
-
#
|
|
954
|
-
#
|
|
955
|
-
#
|
|
956
|
-
#
|
|
957
|
-
#
|
|
958
|
-
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
959
|
-
# @return [::Object]
|
|
960
|
-
# @!attribute [rw] scope
|
|
961
|
-
# The OAuth scopes
|
|
962
|
-
# @return [::Array<::String>]
|
|
963
|
-
# @!attribute [rw] lib_name
|
|
964
|
-
# The library name as recorded in instrumentation and logging
|
|
965
|
-
# @return [::String]
|
|
966
|
-
# @!attribute [rw] lib_version
|
|
967
|
-
# The library version as recorded in instrumentation and logging
|
|
968
|
-
# @return [::String]
|
|
969
|
-
# @!attribute [rw] timeout
|
|
970
|
-
# The call timeout in seconds.
|
|
971
|
-
# @return [::Numeric]
|
|
972
|
-
# @!attribute [rw] metadata
|
|
973
|
-
# Additional headers to be sent with the call.
|
|
974
|
-
# @return [::Hash{::Symbol=>::String}]
|
|
975
|
-
# @!attribute [rw] retry_policy
|
|
976
|
-
# The retry policy. The value is a hash with the following keys:
|
|
977
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
978
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
979
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
980
|
-
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
981
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
982
|
-
# trigger a retry.
|
|
983
|
-
# @return [::Hash]
|
|
984
|
-
# @!attribute [rw] quota_project
|
|
985
|
-
# A separate project against which to charge quota.
|
|
986
|
-
# @return [::String]
|
|
987
|
-
# @!attribute [rw] universe_domain
|
|
988
|
-
# The universe domain within which to make requests. This determines the
|
|
989
|
-
# default endpoint URL. The default value of nil uses the environment
|
|
990
|
-
# universe (usually the default "googleapis.com" universe).
|
|
991
|
-
# @return [::String,nil]
|
|
992
|
-
# @!attribute [rw] logger
|
|
993
|
-
# A custom logger to use for request/response debug logging, or the value
|
|
994
|
-
# `:default` (the default) to construct a default logger, or `nil` to
|
|
995
|
-
# explicitly disable logging.
|
|
996
|
-
# @return [::Logger,:default,nil]
|
|
1075
|
+
# For example, consider a situation where you make an initial request and the
|
|
1076
|
+
# request times out. If you make the request again with the same request
|
|
1077
|
+
# ID, the server can check if original operation with the same request ID
|
|
1078
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
1079
|
+
# clients from accidentally creating duplicate mirrors.
|
|
997
1080
|
#
|
|
998
|
-
|
|
999
|
-
|
|
1081
|
+
# The request ID must be a valid UUID version 4 with the exception that zero
|
|
1082
|
+
# UUID is not supported (`00000000-0000-0000-0000-000000000000`).
|
|
1083
|
+
# This request is only idempotent if a `request_id` is provided.
|
|
1084
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1085
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1086
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1087
|
+
#
|
|
1088
|
+
# @return [::Gapic::Operation]
|
|
1089
|
+
#
|
|
1090
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1091
|
+
#
|
|
1092
|
+
# @example Basic example
|
|
1093
|
+
# require "google/cloud/lustre/v1"
|
|
1094
|
+
#
|
|
1095
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1096
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1097
|
+
#
|
|
1098
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1099
|
+
# request = Google::Cloud::Lustre::V1::CreateMirrorRequest.new
|
|
1100
|
+
#
|
|
1101
|
+
# # Call the create_mirror method.
|
|
1102
|
+
# result = client.create_mirror request
|
|
1103
|
+
#
|
|
1104
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1105
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1106
|
+
# # Here is how to wait for a response.
|
|
1107
|
+
# result.wait_until_done! timeout: 60
|
|
1108
|
+
# if result.response?
|
|
1109
|
+
# p result.response
|
|
1110
|
+
# else
|
|
1111
|
+
# puts "No response received."
|
|
1112
|
+
# end
|
|
1113
|
+
#
|
|
1114
|
+
def create_mirror request, options = nil
|
|
1115
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1000
1116
|
|
|
1001
|
-
|
|
1002
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1003
|
-
DEFAULT_ENDPOINT = "lustre.googleapis.com"
|
|
1117
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::CreateMirrorRequest
|
|
1004
1118
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1008
|
-
allowed.any? { |klass| klass === value }
|
|
1009
|
-
end
|
|
1010
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
|
1011
|
-
config_attr :lib_name, nil, ::String, nil
|
|
1012
|
-
config_attr :lib_version, nil, ::String, nil
|
|
1013
|
-
config_attr :timeout, nil, ::Numeric, nil
|
|
1014
|
-
config_attr :metadata, nil, ::Hash, nil
|
|
1015
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1016
|
-
config_attr :quota_project, nil, ::String, nil
|
|
1017
|
-
config_attr :universe_domain, nil, ::String, nil
|
|
1119
|
+
# Converts hash and nil to an options object
|
|
1120
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1018
1121
|
|
|
1019
|
-
#
|
|
1020
|
-
|
|
1021
|
-
# are only used when this service is used as mixin, and only
|
|
1022
|
-
# by the host service.
|
|
1023
|
-
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
|
1024
|
-
config_attr :bindings_override, {}, ::Hash, nil
|
|
1025
|
-
config_attr :logger, :default, ::Logger, nil, :default
|
|
1122
|
+
# Customize the options with defaults
|
|
1123
|
+
call_metadata = @config.rpcs.create_mirror.metadata.to_h
|
|
1026
1124
|
|
|
1027
|
-
#
|
|
1028
|
-
|
|
1029
|
-
@
|
|
1125
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1126
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1127
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1128
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1129
|
+
transports_version_send: [:rest]
|
|
1030
1130
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1131
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1132
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1033
1133
|
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1134
|
+
options.apply_defaults timeout: @config.rpcs.create_mirror.timeout,
|
|
1135
|
+
metadata: call_metadata,
|
|
1136
|
+
retry_policy: @config.rpcs.create_mirror.retry_policy
|
|
1137
|
+
|
|
1138
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1139
|
+
metadata: @config.metadata,
|
|
1140
|
+
retry_policy: @config.retry_policy
|
|
1141
|
+
|
|
1142
|
+
@lustre_stub.create_mirror request, options do |result, operation|
|
|
1143
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1144
|
+
yield result, operation if block_given?
|
|
1145
|
+
throw :response, result
|
|
1146
|
+
end
|
|
1147
|
+
rescue ::Gapic::Rest::Error => e
|
|
1148
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1149
|
+
end
|
|
1150
|
+
|
|
1151
|
+
##
|
|
1152
|
+
# Updates the parameters of a single mirror.
|
|
1153
|
+
#
|
|
1154
|
+
# @overload update_mirror(request, options = nil)
|
|
1155
|
+
# Pass arguments to `update_mirror` via a request object, either of type
|
|
1156
|
+
# {::Google::Cloud::Lustre::V1::UpdateMirrorRequest} or an equivalent Hash.
|
|
1157
|
+
#
|
|
1158
|
+
# @param request [::Google::Cloud::Lustre::V1::UpdateMirrorRequest, ::Hash]
|
|
1159
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1160
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1161
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1162
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1163
|
+
#
|
|
1164
|
+
# @overload update_mirror(mirror: nil, update_mask: nil, request_id: nil)
|
|
1165
|
+
# Pass arguments to `update_mirror` via keyword arguments. Note that at
|
|
1166
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1167
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1168
|
+
#
|
|
1169
|
+
# @param mirror [::Google::Cloud::Lustre::V1::Mirror, ::Hash]
|
|
1170
|
+
# Required. Mirror to update. The mirror's `name` field is used to identify
|
|
1171
|
+
# the mirror to update, in the format:
|
|
1172
|
+
# `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
|
|
1173
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
1174
|
+
# Optional. Fields specified in the update_mask are relative to the resource,
|
|
1175
|
+
# not the full request. A field will be overwritten if it is in the mask. If
|
|
1176
|
+
# no mask is provided then all fields present in the request are overwritten.
|
|
1177
|
+
# @param request_id [::String]
|
|
1178
|
+
# Optional. The unique ID to identify requests. Specify a unique request ID
|
|
1179
|
+
# so that if you must retry your request, the server will know to ignore
|
|
1180
|
+
# the request if it has already been completed. The server guarantees that a
|
|
1181
|
+
# request doesn't result in the same update request being executed for at
|
|
1182
|
+
# least 60 minutes.
|
|
1183
|
+
#
|
|
1184
|
+
# For example, consider a situation where you make an initial request and the
|
|
1185
|
+
# request times out. If you make the request again with the same request
|
|
1186
|
+
# ID, the server can check if original operation with the same request ID
|
|
1187
|
+
# was received, and if so, will ignore the second request.
|
|
1188
|
+
#
|
|
1189
|
+
# The request ID must be a valid UUID version 4 with the exception that zero
|
|
1190
|
+
# UUID is not supported (`00000000-0000-0000-0000-000000000000`).
|
|
1191
|
+
# This request is only idempotent if a `request_id` is provided.
|
|
1192
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1193
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1194
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1195
|
+
#
|
|
1196
|
+
# @return [::Gapic::Operation]
|
|
1197
|
+
#
|
|
1198
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1199
|
+
#
|
|
1200
|
+
# @example Basic example
|
|
1201
|
+
# require "google/cloud/lustre/v1"
|
|
1202
|
+
#
|
|
1203
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1204
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1205
|
+
#
|
|
1206
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1207
|
+
# request = Google::Cloud::Lustre::V1::UpdateMirrorRequest.new
|
|
1208
|
+
#
|
|
1209
|
+
# # Call the update_mirror method.
|
|
1210
|
+
# result = client.update_mirror request
|
|
1211
|
+
#
|
|
1212
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1213
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1214
|
+
# # Here is how to wait for a response.
|
|
1215
|
+
# result.wait_until_done! timeout: 60
|
|
1216
|
+
# if result.response?
|
|
1217
|
+
# p result.response
|
|
1218
|
+
# else
|
|
1219
|
+
# puts "No response received."
|
|
1220
|
+
# end
|
|
1221
|
+
#
|
|
1222
|
+
def update_mirror request, options = nil
|
|
1223
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1224
|
+
|
|
1225
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::UpdateMirrorRequest
|
|
1226
|
+
|
|
1227
|
+
# Converts hash and nil to an options object
|
|
1228
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1229
|
+
|
|
1230
|
+
# Customize the options with defaults
|
|
1231
|
+
call_metadata = @config.rpcs.update_mirror.metadata.to_h
|
|
1232
|
+
|
|
1233
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1234
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1235
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1236
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1237
|
+
transports_version_send: [:rest]
|
|
1238
|
+
|
|
1239
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1240
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1241
|
+
|
|
1242
|
+
options.apply_defaults timeout: @config.rpcs.update_mirror.timeout,
|
|
1243
|
+
metadata: call_metadata,
|
|
1244
|
+
retry_policy: @config.rpcs.update_mirror.retry_policy
|
|
1245
|
+
|
|
1246
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1247
|
+
metadata: @config.metadata,
|
|
1248
|
+
retry_policy: @config.retry_policy
|
|
1249
|
+
|
|
1250
|
+
@lustre_stub.update_mirror request, options do |result, operation|
|
|
1251
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1252
|
+
yield result, operation if block_given?
|
|
1253
|
+
throw :response, result
|
|
1254
|
+
end
|
|
1255
|
+
rescue ::Gapic::Rest::Error => e
|
|
1256
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
##
|
|
1260
|
+
# Deletes a single mirror.
|
|
1261
|
+
#
|
|
1262
|
+
# @overload delete_mirror(request, options = nil)
|
|
1263
|
+
# Pass arguments to `delete_mirror` via a request object, either of type
|
|
1264
|
+
# {::Google::Cloud::Lustre::V1::DeleteMirrorRequest} or an equivalent Hash.
|
|
1265
|
+
#
|
|
1266
|
+
# @param request [::Google::Cloud::Lustre::V1::DeleteMirrorRequest, ::Hash]
|
|
1267
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1268
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1269
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1270
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1271
|
+
#
|
|
1272
|
+
# @overload delete_mirror(name: nil, request_id: nil)
|
|
1273
|
+
# Pass arguments to `delete_mirror` via keyword arguments. Note that at
|
|
1274
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1275
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1276
|
+
#
|
|
1277
|
+
# @param name [::String]
|
|
1278
|
+
# Required. Name of the mirror to delete, in the format:
|
|
1279
|
+
# `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
|
|
1280
|
+
# @param request_id [::String]
|
|
1281
|
+
# Optional. The unique ID to identify requests. Specify a unique request ID
|
|
1282
|
+
# so that if you must retry your request, the server will know to ignore
|
|
1283
|
+
# the request if it has already been completed. The server guarantees that a
|
|
1284
|
+
# request doesn't result in the same delete request being executed for at
|
|
1285
|
+
# least 60 minutes.
|
|
1286
|
+
#
|
|
1287
|
+
# For example, consider a situation where you make an initial request and the
|
|
1288
|
+
# request times out. If you make the request again with the same request
|
|
1289
|
+
# ID, the server can check if original operation with the same request ID
|
|
1290
|
+
# was received, and if so, will ignore the second request.
|
|
1291
|
+
#
|
|
1292
|
+
# The request ID must be a valid UUID version 4 with the exception that zero
|
|
1293
|
+
# UUID is not supported (`00000000-0000-0000-0000-000000000000`).
|
|
1294
|
+
# This request is only idempotent if a `request_id` is provided.
|
|
1295
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1296
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1297
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1298
|
+
#
|
|
1299
|
+
# @return [::Gapic::Operation]
|
|
1300
|
+
#
|
|
1301
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1302
|
+
#
|
|
1303
|
+
# @example Basic example
|
|
1304
|
+
# require "google/cloud/lustre/v1"
|
|
1305
|
+
#
|
|
1306
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1307
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1308
|
+
#
|
|
1309
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1310
|
+
# request = Google::Cloud::Lustre::V1::DeleteMirrorRequest.new
|
|
1311
|
+
#
|
|
1312
|
+
# # Call the delete_mirror method.
|
|
1313
|
+
# result = client.delete_mirror request
|
|
1314
|
+
#
|
|
1315
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1316
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1317
|
+
# # Here is how to wait for a response.
|
|
1318
|
+
# result.wait_until_done! timeout: 60
|
|
1319
|
+
# if result.response?
|
|
1320
|
+
# p result.response
|
|
1321
|
+
# else
|
|
1322
|
+
# puts "No response received."
|
|
1323
|
+
# end
|
|
1324
|
+
#
|
|
1325
|
+
def delete_mirror request, options = nil
|
|
1326
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1327
|
+
|
|
1328
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::DeleteMirrorRequest
|
|
1329
|
+
|
|
1330
|
+
# Converts hash and nil to an options object
|
|
1331
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1332
|
+
|
|
1333
|
+
# Customize the options with defaults
|
|
1334
|
+
call_metadata = @config.rpcs.delete_mirror.metadata.to_h
|
|
1335
|
+
|
|
1336
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1337
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1338
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1339
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1340
|
+
transports_version_send: [:rest]
|
|
1341
|
+
|
|
1342
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1343
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1344
|
+
|
|
1345
|
+
options.apply_defaults timeout: @config.rpcs.delete_mirror.timeout,
|
|
1346
|
+
metadata: call_metadata,
|
|
1347
|
+
retry_policy: @config.rpcs.delete_mirror.retry_policy
|
|
1348
|
+
|
|
1349
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1350
|
+
metadata: @config.metadata,
|
|
1351
|
+
retry_policy: @config.retry_policy
|
|
1352
|
+
|
|
1353
|
+
@lustre_stub.delete_mirror request, options do |result, operation|
|
|
1354
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1355
|
+
yield result, operation if block_given?
|
|
1356
|
+
throw :response, result
|
|
1357
|
+
end
|
|
1358
|
+
rescue ::Gapic::Rest::Error => e
|
|
1359
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
##
|
|
1363
|
+
# Gets details of a single mirror.
|
|
1364
|
+
#
|
|
1365
|
+
# @overload get_mirror(request, options = nil)
|
|
1366
|
+
# Pass arguments to `get_mirror` via a request object, either of type
|
|
1367
|
+
# {::Google::Cloud::Lustre::V1::GetMirrorRequest} or an equivalent Hash.
|
|
1368
|
+
#
|
|
1369
|
+
# @param request [::Google::Cloud::Lustre::V1::GetMirrorRequest, ::Hash]
|
|
1370
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1371
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1372
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1373
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1374
|
+
#
|
|
1375
|
+
# @overload get_mirror(name: nil)
|
|
1376
|
+
# Pass arguments to `get_mirror` via keyword arguments. Note that at
|
|
1377
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1378
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1379
|
+
#
|
|
1380
|
+
# @param name [::String]
|
|
1381
|
+
# Required. Name of the mirror to retrieve, in the format:
|
|
1382
|
+
# `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
|
|
1383
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1384
|
+
# @yieldparam result [::Google::Cloud::Lustre::V1::Mirror]
|
|
1385
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1386
|
+
#
|
|
1387
|
+
# @return [::Google::Cloud::Lustre::V1::Mirror]
|
|
1388
|
+
#
|
|
1389
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1390
|
+
#
|
|
1391
|
+
# @example Basic example
|
|
1392
|
+
# require "google/cloud/lustre/v1"
|
|
1393
|
+
#
|
|
1394
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1395
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1396
|
+
#
|
|
1397
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1398
|
+
# request = Google::Cloud::Lustre::V1::GetMirrorRequest.new
|
|
1399
|
+
#
|
|
1400
|
+
# # Call the get_mirror method.
|
|
1401
|
+
# result = client.get_mirror request
|
|
1402
|
+
#
|
|
1403
|
+
# # The returned object is of type Google::Cloud::Lustre::V1::Mirror.
|
|
1404
|
+
# p result
|
|
1405
|
+
#
|
|
1406
|
+
def get_mirror request, options = nil
|
|
1407
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1408
|
+
|
|
1409
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::GetMirrorRequest
|
|
1410
|
+
|
|
1411
|
+
# Converts hash and nil to an options object
|
|
1412
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1413
|
+
|
|
1414
|
+
# Customize the options with defaults
|
|
1415
|
+
call_metadata = @config.rpcs.get_mirror.metadata.to_h
|
|
1416
|
+
|
|
1417
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1418
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1419
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1420
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1421
|
+
transports_version_send: [:rest]
|
|
1422
|
+
|
|
1423
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1424
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1425
|
+
|
|
1426
|
+
options.apply_defaults timeout: @config.rpcs.get_mirror.timeout,
|
|
1427
|
+
metadata: call_metadata,
|
|
1428
|
+
retry_policy: @config.rpcs.get_mirror.retry_policy
|
|
1429
|
+
|
|
1430
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1431
|
+
metadata: @config.metadata,
|
|
1432
|
+
retry_policy: @config.retry_policy
|
|
1433
|
+
|
|
1434
|
+
@lustre_stub.get_mirror request, options do |result, operation|
|
|
1435
|
+
yield result, operation if block_given?
|
|
1436
|
+
end
|
|
1437
|
+
rescue ::Gapic::Rest::Error => e
|
|
1438
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1439
|
+
end
|
|
1440
|
+
|
|
1441
|
+
##
|
|
1442
|
+
# Gets details of multiple mirrors under a given instance.
|
|
1443
|
+
#
|
|
1444
|
+
# @overload list_mirrors(request, options = nil)
|
|
1445
|
+
# Pass arguments to `list_mirrors` via a request object, either of type
|
|
1446
|
+
# {::Google::Cloud::Lustre::V1::ListMirrorsRequest} or an equivalent Hash.
|
|
1447
|
+
#
|
|
1448
|
+
# @param request [::Google::Cloud::Lustre::V1::ListMirrorsRequest, ::Hash]
|
|
1449
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1450
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1451
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1452
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1453
|
+
#
|
|
1454
|
+
# @overload list_mirrors(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
|
|
1455
|
+
# Pass arguments to `list_mirrors` via keyword arguments. Note that at
|
|
1456
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1457
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1458
|
+
#
|
|
1459
|
+
# @param parent [::String]
|
|
1460
|
+
# Required. Parent instance resource where the mirrors will be listed, in the
|
|
1461
|
+
# format: `projects/{project}/locations/{location}/instances/{instance}`
|
|
1462
|
+
# @param page_size [::Integer]
|
|
1463
|
+
# Optional. Requested page size. The server might return fewer items than
|
|
1464
|
+
# requested. If unspecified, the default page size is 10. The maximum value
|
|
1465
|
+
# is 1000.
|
|
1466
|
+
# @param page_token [::String]
|
|
1467
|
+
# Optional. A page token, received from a previous `ListMirrors` call.
|
|
1468
|
+
# Provide this to retrieve the subsequent page.
|
|
1469
|
+
# When paginating, all other parameters provided to `ListMirrors` must match
|
|
1470
|
+
# the call that provided the page token.
|
|
1471
|
+
# @param order_by [::String]
|
|
1472
|
+
# Optional. Desired order of results.
|
|
1473
|
+
# @param filter [::String]
|
|
1474
|
+
# Optional. Filtering results.
|
|
1475
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1476
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Lustre::V1::Mirror>]
|
|
1477
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1478
|
+
#
|
|
1479
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Lustre::V1::Mirror>]
|
|
1480
|
+
#
|
|
1481
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1482
|
+
#
|
|
1483
|
+
# @example Basic example
|
|
1484
|
+
# require "google/cloud/lustre/v1"
|
|
1485
|
+
#
|
|
1486
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1487
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1488
|
+
#
|
|
1489
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1490
|
+
# request = Google::Cloud::Lustre::V1::ListMirrorsRequest.new
|
|
1491
|
+
#
|
|
1492
|
+
# # Call the list_mirrors method.
|
|
1493
|
+
# result = client.list_mirrors request
|
|
1494
|
+
#
|
|
1495
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1496
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1497
|
+
# result.each do |item|
|
|
1498
|
+
# # Each element is of type ::Google::Cloud::Lustre::V1::Mirror.
|
|
1499
|
+
# p item
|
|
1500
|
+
# end
|
|
1501
|
+
#
|
|
1502
|
+
def list_mirrors request, options = nil
|
|
1503
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1504
|
+
|
|
1505
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::ListMirrorsRequest
|
|
1506
|
+
|
|
1507
|
+
# Converts hash and nil to an options object
|
|
1508
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1509
|
+
|
|
1510
|
+
# Customize the options with defaults
|
|
1511
|
+
call_metadata = @config.rpcs.list_mirrors.metadata.to_h
|
|
1512
|
+
|
|
1513
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1514
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1515
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1516
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1517
|
+
transports_version_send: [:rest]
|
|
1518
|
+
|
|
1519
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1520
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1521
|
+
|
|
1522
|
+
options.apply_defaults timeout: @config.rpcs.list_mirrors.timeout,
|
|
1523
|
+
metadata: call_metadata,
|
|
1524
|
+
retry_policy: @config.rpcs.list_mirrors.retry_policy
|
|
1525
|
+
|
|
1526
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1527
|
+
metadata: @config.metadata,
|
|
1528
|
+
retry_policy: @config.retry_policy
|
|
1529
|
+
|
|
1530
|
+
@lustre_stub.list_mirrors request, options do |result, operation|
|
|
1531
|
+
result = ::Gapic::Rest::PagedEnumerable.new @lustre_stub, :list_mirrors, "mirrors", request, result, options
|
|
1532
|
+
yield result, operation if block_given?
|
|
1533
|
+
throw :response, result
|
|
1534
|
+
end
|
|
1535
|
+
rescue ::Gapic::Rest::Error => e
|
|
1536
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1537
|
+
end
|
|
1538
|
+
|
|
1539
|
+
##
|
|
1540
|
+
# Creates a directory policy resource.
|
|
1541
|
+
#
|
|
1542
|
+
# @overload create_directory_policy(request, options = nil)
|
|
1543
|
+
# Pass arguments to `create_directory_policy` via a request object, either of type
|
|
1544
|
+
# {::Google::Cloud::Lustre::V1::CreateDirectoryPolicyRequest} or an equivalent Hash.
|
|
1545
|
+
#
|
|
1546
|
+
# @param request [::Google::Cloud::Lustre::V1::CreateDirectoryPolicyRequest, ::Hash]
|
|
1547
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1548
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1549
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1550
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1551
|
+
#
|
|
1552
|
+
# @overload create_directory_policy(parent: nil, directory_policy_id: nil, directory_policy: nil)
|
|
1553
|
+
# Pass arguments to `create_directory_policy` via keyword arguments. Note that at
|
|
1554
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1555
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1556
|
+
#
|
|
1557
|
+
# @param parent [::String]
|
|
1558
|
+
# Required. The parent instance.
|
|
1559
|
+
# It must be in the format of
|
|
1560
|
+
# `projects/{project}/locations/{location}/instances/{instance}`.
|
|
1561
|
+
# @param directory_policy_id [::String]
|
|
1562
|
+
# Required. The ID for the DirectoryPolicy to create.
|
|
1563
|
+
# @param directory_policy [::Google::Cloud::Lustre::V1::DirectoryPolicy, ::Hash]
|
|
1564
|
+
# Required. The directory policy to create.
|
|
1565
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1566
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1567
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1568
|
+
#
|
|
1569
|
+
# @return [::Gapic::Operation]
|
|
1570
|
+
#
|
|
1571
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1572
|
+
#
|
|
1573
|
+
# @example Basic example
|
|
1574
|
+
# require "google/cloud/lustre/v1"
|
|
1575
|
+
#
|
|
1576
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1577
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1578
|
+
#
|
|
1579
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1580
|
+
# request = Google::Cloud::Lustre::V1::CreateDirectoryPolicyRequest.new
|
|
1581
|
+
#
|
|
1582
|
+
# # Call the create_directory_policy method.
|
|
1583
|
+
# result = client.create_directory_policy request
|
|
1584
|
+
#
|
|
1585
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1586
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1587
|
+
# # Here is how to wait for a response.
|
|
1588
|
+
# result.wait_until_done! timeout: 60
|
|
1589
|
+
# if result.response?
|
|
1590
|
+
# p result.response
|
|
1591
|
+
# else
|
|
1592
|
+
# puts "No response received."
|
|
1593
|
+
# end
|
|
1594
|
+
#
|
|
1595
|
+
def create_directory_policy request, options = nil
|
|
1596
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1597
|
+
|
|
1598
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::CreateDirectoryPolicyRequest
|
|
1599
|
+
|
|
1600
|
+
# Converts hash and nil to an options object
|
|
1601
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1602
|
+
|
|
1603
|
+
# Customize the options with defaults
|
|
1604
|
+
call_metadata = @config.rpcs.create_directory_policy.metadata.to_h
|
|
1605
|
+
|
|
1606
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1607
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1608
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1609
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1610
|
+
transports_version_send: [:rest]
|
|
1611
|
+
|
|
1612
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1613
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1614
|
+
|
|
1615
|
+
options.apply_defaults timeout: @config.rpcs.create_directory_policy.timeout,
|
|
1616
|
+
metadata: call_metadata,
|
|
1617
|
+
retry_policy: @config.rpcs.create_directory_policy.retry_policy
|
|
1618
|
+
|
|
1619
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1620
|
+
metadata: @config.metadata,
|
|
1621
|
+
retry_policy: @config.retry_policy
|
|
1622
|
+
|
|
1623
|
+
@lustre_stub.create_directory_policy request, options do |result, operation|
|
|
1624
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1625
|
+
yield result, operation if block_given?
|
|
1626
|
+
throw :response, result
|
|
1627
|
+
end
|
|
1628
|
+
rescue ::Gapic::Rest::Error => e
|
|
1629
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1630
|
+
end
|
|
1631
|
+
|
|
1632
|
+
##
|
|
1633
|
+
# Deletes a directory policy resource.
|
|
1634
|
+
#
|
|
1635
|
+
# @overload delete_directory_policy(request, options = nil)
|
|
1636
|
+
# Pass arguments to `delete_directory_policy` via a request object, either of type
|
|
1637
|
+
# {::Google::Cloud::Lustre::V1::DeleteDirectoryPolicyRequest} or an equivalent Hash.
|
|
1638
|
+
#
|
|
1639
|
+
# @param request [::Google::Cloud::Lustre::V1::DeleteDirectoryPolicyRequest, ::Hash]
|
|
1640
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1641
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1642
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1643
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1644
|
+
#
|
|
1645
|
+
# @overload delete_directory_policy(name: nil)
|
|
1646
|
+
# Pass arguments to `delete_directory_policy` via keyword arguments. Note that at
|
|
1647
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1648
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1649
|
+
#
|
|
1650
|
+
# @param name [::String]
|
|
1651
|
+
# Required. The resource name of the directory policy.
|
|
1652
|
+
# DirectoryPolicy names have the form
|
|
1653
|
+
# `projects/{project}/locations/{location}/instances/{instance}/directoryPolicies/{id}`.
|
|
1654
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1655
|
+
# @yieldparam result [::Gapic::Operation]
|
|
1656
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1657
|
+
#
|
|
1658
|
+
# @return [::Gapic::Operation]
|
|
1659
|
+
#
|
|
1660
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1661
|
+
#
|
|
1662
|
+
# @example Basic example
|
|
1663
|
+
# require "google/cloud/lustre/v1"
|
|
1664
|
+
#
|
|
1665
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1666
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1667
|
+
#
|
|
1668
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1669
|
+
# request = Google::Cloud::Lustre::V1::DeleteDirectoryPolicyRequest.new
|
|
1670
|
+
#
|
|
1671
|
+
# # Call the delete_directory_policy method.
|
|
1672
|
+
# result = client.delete_directory_policy request
|
|
1673
|
+
#
|
|
1674
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1675
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1676
|
+
# # Here is how to wait for a response.
|
|
1677
|
+
# result.wait_until_done! timeout: 60
|
|
1678
|
+
# if result.response?
|
|
1679
|
+
# p result.response
|
|
1680
|
+
# else
|
|
1681
|
+
# puts "No response received."
|
|
1682
|
+
# end
|
|
1683
|
+
#
|
|
1684
|
+
def delete_directory_policy request, options = nil
|
|
1685
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1686
|
+
|
|
1687
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::DeleteDirectoryPolicyRequest
|
|
1688
|
+
|
|
1689
|
+
# Converts hash and nil to an options object
|
|
1690
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1691
|
+
|
|
1692
|
+
# Customize the options with defaults
|
|
1693
|
+
call_metadata = @config.rpcs.delete_directory_policy.metadata.to_h
|
|
1694
|
+
|
|
1695
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1696
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1697
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1698
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1699
|
+
transports_version_send: [:rest]
|
|
1700
|
+
|
|
1701
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1702
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1703
|
+
|
|
1704
|
+
options.apply_defaults timeout: @config.rpcs.delete_directory_policy.timeout,
|
|
1705
|
+
metadata: call_metadata,
|
|
1706
|
+
retry_policy: @config.rpcs.delete_directory_policy.retry_policy
|
|
1707
|
+
|
|
1708
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1709
|
+
metadata: @config.metadata,
|
|
1710
|
+
retry_policy: @config.retry_policy
|
|
1711
|
+
|
|
1712
|
+
@lustre_stub.delete_directory_policy request, options do |result, operation|
|
|
1713
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
|
1714
|
+
yield result, operation if block_given?
|
|
1715
|
+
throw :response, result
|
|
1716
|
+
end
|
|
1717
|
+
rescue ::Gapic::Rest::Error => e
|
|
1718
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1719
|
+
end
|
|
1720
|
+
|
|
1721
|
+
##
|
|
1722
|
+
# Gets details of a single directory policy.
|
|
1723
|
+
#
|
|
1724
|
+
# @overload get_directory_policy(request, options = nil)
|
|
1725
|
+
# Pass arguments to `get_directory_policy` via a request object, either of type
|
|
1726
|
+
# {::Google::Cloud::Lustre::V1::GetDirectoryPolicyRequest} or an equivalent Hash.
|
|
1727
|
+
#
|
|
1728
|
+
# @param request [::Google::Cloud::Lustre::V1::GetDirectoryPolicyRequest, ::Hash]
|
|
1729
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1730
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1731
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1732
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1733
|
+
#
|
|
1734
|
+
# @overload get_directory_policy(name: nil)
|
|
1735
|
+
# Pass arguments to `get_directory_policy` via keyword arguments. Note that at
|
|
1736
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1737
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1738
|
+
#
|
|
1739
|
+
# @param name [::String]
|
|
1740
|
+
# Required. The resource name of the directory policy.
|
|
1741
|
+
# DirectoryPolicy names have the form
|
|
1742
|
+
# `projects/{project}/locations/{location}/instances/{instance}/directoryPolicies/{id}`.
|
|
1743
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1744
|
+
# @yieldparam result [::Google::Cloud::Lustre::V1::DirectoryPolicy]
|
|
1745
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1746
|
+
#
|
|
1747
|
+
# @return [::Google::Cloud::Lustre::V1::DirectoryPolicy]
|
|
1748
|
+
#
|
|
1749
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1750
|
+
#
|
|
1751
|
+
# @example Basic example
|
|
1752
|
+
# require "google/cloud/lustre/v1"
|
|
1753
|
+
#
|
|
1754
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1755
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1756
|
+
#
|
|
1757
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1758
|
+
# request = Google::Cloud::Lustre::V1::GetDirectoryPolicyRequest.new
|
|
1759
|
+
#
|
|
1760
|
+
# # Call the get_directory_policy method.
|
|
1761
|
+
# result = client.get_directory_policy request
|
|
1762
|
+
#
|
|
1763
|
+
# # The returned object is of type Google::Cloud::Lustre::V1::DirectoryPolicy.
|
|
1764
|
+
# p result
|
|
1765
|
+
#
|
|
1766
|
+
def get_directory_policy request, options = nil
|
|
1767
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1768
|
+
|
|
1769
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::GetDirectoryPolicyRequest
|
|
1770
|
+
|
|
1771
|
+
# Converts hash and nil to an options object
|
|
1772
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1773
|
+
|
|
1774
|
+
# Customize the options with defaults
|
|
1775
|
+
call_metadata = @config.rpcs.get_directory_policy.metadata.to_h
|
|
1776
|
+
|
|
1777
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1778
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1779
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1780
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1781
|
+
transports_version_send: [:rest]
|
|
1782
|
+
|
|
1783
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1784
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1785
|
+
|
|
1786
|
+
options.apply_defaults timeout: @config.rpcs.get_directory_policy.timeout,
|
|
1787
|
+
metadata: call_metadata,
|
|
1788
|
+
retry_policy: @config.rpcs.get_directory_policy.retry_policy
|
|
1789
|
+
|
|
1790
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1791
|
+
metadata: @config.metadata,
|
|
1792
|
+
retry_policy: @config.retry_policy
|
|
1793
|
+
|
|
1794
|
+
@lustre_stub.get_directory_policy request, options do |result, operation|
|
|
1795
|
+
yield result, operation if block_given?
|
|
1796
|
+
end
|
|
1797
|
+
rescue ::Gapic::Rest::Error => e
|
|
1798
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1799
|
+
end
|
|
1800
|
+
|
|
1801
|
+
##
|
|
1802
|
+
# Gets details of multiple directory policies under a given instance.
|
|
1803
|
+
#
|
|
1804
|
+
# @overload list_directory_policies(request, options = nil)
|
|
1805
|
+
# Pass arguments to `list_directory_policies` via a request object, either of type
|
|
1806
|
+
# {::Google::Cloud::Lustre::V1::ListDirectoryPoliciesRequest} or an equivalent Hash.
|
|
1807
|
+
#
|
|
1808
|
+
# @param request [::Google::Cloud::Lustre::V1::ListDirectoryPoliciesRequest, ::Hash]
|
|
1809
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1810
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1811
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1812
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1813
|
+
#
|
|
1814
|
+
# @overload list_directory_policies(parent: nil, page_size: nil, page_token: nil)
|
|
1815
|
+
# Pass arguments to `list_directory_policies` via keyword arguments. Note that at
|
|
1816
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1817
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1818
|
+
#
|
|
1819
|
+
# @param parent [::String]
|
|
1820
|
+
# Required. The parent instance.
|
|
1821
|
+
# It must be in the format of
|
|
1822
|
+
# `projects/{project}/locations/{location}/instances/{instance}`.
|
|
1823
|
+
# @param page_size [::Integer]
|
|
1824
|
+
# Optional. Requested page size. Server might return fewer items than
|
|
1825
|
+
# requested. If unspecified, the server will pick an appropriate default. The
|
|
1826
|
+
# maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
1827
|
+
# @param page_token [::String]
|
|
1828
|
+
# Optional. A page token, received from a previous `ListDirectoryPolicies`
|
|
1829
|
+
# call. Provide this to retrieve the subsequent page. When paginating, all
|
|
1830
|
+
# other parameters provided to `ListDirectoryPolicies` must match the call
|
|
1831
|
+
# that provided the page token.
|
|
1832
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1833
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Lustre::V1::DirectoryPolicy>]
|
|
1834
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1835
|
+
#
|
|
1836
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Lustre::V1::DirectoryPolicy>]
|
|
1837
|
+
#
|
|
1838
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1839
|
+
#
|
|
1840
|
+
# @example Basic example
|
|
1841
|
+
# require "google/cloud/lustre/v1"
|
|
1842
|
+
#
|
|
1843
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1844
|
+
# client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
|
|
1845
|
+
#
|
|
1846
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1847
|
+
# request = Google::Cloud::Lustre::V1::ListDirectoryPoliciesRequest.new
|
|
1848
|
+
#
|
|
1849
|
+
# # Call the list_directory_policies method.
|
|
1850
|
+
# result = client.list_directory_policies request
|
|
1851
|
+
#
|
|
1852
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1853
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1854
|
+
# result.each do |item|
|
|
1855
|
+
# # Each element is of type ::Google::Cloud::Lustre::V1::DirectoryPolicy.
|
|
1856
|
+
# p item
|
|
1857
|
+
# end
|
|
1858
|
+
#
|
|
1859
|
+
def list_directory_policies request, options = nil
|
|
1860
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1861
|
+
|
|
1862
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::ListDirectoryPoliciesRequest
|
|
1863
|
+
|
|
1864
|
+
# Converts hash and nil to an options object
|
|
1865
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1866
|
+
|
|
1867
|
+
# Customize the options with defaults
|
|
1868
|
+
call_metadata = @config.rpcs.list_directory_policies.metadata.to_h
|
|
1869
|
+
|
|
1870
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1871
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1872
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1873
|
+
gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
|
|
1874
|
+
transports_version_send: [:rest]
|
|
1875
|
+
|
|
1876
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1877
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1878
|
+
|
|
1879
|
+
options.apply_defaults timeout: @config.rpcs.list_directory_policies.timeout,
|
|
1880
|
+
metadata: call_metadata,
|
|
1881
|
+
retry_policy: @config.rpcs.list_directory_policies.retry_policy
|
|
1882
|
+
|
|
1883
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1884
|
+
metadata: @config.metadata,
|
|
1885
|
+
retry_policy: @config.retry_policy
|
|
1886
|
+
|
|
1887
|
+
@lustre_stub.list_directory_policies request, options do |result, operation|
|
|
1888
|
+
result = ::Gapic::Rest::PagedEnumerable.new @lustre_stub, :list_directory_policies, "directory_policies", request, result, options
|
|
1889
|
+
yield result, operation if block_given?
|
|
1890
|
+
throw :response, result
|
|
1891
|
+
end
|
|
1892
|
+
rescue ::Gapic::Rest::Error => e
|
|
1893
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1894
|
+
end
|
|
1895
|
+
|
|
1896
|
+
##
|
|
1897
|
+
# Configuration class for the Lustre REST API.
|
|
1898
|
+
#
|
|
1899
|
+
# This class represents the configuration for Lustre REST,
|
|
1900
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1901
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1902
|
+
# applied individually to specific RPCs. See
|
|
1903
|
+
# {::Google::Cloud::Lustre::V1::Lustre::Rest::Client::Configuration::Rpcs}
|
|
1904
|
+
# for a list of RPCs that can be configured independently.
|
|
1905
|
+
#
|
|
1906
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1907
|
+
# on construction.
|
|
1908
|
+
#
|
|
1909
|
+
# @example
|
|
1910
|
+
#
|
|
1911
|
+
# # Modify the global config, setting the timeout for
|
|
1912
|
+
# # list_instances to 20 seconds,
|
|
1913
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1914
|
+
# ::Google::Cloud::Lustre::V1::Lustre::Rest::Client.configure do |config|
|
|
1915
|
+
# config.timeout = 10.0
|
|
1916
|
+
# config.rpcs.list_instances.timeout = 20.0
|
|
1917
|
+
# end
|
|
1918
|
+
#
|
|
1919
|
+
# # Apply the above configuration only to a new client.
|
|
1920
|
+
# client = ::Google::Cloud::Lustre::V1::Lustre::Rest::Client.new do |config|
|
|
1921
|
+
# config.timeout = 10.0
|
|
1922
|
+
# config.rpcs.list_instances.timeout = 20.0
|
|
1923
|
+
# end
|
|
1924
|
+
#
|
|
1925
|
+
# @!attribute [rw] endpoint
|
|
1926
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1927
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1928
|
+
# @return [::String,nil]
|
|
1929
|
+
# @!attribute [rw] credentials
|
|
1930
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1931
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
1932
|
+
# * (`Hash`) A service account key as a Hash
|
|
1933
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1934
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1935
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1936
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1937
|
+
# * (`nil`) indicating no credentials
|
|
1938
|
+
#
|
|
1939
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1940
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1941
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1942
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1943
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1944
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1945
|
+
# @return [::Object]
|
|
1946
|
+
# @!attribute [rw] scope
|
|
1947
|
+
# The OAuth scopes
|
|
1948
|
+
# @return [::Array<::String>]
|
|
1949
|
+
# @!attribute [rw] lib_name
|
|
1950
|
+
# The library name as recorded in instrumentation and logging
|
|
1951
|
+
# @return [::String]
|
|
1952
|
+
# @!attribute [rw] lib_version
|
|
1953
|
+
# The library version as recorded in instrumentation and logging
|
|
1954
|
+
# @return [::String]
|
|
1955
|
+
# @!attribute [rw] timeout
|
|
1956
|
+
# The call timeout in seconds.
|
|
1957
|
+
# @return [::Numeric]
|
|
1958
|
+
# @!attribute [rw] metadata
|
|
1959
|
+
# Additional headers to be sent with the call.
|
|
1960
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1961
|
+
# @!attribute [rw] retry_policy
|
|
1962
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1963
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1964
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1965
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1966
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1967
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1968
|
+
# trigger a retry.
|
|
1969
|
+
# @return [::Hash]
|
|
1970
|
+
# @!attribute [rw] quota_project
|
|
1971
|
+
# A separate project against which to charge quota.
|
|
1972
|
+
# @return [::String]
|
|
1973
|
+
# @!attribute [rw] universe_domain
|
|
1974
|
+
# The universe domain within which to make requests. This determines the
|
|
1975
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1976
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1977
|
+
# @return [::String,nil]
|
|
1978
|
+
# @!attribute [rw] logger
|
|
1979
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1980
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1981
|
+
# explicitly disable logging.
|
|
1982
|
+
# @return [::Logger,:default,nil]
|
|
1983
|
+
#
|
|
1984
|
+
class Configuration
|
|
1985
|
+
extend ::Gapic::Config
|
|
1986
|
+
|
|
1987
|
+
# @private
|
|
1988
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1989
|
+
DEFAULT_ENDPOINT = "lustre.googleapis.com"
|
|
1990
|
+
|
|
1991
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1992
|
+
config_attr :credentials, nil do |value|
|
|
1993
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1994
|
+
allowed.any? { |klass| klass === value }
|
|
1995
|
+
end
|
|
1996
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1997
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1998
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1999
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
2000
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
2001
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
2002
|
+
config_attr :quota_project, nil, ::String, nil
|
|
2003
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
2004
|
+
|
|
2005
|
+
# @private
|
|
2006
|
+
# Overrides for http bindings for the RPCs of this service
|
|
2007
|
+
# are only used when this service is used as mixin, and only
|
|
2008
|
+
# by the host service.
|
|
2009
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
|
2010
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
|
2011
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
2012
|
+
|
|
2013
|
+
# @private
|
|
2014
|
+
def initialize parent_config = nil
|
|
2015
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
2016
|
+
|
|
2017
|
+
yield self if block_given?
|
|
2018
|
+
end
|
|
2019
|
+
|
|
2020
|
+
##
|
|
2021
|
+
# Configurations for individual RPCs
|
|
2022
|
+
# @return [Rpcs]
|
|
2023
|
+
#
|
|
2024
|
+
def rpcs
|
|
2025
|
+
@rpcs ||= begin
|
|
1040
2026
|
parent_rpcs = nil
|
|
1041
2027
|
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1042
2028
|
Rpcs.new parent_rpcs
|
|
@@ -1088,6 +2074,11 @@ module Google
|
|
|
1088
2074
|
#
|
|
1089
2075
|
attr_reader :delete_instance
|
|
1090
2076
|
##
|
|
2077
|
+
# RPC-specific configuration for `reschedule_maintenance`
|
|
2078
|
+
# @return [::Gapic::Config::Method]
|
|
2079
|
+
#
|
|
2080
|
+
attr_reader :reschedule_maintenance
|
|
2081
|
+
##
|
|
1091
2082
|
# RPC-specific configuration for `import_data`
|
|
1092
2083
|
# @return [::Gapic::Config::Method]
|
|
1093
2084
|
#
|
|
@@ -1097,6 +2088,51 @@ module Google
|
|
|
1097
2088
|
# @return [::Gapic::Config::Method]
|
|
1098
2089
|
#
|
|
1099
2090
|
attr_reader :export_data
|
|
2091
|
+
##
|
|
2092
|
+
# RPC-specific configuration for `create_mirror`
|
|
2093
|
+
# @return [::Gapic::Config::Method]
|
|
2094
|
+
#
|
|
2095
|
+
attr_reader :create_mirror
|
|
2096
|
+
##
|
|
2097
|
+
# RPC-specific configuration for `update_mirror`
|
|
2098
|
+
# @return [::Gapic::Config::Method]
|
|
2099
|
+
#
|
|
2100
|
+
attr_reader :update_mirror
|
|
2101
|
+
##
|
|
2102
|
+
# RPC-specific configuration for `delete_mirror`
|
|
2103
|
+
# @return [::Gapic::Config::Method]
|
|
2104
|
+
#
|
|
2105
|
+
attr_reader :delete_mirror
|
|
2106
|
+
##
|
|
2107
|
+
# RPC-specific configuration for `get_mirror`
|
|
2108
|
+
# @return [::Gapic::Config::Method]
|
|
2109
|
+
#
|
|
2110
|
+
attr_reader :get_mirror
|
|
2111
|
+
##
|
|
2112
|
+
# RPC-specific configuration for `list_mirrors`
|
|
2113
|
+
# @return [::Gapic::Config::Method]
|
|
2114
|
+
#
|
|
2115
|
+
attr_reader :list_mirrors
|
|
2116
|
+
##
|
|
2117
|
+
# RPC-specific configuration for `create_directory_policy`
|
|
2118
|
+
# @return [::Gapic::Config::Method]
|
|
2119
|
+
#
|
|
2120
|
+
attr_reader :create_directory_policy
|
|
2121
|
+
##
|
|
2122
|
+
# RPC-specific configuration for `delete_directory_policy`
|
|
2123
|
+
# @return [::Gapic::Config::Method]
|
|
2124
|
+
#
|
|
2125
|
+
attr_reader :delete_directory_policy
|
|
2126
|
+
##
|
|
2127
|
+
# RPC-specific configuration for `get_directory_policy`
|
|
2128
|
+
# @return [::Gapic::Config::Method]
|
|
2129
|
+
#
|
|
2130
|
+
attr_reader :get_directory_policy
|
|
2131
|
+
##
|
|
2132
|
+
# RPC-specific configuration for `list_directory_policies`
|
|
2133
|
+
# @return [::Gapic::Config::Method]
|
|
2134
|
+
#
|
|
2135
|
+
attr_reader :list_directory_policies
|
|
1100
2136
|
|
|
1101
2137
|
# @private
|
|
1102
2138
|
def initialize parent_rpcs = nil
|
|
@@ -1110,10 +2146,30 @@ module Google
|
|
|
1110
2146
|
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
|
1111
2147
|
delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
|
|
1112
2148
|
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
|
2149
|
+
reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance
|
|
2150
|
+
@reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config
|
|
1113
2151
|
import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
|
|
1114
2152
|
@import_data = ::Gapic::Config::Method.new import_data_config
|
|
1115
2153
|
export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
|
|
1116
2154
|
@export_data = ::Gapic::Config::Method.new export_data_config
|
|
2155
|
+
create_mirror_config = parent_rpcs.create_mirror if parent_rpcs.respond_to? :create_mirror
|
|
2156
|
+
@create_mirror = ::Gapic::Config::Method.new create_mirror_config
|
|
2157
|
+
update_mirror_config = parent_rpcs.update_mirror if parent_rpcs.respond_to? :update_mirror
|
|
2158
|
+
@update_mirror = ::Gapic::Config::Method.new update_mirror_config
|
|
2159
|
+
delete_mirror_config = parent_rpcs.delete_mirror if parent_rpcs.respond_to? :delete_mirror
|
|
2160
|
+
@delete_mirror = ::Gapic::Config::Method.new delete_mirror_config
|
|
2161
|
+
get_mirror_config = parent_rpcs.get_mirror if parent_rpcs.respond_to? :get_mirror
|
|
2162
|
+
@get_mirror = ::Gapic::Config::Method.new get_mirror_config
|
|
2163
|
+
list_mirrors_config = parent_rpcs.list_mirrors if parent_rpcs.respond_to? :list_mirrors
|
|
2164
|
+
@list_mirrors = ::Gapic::Config::Method.new list_mirrors_config
|
|
2165
|
+
create_directory_policy_config = parent_rpcs.create_directory_policy if parent_rpcs.respond_to? :create_directory_policy
|
|
2166
|
+
@create_directory_policy = ::Gapic::Config::Method.new create_directory_policy_config
|
|
2167
|
+
delete_directory_policy_config = parent_rpcs.delete_directory_policy if parent_rpcs.respond_to? :delete_directory_policy
|
|
2168
|
+
@delete_directory_policy = ::Gapic::Config::Method.new delete_directory_policy_config
|
|
2169
|
+
get_directory_policy_config = parent_rpcs.get_directory_policy if parent_rpcs.respond_to? :get_directory_policy
|
|
2170
|
+
@get_directory_policy = ::Gapic::Config::Method.new get_directory_policy_config
|
|
2171
|
+
list_directory_policies_config = parent_rpcs.list_directory_policies if parent_rpcs.respond_to? :list_directory_policies
|
|
2172
|
+
@list_directory_policies = ::Gapic::Config::Method.new list_directory_policies_config
|
|
1117
2173
|
|
|
1118
2174
|
yield self if block_given?
|
|
1119
2175
|
end
|