google-cloud-dataplex-v1 0.1.0 → 0.3.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 +6 -6
- data/README.md +13 -8
- data/lib/google/cloud/dataplex/v1/analyze_pb.rb +117 -0
- data/lib/google/cloud/dataplex/v1/content_pb.rb +65 -0
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +798 -0
- data/lib/google/cloud/dataplex/v1/content_service/credentials.rb +47 -0
- data/lib/google/cloud/dataplex/v1/content_service/paths.rb +73 -0
- data/lib/google/cloud/dataplex/v1/content_service.rb +49 -0
- data/lib/google/cloud/dataplex/v1/content_services_pb.rb +53 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +637 -1
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +3 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +21 -0
- data/lib/google/cloud/dataplex/v1/logs_pb.rb +2 -2
- data/lib/google/cloud/dataplex/v1/metadata_pb.rb +29 -2
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +531 -10
- data/lib/google/cloud/dataplex/v1/metadata_services_pb.rb +10 -0
- data/lib/google/cloud/dataplex/v1/resources_pb.rb +2 -2
- data/lib/google/cloud/dataplex/v1/service_pb.rb +48 -1
- data/lib/google/cloud/dataplex/v1/service_services_pb.rb +13 -0
- data/lib/google/cloud/dataplex/v1/tasks_pb.rb +2 -2
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/lib/google/cloud/dataplex/v1.rb +4 -1
- data/proto_docs/google/cloud/dataplex/v1/analyze.rb +281 -0
- data/proto_docs/google/cloud/dataplex/v1/content.rb +142 -0
- data/proto_docs/google/cloud/dataplex/v1/metadata.rb +182 -36
- data/proto_docs/google/cloud/dataplex/v1/resources.rb +0 -7
- data/proto_docs/google/cloud/dataplex/v1/service.rb +137 -1
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +21 -12
@@ -272,7 +272,7 @@ module Google
|
|
272
272
|
#
|
273
273
|
# @param parent [::String]
|
274
274
|
# Required. The resource name of the lake location, of the form:
|
275
|
-
#
|
275
|
+
# projects/\\{project_number}/locations/\\{location_id}
|
276
276
|
# where `location_id` refers to a GCP region.
|
277
277
|
# @param lake_id [::String]
|
278
278
|
# Required. Lake identifier.
|
@@ -2800,6 +2800,600 @@ module Google
|
|
2800
2800
|
raise ::Google::Cloud::Error.from_error(e)
|
2801
2801
|
end
|
2802
2802
|
|
2803
|
+
##
|
2804
|
+
# Create an environment resource.
|
2805
|
+
#
|
2806
|
+
# @overload create_environment(request, options = nil)
|
2807
|
+
# Pass arguments to `create_environment` via a request object, either of type
|
2808
|
+
# {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash.
|
2809
|
+
#
|
2810
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash]
|
2811
|
+
# A request object representing the call parameters. Required. To specify no
|
2812
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2813
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2814
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2815
|
+
#
|
2816
|
+
# @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil)
|
2817
|
+
# Pass arguments to `create_environment` via keyword arguments. Note that at
|
2818
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2819
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2820
|
+
#
|
2821
|
+
# @param parent [::String]
|
2822
|
+
# Required. The resource name of the parent lake:
|
2823
|
+
# projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}
|
2824
|
+
# @param environment_id [::String]
|
2825
|
+
# Required. Environment identifier.
|
2826
|
+
# * Must contain only lowercase letters, numbers and hyphens.
|
2827
|
+
# * Must start with a letter.
|
2828
|
+
# * Must be between 1-63 characters.
|
2829
|
+
# * Must end with a number or a letter.
|
2830
|
+
# * Must be unique within the lake.
|
2831
|
+
# @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash]
|
2832
|
+
# Required. Environment resource.
|
2833
|
+
# @param validate_only [::Boolean]
|
2834
|
+
# Optional. Only validate the request, but do not perform mutations.
|
2835
|
+
# The default is false.
|
2836
|
+
#
|
2837
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2838
|
+
# @yieldparam response [::Gapic::Operation]
|
2839
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2840
|
+
#
|
2841
|
+
# @return [::Gapic::Operation]
|
2842
|
+
#
|
2843
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2844
|
+
#
|
2845
|
+
# @example Basic example
|
2846
|
+
# require "google/cloud/dataplex/v1"
|
2847
|
+
#
|
2848
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2849
|
+
# client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
|
2850
|
+
#
|
2851
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2852
|
+
# request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new
|
2853
|
+
#
|
2854
|
+
# # Call the create_environment method.
|
2855
|
+
# result = client.create_environment request
|
2856
|
+
#
|
2857
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2858
|
+
# # object to check the status of an operation, cancel it, or wait
|
2859
|
+
# # for results. Here is how to block until completion:
|
2860
|
+
# result.wait_until_done! timeout: 60
|
2861
|
+
# if result.response?
|
2862
|
+
# p result.response
|
2863
|
+
# else
|
2864
|
+
# puts "Error!"
|
2865
|
+
# end
|
2866
|
+
#
|
2867
|
+
def create_environment request, options = nil
|
2868
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2869
|
+
|
2870
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest
|
2871
|
+
|
2872
|
+
# Converts hash and nil to an options object
|
2873
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2874
|
+
|
2875
|
+
# Customize the options with defaults
|
2876
|
+
metadata = @config.rpcs.create_environment.metadata.to_h
|
2877
|
+
|
2878
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2879
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2880
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2881
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
2882
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2883
|
+
|
2884
|
+
header_params = {}
|
2885
|
+
if request.parent
|
2886
|
+
header_params["parent"] = request.parent
|
2887
|
+
end
|
2888
|
+
|
2889
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2890
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2891
|
+
|
2892
|
+
options.apply_defaults timeout: @config.rpcs.create_environment.timeout,
|
2893
|
+
metadata: metadata,
|
2894
|
+
retry_policy: @config.rpcs.create_environment.retry_policy
|
2895
|
+
|
2896
|
+
options.apply_defaults timeout: @config.timeout,
|
2897
|
+
metadata: @config.metadata,
|
2898
|
+
retry_policy: @config.retry_policy
|
2899
|
+
|
2900
|
+
@dataplex_service_stub.call_rpc :create_environment, request, options: options do |response, operation|
|
2901
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2902
|
+
yield response, operation if block_given?
|
2903
|
+
return response
|
2904
|
+
end
|
2905
|
+
rescue ::GRPC::BadStatus => e
|
2906
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2907
|
+
end
|
2908
|
+
|
2909
|
+
##
|
2910
|
+
# Update the environment resource.
|
2911
|
+
#
|
2912
|
+
# @overload update_environment(request, options = nil)
|
2913
|
+
# Pass arguments to `update_environment` via a request object, either of type
|
2914
|
+
# {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash.
|
2915
|
+
#
|
2916
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash]
|
2917
|
+
# A request object representing the call parameters. Required. To specify no
|
2918
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2919
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2920
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2921
|
+
#
|
2922
|
+
# @overload update_environment(update_mask: nil, environment: nil, validate_only: nil)
|
2923
|
+
# Pass arguments to `update_environment` via keyword arguments. Note that at
|
2924
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2925
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2926
|
+
#
|
2927
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2928
|
+
# Required. Mask of fields to update.
|
2929
|
+
# @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash]
|
2930
|
+
# Required. Update description.
|
2931
|
+
# Only fields specified in `update_mask` are updated.
|
2932
|
+
# @param validate_only [::Boolean]
|
2933
|
+
# Optional. Only validate the request, but do not perform mutations.
|
2934
|
+
# The default is false.
|
2935
|
+
#
|
2936
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2937
|
+
# @yieldparam response [::Gapic::Operation]
|
2938
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2939
|
+
#
|
2940
|
+
# @return [::Gapic::Operation]
|
2941
|
+
#
|
2942
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2943
|
+
#
|
2944
|
+
# @example Basic example
|
2945
|
+
# require "google/cloud/dataplex/v1"
|
2946
|
+
#
|
2947
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2948
|
+
# client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
|
2949
|
+
#
|
2950
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2951
|
+
# request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new
|
2952
|
+
#
|
2953
|
+
# # Call the update_environment method.
|
2954
|
+
# result = client.update_environment request
|
2955
|
+
#
|
2956
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
2957
|
+
# # object to check the status of an operation, cancel it, or wait
|
2958
|
+
# # for results. Here is how to block until completion:
|
2959
|
+
# result.wait_until_done! timeout: 60
|
2960
|
+
# if result.response?
|
2961
|
+
# p result.response
|
2962
|
+
# else
|
2963
|
+
# puts "Error!"
|
2964
|
+
# end
|
2965
|
+
#
|
2966
|
+
def update_environment request, options = nil
|
2967
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2968
|
+
|
2969
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest
|
2970
|
+
|
2971
|
+
# Converts hash and nil to an options object
|
2972
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2973
|
+
|
2974
|
+
# Customize the options with defaults
|
2975
|
+
metadata = @config.rpcs.update_environment.metadata.to_h
|
2976
|
+
|
2977
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2978
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2979
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2980
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
2981
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2982
|
+
|
2983
|
+
header_params = {}
|
2984
|
+
if request.environment&.name
|
2985
|
+
header_params["environment.name"] = request.environment.name
|
2986
|
+
end
|
2987
|
+
|
2988
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2989
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2990
|
+
|
2991
|
+
options.apply_defaults timeout: @config.rpcs.update_environment.timeout,
|
2992
|
+
metadata: metadata,
|
2993
|
+
retry_policy: @config.rpcs.update_environment.retry_policy
|
2994
|
+
|
2995
|
+
options.apply_defaults timeout: @config.timeout,
|
2996
|
+
metadata: @config.metadata,
|
2997
|
+
retry_policy: @config.retry_policy
|
2998
|
+
|
2999
|
+
@dataplex_service_stub.call_rpc :update_environment, request, options: options do |response, operation|
|
3000
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3001
|
+
yield response, operation if block_given?
|
3002
|
+
return response
|
3003
|
+
end
|
3004
|
+
rescue ::GRPC::BadStatus => e
|
3005
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
##
|
3009
|
+
# Delete the environment resource. All the child resources must have been
|
3010
|
+
# deleted before environment deletion can be initiated.
|
3011
|
+
#
|
3012
|
+
# @overload delete_environment(request, options = nil)
|
3013
|
+
# Pass arguments to `delete_environment` via a request object, either of type
|
3014
|
+
# {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash.
|
3015
|
+
#
|
3016
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash]
|
3017
|
+
# A request object representing the call parameters. Required. To specify no
|
3018
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3019
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3020
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3021
|
+
#
|
3022
|
+
# @overload delete_environment(name: nil)
|
3023
|
+
# Pass arguments to `delete_environment` via keyword arguments. Note that at
|
3024
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3025
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3026
|
+
#
|
3027
|
+
# @param name [::String]
|
3028
|
+
# Required. The resource name of the environment:
|
3029
|
+
# projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environments/\\{environment_id}`
|
3030
|
+
#
|
3031
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3032
|
+
# @yieldparam response [::Gapic::Operation]
|
3033
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3034
|
+
#
|
3035
|
+
# @return [::Gapic::Operation]
|
3036
|
+
#
|
3037
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3038
|
+
#
|
3039
|
+
# @example Basic example
|
3040
|
+
# require "google/cloud/dataplex/v1"
|
3041
|
+
#
|
3042
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3043
|
+
# client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
|
3044
|
+
#
|
3045
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3046
|
+
# request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new
|
3047
|
+
#
|
3048
|
+
# # Call the delete_environment method.
|
3049
|
+
# result = client.delete_environment request
|
3050
|
+
#
|
3051
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
3052
|
+
# # object to check the status of an operation, cancel it, or wait
|
3053
|
+
# # for results. Here is how to block until completion:
|
3054
|
+
# result.wait_until_done! timeout: 60
|
3055
|
+
# if result.response?
|
3056
|
+
# p result.response
|
3057
|
+
# else
|
3058
|
+
# puts "Error!"
|
3059
|
+
# end
|
3060
|
+
#
|
3061
|
+
def delete_environment request, options = nil
|
3062
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3063
|
+
|
3064
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest
|
3065
|
+
|
3066
|
+
# Converts hash and nil to an options object
|
3067
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3068
|
+
|
3069
|
+
# Customize the options with defaults
|
3070
|
+
metadata = @config.rpcs.delete_environment.metadata.to_h
|
3071
|
+
|
3072
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3073
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3074
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3075
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
3076
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3077
|
+
|
3078
|
+
header_params = {}
|
3079
|
+
if request.name
|
3080
|
+
header_params["name"] = request.name
|
3081
|
+
end
|
3082
|
+
|
3083
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3084
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3085
|
+
|
3086
|
+
options.apply_defaults timeout: @config.rpcs.delete_environment.timeout,
|
3087
|
+
metadata: metadata,
|
3088
|
+
retry_policy: @config.rpcs.delete_environment.retry_policy
|
3089
|
+
|
3090
|
+
options.apply_defaults timeout: @config.timeout,
|
3091
|
+
metadata: @config.metadata,
|
3092
|
+
retry_policy: @config.retry_policy
|
3093
|
+
|
3094
|
+
@dataplex_service_stub.call_rpc :delete_environment, request, options: options do |response, operation|
|
3095
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3096
|
+
yield response, operation if block_given?
|
3097
|
+
return response
|
3098
|
+
end
|
3099
|
+
rescue ::GRPC::BadStatus => e
|
3100
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3101
|
+
end
|
3102
|
+
|
3103
|
+
##
|
3104
|
+
# Lists environments under the given lake.
|
3105
|
+
#
|
3106
|
+
# @overload list_environments(request, options = nil)
|
3107
|
+
# Pass arguments to `list_environments` via a request object, either of type
|
3108
|
+
# {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash.
|
3109
|
+
#
|
3110
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash]
|
3111
|
+
# A request object representing the call parameters. Required. To specify no
|
3112
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3113
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3114
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3115
|
+
#
|
3116
|
+
# @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
3117
|
+
# Pass arguments to `list_environments` via keyword arguments. Note that at
|
3118
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3119
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3120
|
+
#
|
3121
|
+
# @param parent [::String]
|
3122
|
+
# Required. The resource name of the parent lake:
|
3123
|
+
# projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}
|
3124
|
+
# @param page_size [::Integer]
|
3125
|
+
# Optional. Maximum number of environments to return. The service may return fewer than
|
3126
|
+
# this value. If unspecified, at most 10 environments will be returned. The
|
3127
|
+
# maximum value is 1000; values above 1000 will be coerced to 1000.
|
3128
|
+
# @param page_token [::String]
|
3129
|
+
# Optional. Page token received from a previous `ListEnvironments` call. Provide this
|
3130
|
+
# to retrieve the subsequent page. When paginating, all other parameters
|
3131
|
+
# provided to `ListEnvironments` must match the call that provided the page
|
3132
|
+
# token.
|
3133
|
+
# @param filter [::String]
|
3134
|
+
# Optional. Filter request.
|
3135
|
+
# @param order_by [::String]
|
3136
|
+
# Optional. Order by fields for the result.
|
3137
|
+
#
|
3138
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3139
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>]
|
3140
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3141
|
+
#
|
3142
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>]
|
3143
|
+
#
|
3144
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3145
|
+
#
|
3146
|
+
# @example Basic example
|
3147
|
+
# require "google/cloud/dataplex/v1"
|
3148
|
+
#
|
3149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3150
|
+
# client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
|
3151
|
+
#
|
3152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3153
|
+
# request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new
|
3154
|
+
#
|
3155
|
+
# # Call the list_environments method.
|
3156
|
+
# result = client.list_environments request
|
3157
|
+
#
|
3158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
3160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
3161
|
+
# # methods are also available for managing paging directly.
|
3162
|
+
# result.each do |response|
|
3163
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::Environment.
|
3164
|
+
# p response
|
3165
|
+
# end
|
3166
|
+
#
|
3167
|
+
def list_environments request, options = nil
|
3168
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3169
|
+
|
3170
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest
|
3171
|
+
|
3172
|
+
# Converts hash and nil to an options object
|
3173
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3174
|
+
|
3175
|
+
# Customize the options with defaults
|
3176
|
+
metadata = @config.rpcs.list_environments.metadata.to_h
|
3177
|
+
|
3178
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3179
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3180
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3181
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
3182
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3183
|
+
|
3184
|
+
header_params = {}
|
3185
|
+
if request.parent
|
3186
|
+
header_params["parent"] = request.parent
|
3187
|
+
end
|
3188
|
+
|
3189
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3190
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3191
|
+
|
3192
|
+
options.apply_defaults timeout: @config.rpcs.list_environments.timeout,
|
3193
|
+
metadata: metadata,
|
3194
|
+
retry_policy: @config.rpcs.list_environments.retry_policy
|
3195
|
+
|
3196
|
+
options.apply_defaults timeout: @config.timeout,
|
3197
|
+
metadata: @config.metadata,
|
3198
|
+
retry_policy: @config.retry_policy
|
3199
|
+
|
3200
|
+
@dataplex_service_stub.call_rpc :list_environments, request, options: options do |response, operation|
|
3201
|
+
response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_environments, request, response, operation, options
|
3202
|
+
yield response, operation if block_given?
|
3203
|
+
return response
|
3204
|
+
end
|
3205
|
+
rescue ::GRPC::BadStatus => e
|
3206
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3207
|
+
end
|
3208
|
+
|
3209
|
+
##
|
3210
|
+
# Get environment resource.
|
3211
|
+
#
|
3212
|
+
# @overload get_environment(request, options = nil)
|
3213
|
+
# Pass arguments to `get_environment` via a request object, either of type
|
3214
|
+
# {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash.
|
3215
|
+
#
|
3216
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash]
|
3217
|
+
# A request object representing the call parameters. Required. To specify no
|
3218
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3219
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3220
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3221
|
+
#
|
3222
|
+
# @overload get_environment(name: nil)
|
3223
|
+
# Pass arguments to `get_environment` via keyword arguments. Note that at
|
3224
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3225
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3226
|
+
#
|
3227
|
+
# @param name [::String]
|
3228
|
+
# Required. The resource name of the environment:
|
3229
|
+
# projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environments/\\{environment_id}
|
3230
|
+
#
|
3231
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3232
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::Environment]
|
3233
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3234
|
+
#
|
3235
|
+
# @return [::Google::Cloud::Dataplex::V1::Environment]
|
3236
|
+
#
|
3237
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3238
|
+
#
|
3239
|
+
# @example Basic example
|
3240
|
+
# require "google/cloud/dataplex/v1"
|
3241
|
+
#
|
3242
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3243
|
+
# client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
|
3244
|
+
#
|
3245
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3246
|
+
# request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new
|
3247
|
+
#
|
3248
|
+
# # Call the get_environment method.
|
3249
|
+
# result = client.get_environment request
|
3250
|
+
#
|
3251
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::Environment.
|
3252
|
+
# p result
|
3253
|
+
#
|
3254
|
+
def get_environment request, options = nil
|
3255
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3256
|
+
|
3257
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest
|
3258
|
+
|
3259
|
+
# Converts hash and nil to an options object
|
3260
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3261
|
+
|
3262
|
+
# Customize the options with defaults
|
3263
|
+
metadata = @config.rpcs.get_environment.metadata.to_h
|
3264
|
+
|
3265
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3266
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3267
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3268
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
3269
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3270
|
+
|
3271
|
+
header_params = {}
|
3272
|
+
if request.name
|
3273
|
+
header_params["name"] = request.name
|
3274
|
+
end
|
3275
|
+
|
3276
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3277
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3278
|
+
|
3279
|
+
options.apply_defaults timeout: @config.rpcs.get_environment.timeout,
|
3280
|
+
metadata: metadata,
|
3281
|
+
retry_policy: @config.rpcs.get_environment.retry_policy
|
3282
|
+
|
3283
|
+
options.apply_defaults timeout: @config.timeout,
|
3284
|
+
metadata: @config.metadata,
|
3285
|
+
retry_policy: @config.retry_policy
|
3286
|
+
|
3287
|
+
@dataplex_service_stub.call_rpc :get_environment, request, options: options do |response, operation|
|
3288
|
+
yield response, operation if block_given?
|
3289
|
+
return response
|
3290
|
+
end
|
3291
|
+
rescue ::GRPC::BadStatus => e
|
3292
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3293
|
+
end
|
3294
|
+
|
3295
|
+
##
|
3296
|
+
# Lists session resources in an environment.
|
3297
|
+
#
|
3298
|
+
# @overload list_sessions(request, options = nil)
|
3299
|
+
# Pass arguments to `list_sessions` via a request object, either of type
|
3300
|
+
# {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash.
|
3301
|
+
#
|
3302
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash]
|
3303
|
+
# A request object representing the call parameters. Required. To specify no
|
3304
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3305
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3306
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3307
|
+
#
|
3308
|
+
# @overload list_sessions(parent: nil, page_size: nil, page_token: nil)
|
3309
|
+
# Pass arguments to `list_sessions` via keyword arguments. Note that at
|
3310
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3311
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3312
|
+
#
|
3313
|
+
# @param parent [::String]
|
3314
|
+
# Required. The resource name of the parent environment:
|
3315
|
+
# projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id}
|
3316
|
+
# @param page_size [::Integer]
|
3317
|
+
# Optional. Maximum number of sessions to return. The service may return fewer than
|
3318
|
+
# this value. If unspecified, at most 10 sessions will be returned. The
|
3319
|
+
# maximum value is 1000; values above 1000 will be coerced to 1000.
|
3320
|
+
# @param page_token [::String]
|
3321
|
+
# Optional. Page token received from a previous `ListSessions` call. Provide this to
|
3322
|
+
# retrieve the subsequent page. When paginating, all other parameters
|
3323
|
+
# provided to `ListSessions` must match the call that provided the page
|
3324
|
+
# token.
|
3325
|
+
#
|
3326
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3327
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>]
|
3328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3329
|
+
#
|
3330
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>]
|
3331
|
+
#
|
3332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3333
|
+
#
|
3334
|
+
# @example Basic example
|
3335
|
+
# require "google/cloud/dataplex/v1"
|
3336
|
+
#
|
3337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3338
|
+
# client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
|
3339
|
+
#
|
3340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3341
|
+
# request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new
|
3342
|
+
#
|
3343
|
+
# # Call the list_sessions method.
|
3344
|
+
# result = client.list_sessions request
|
3345
|
+
#
|
3346
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3347
|
+
# # iterate over all elements by calling #each, and the enumerable
|
3348
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
3349
|
+
# # methods are also available for managing paging directly.
|
3350
|
+
# result.each do |response|
|
3351
|
+
# # Each element is of type ::Google::Cloud::Dataplex::V1::Session.
|
3352
|
+
# p response
|
3353
|
+
# end
|
3354
|
+
#
|
3355
|
+
def list_sessions request, options = nil
|
3356
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3357
|
+
|
3358
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest
|
3359
|
+
|
3360
|
+
# Converts hash and nil to an options object
|
3361
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3362
|
+
|
3363
|
+
# Customize the options with defaults
|
3364
|
+
metadata = @config.rpcs.list_sessions.metadata.to_h
|
3365
|
+
|
3366
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3367
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3368
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3369
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
3370
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3371
|
+
|
3372
|
+
header_params = {}
|
3373
|
+
if request.parent
|
3374
|
+
header_params["parent"] = request.parent
|
3375
|
+
end
|
3376
|
+
|
3377
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3378
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3379
|
+
|
3380
|
+
options.apply_defaults timeout: @config.rpcs.list_sessions.timeout,
|
3381
|
+
metadata: metadata,
|
3382
|
+
retry_policy: @config.rpcs.list_sessions.retry_policy
|
3383
|
+
|
3384
|
+
options.apply_defaults timeout: @config.timeout,
|
3385
|
+
metadata: @config.metadata,
|
3386
|
+
retry_policy: @config.retry_policy
|
3387
|
+
|
3388
|
+
@dataplex_service_stub.call_rpc :list_sessions, request, options: options do |response, operation|
|
3389
|
+
response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_sessions, request, response, operation, options
|
3390
|
+
yield response, operation if block_given?
|
3391
|
+
return response
|
3392
|
+
end
|
3393
|
+
rescue ::GRPC::BadStatus => e
|
3394
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3395
|
+
end
|
3396
|
+
|
2803
3397
|
##
|
2804
3398
|
# Configuration class for the DataplexService API.
|
2805
3399
|
#
|
@@ -3065,6 +3659,36 @@ module Google
|
|
3065
3659
|
# @return [::Gapic::Config::Method]
|
3066
3660
|
#
|
3067
3661
|
attr_reader :cancel_job
|
3662
|
+
##
|
3663
|
+
# RPC-specific configuration for `create_environment`
|
3664
|
+
# @return [::Gapic::Config::Method]
|
3665
|
+
#
|
3666
|
+
attr_reader :create_environment
|
3667
|
+
##
|
3668
|
+
# RPC-specific configuration for `update_environment`
|
3669
|
+
# @return [::Gapic::Config::Method]
|
3670
|
+
#
|
3671
|
+
attr_reader :update_environment
|
3672
|
+
##
|
3673
|
+
# RPC-specific configuration for `delete_environment`
|
3674
|
+
# @return [::Gapic::Config::Method]
|
3675
|
+
#
|
3676
|
+
attr_reader :delete_environment
|
3677
|
+
##
|
3678
|
+
# RPC-specific configuration for `list_environments`
|
3679
|
+
# @return [::Gapic::Config::Method]
|
3680
|
+
#
|
3681
|
+
attr_reader :list_environments
|
3682
|
+
##
|
3683
|
+
# RPC-specific configuration for `get_environment`
|
3684
|
+
# @return [::Gapic::Config::Method]
|
3685
|
+
#
|
3686
|
+
attr_reader :get_environment
|
3687
|
+
##
|
3688
|
+
# RPC-specific configuration for `list_sessions`
|
3689
|
+
# @return [::Gapic::Config::Method]
|
3690
|
+
#
|
3691
|
+
attr_reader :list_sessions
|
3068
3692
|
|
3069
3693
|
# @private
|
3070
3694
|
def initialize parent_rpcs = nil
|
@@ -3120,6 +3744,18 @@ module Google
|
|
3120
3744
|
@get_job = ::Gapic::Config::Method.new get_job_config
|
3121
3745
|
cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job
|
3122
3746
|
@cancel_job = ::Gapic::Config::Method.new cancel_job_config
|
3747
|
+
create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment
|
3748
|
+
@create_environment = ::Gapic::Config::Method.new create_environment_config
|
3749
|
+
update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment
|
3750
|
+
@update_environment = ::Gapic::Config::Method.new update_environment_config
|
3751
|
+
delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment
|
3752
|
+
@delete_environment = ::Gapic::Config::Method.new delete_environment_config
|
3753
|
+
list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments
|
3754
|
+
@list_environments = ::Gapic::Config::Method.new list_environments_config
|
3755
|
+
get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment
|
3756
|
+
@get_environment = ::Gapic::Config::Method.new get_environment_config
|
3757
|
+
list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions
|
3758
|
+
@list_sessions = ::Gapic::Config::Method.new list_sessions_config
|
3123
3759
|
|
3124
3760
|
yield self if block_given?
|
3125
3761
|
end
|