Class: Google::Cloud::Datastream::V1::Datastream::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Datastream::V1::Datastream::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/datastream/v1/datastream/client.rb
Overview
Client for the Datastream service.
Datastream service
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::Datastream::V1::Datastream::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the Datastream Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the Datastream Client instance.
-
#create_connection_profile(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to create a connection profile in a project and location.
-
#create_private_connection(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to create a private connectivity configuration.
-
#create_route(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to create a route for a private connectivity configuration in a project and location.
-
#create_stream(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to create a stream.
-
#delete_connection_profile(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to delete a connection profile.
-
#delete_private_connection(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to delete a private connectivity configuration.
-
#delete_route(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to delete a route.
-
#delete_stream(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to delete a stream.
-
#discover_connection_profile(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse
Use this method to discover a connection profile.
-
#fetch_static_ips(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::FetchStaticIpsResponse
The FetchStaticIps API call exposes the static IP addresses used by Datastream.
-
#get_connection_profile(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::ConnectionProfile
Use this method to get details about a connection profile.
-
#get_private_connection(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::PrivateConnection
Use this method to get details about a private connectivity configuration.
-
#get_route(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::Route
Use this method to get details about a route.
-
#get_stream(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::Stream
Use this method to get details about a stream.
-
#get_stream_object(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::StreamObject
Use this method to get details about a stream object.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new Datastream client object.
-
#list_connection_profiles(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::ConnectionProfile>
Use this method to list connection profiles created in a project and location.
-
#list_private_connections(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::PrivateConnection>
Use this method to list private connectivity configurations in a project and location.
-
#list_routes(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Route>
Use this method to list routes created for a private connectivity configuration in a project and location.
-
#list_stream_objects(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>
Use this method to list the objects of a specific stream.
-
#list_streams(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Stream>
Use this method to list streams in a project and location.
-
#lookup_stream_object(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::StreamObject
Use this method to look up a stream object by its source object identifier.
-
#start_backfill_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::StartBackfillJobResponse
Use this method to start a backfill job for the specified stream object.
-
#stop_backfill_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Datastream::V1::StopBackfillJobResponse
Use this method to stop a backfill job for the specified stream object.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_connection_profile(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to update the parameters of a connection profile.
-
#update_stream(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Use this method to update the configuration of a stream.
Methods included from Paths
#connection_profile_path, #location_path, #networks_path, #private_connection_path, #route_path, #stream_object_path, #stream_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new Datastream client object.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 151 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/datastream/v1/datastream_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @datastream_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Datastream::V1::Datastream::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) @location_client = Google::Cloud::Location::Locations::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @datastream_stub.endpoint config.universe_domain = @datastream_stub.universe_domain end @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @datastream_stub.endpoint config.universe_domain = @datastream_stub.universe_domain end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
231 232 233 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 231 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)
Get the associated client for mix-in of the Locations.
224 225 226 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 224 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::Datastream::V1::Datastream::Operations (readonly)
Get the associated client for long-running operations.
217 218 219 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 217 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the Datastream Client class.
See Configuration for a description of the configuration fields.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 64 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Datastream", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_connection_profile.timeout = 60.0 default_config.rpcs.update_connection_profile.timeout = 60.0 default_config.rpcs.delete_connection_profile.timeout = 60.0 default_config.rpcs.create_stream.timeout = 60.0 default_config.rpcs.update_stream.timeout = 60.0 default_config.rpcs.delete_stream.timeout = 60.0 default_config.rpcs.create_private_connection.timeout = 60.0 default_config.rpcs.delete_private_connection.timeout = 60.0 default_config.rpcs.create_route.timeout = 60.0 default_config.rpcs.delete_route.timeout = 60.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the Datastream Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
121 122 123 124 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 121 def configure yield @config if block_given? @config end |
#create_connection_profile(request, options = nil) ⇒ ::Gapic::Operation #create_connection_profile(parent: nil, connection_profile_id: nil, connection_profile: nil, request_id: nil, validate_only: nil, force: nil) ⇒ ::Gapic::Operation
Use this method to create a connection profile in a project and location.
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 501 def create_connection_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateConnectionProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_connection_profile..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_connection_profile.timeout, metadata: , retry_policy: @config.rpcs.create_connection_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :create_connection_profile, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_private_connection(request, options = nil) ⇒ ::Gapic::Operation #create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation
Use this method to create a private connectivity configuration.
2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2024 def create_private_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_private_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_private_connection.timeout, metadata: , retry_policy: @config.rpcs.create_private_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :create_private_connection, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_route(request, options = nil) ⇒ ::Gapic::Operation #create_route(parent: nil, route_id: nil, route: nil, request_id: nil) ⇒ ::Gapic::Operation
Use this method to create a route for a private connectivity configuration in a project and location.
2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2443 def create_route request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateRouteRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_route..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_route.timeout, metadata: , retry_policy: @config.rpcs.create_route.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :create_route, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_stream(request, options = nil) ⇒ ::Gapic::Operation #create_stream(parent: nil, stream_id: nil, stream: nil, request_id: nil, validate_only: nil, force: nil) ⇒ ::Gapic::Operation
Use this method to create a stream.
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1141 def create_stream request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::CreateStreamRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_stream..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_stream.timeout, metadata: , retry_policy: @config.rpcs.create_stream.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :create_stream, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_connection_profile(request, options = nil) ⇒ ::Gapic::Operation #delete_connection_profile(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Use this method to delete a connection profile.
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 728 def delete_connection_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_connection_profile..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_connection_profile.timeout, metadata: , retry_policy: @config.rpcs.delete_connection_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :delete_connection_profile, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_private_connection(request, options = nil) ⇒ ::Gapic::Operation #delete_private_connection(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation
Use this method to delete a private connectivity configuration.
2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2330 def delete_private_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_private_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_private_connection.timeout, metadata: , retry_policy: @config.rpcs.delete_private_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :delete_private_connection, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_route(request, options = nil) ⇒ ::Gapic::Operation #delete_route(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Use this method to delete a route.
2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2745 def delete_route request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteRouteRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_route..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_route.timeout, metadata: , retry_policy: @config.rpcs.delete_route.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :delete_route, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_stream(request, options = nil) ⇒ ::Gapic::Operation #delete_stream(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Use this method to delete a stream.
1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1368 def delete_stream request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DeleteStreamRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_stream..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_stream.timeout, metadata: , retry_policy: @config.rpcs.delete_stream.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :delete_stream, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#discover_connection_profile(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse #discover_connection_profile(parent: nil, connection_profile: nil, connection_profile_name: nil, full_hierarchy: nil, hierarchy_depth: nil, oracle_rdbms: nil, mysql_rdbms: nil, postgresql_rdbms: nil) ⇒ ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse
Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects of a parent data object that's optionally supplied in the request.
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 834 def discover_connection_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.discover_connection_profile..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.discover_connection_profile.timeout, metadata: , retry_policy: @config.rpcs.discover_connection_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :discover_connection_profile, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_static_ips(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::FetchStaticIpsResponse #fetch_static_ips(name: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::Datastream::V1::FetchStaticIpsResponse
The FetchStaticIps API call exposes the static IP addresses used by Datastream.
1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1911 def fetch_static_ips request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::FetchStaticIpsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_static_ips..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.fetch_static_ips.timeout, metadata: , retry_policy: @config.rpcs.fetch_static_ips.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :fetch_static_ips, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_connection_profile(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::ConnectionProfile #get_connection_profile(name: nil) ⇒ ::Google::Cloud::Datastream::V1::ConnectionProfile
Use this method to get details about a connection profile.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 385 def get_connection_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetConnectionProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_connection_profile..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_connection_profile.timeout, metadata: , retry_policy: @config.rpcs.get_connection_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :get_connection_profile, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_private_connection(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::PrivateConnection #get_private_connection(name: nil) ⇒ ::Google::Cloud::Datastream::V1::PrivateConnection
Use this method to get details about a private connectivity configuration.
2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2111 def get_private_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_private_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_private_connection.timeout, metadata: , retry_policy: @config.rpcs.get_private_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :get_private_connection, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_route(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::Route #get_route(name: nil) ⇒ ::Google::Cloud::Datastream::V1::Route
Use this method to get details about a route.
2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2530 def get_route request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetRouteRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_route..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_route.timeout, metadata: , retry_policy: @config.rpcs.get_route.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :get_route, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_stream(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::Stream #get_stream(name: nil) ⇒ ::Google::Cloud::Datastream::V1::Stream
Use this method to get details about a stream.
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1025 def get_stream request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetStreamRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_stream..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_stream.timeout, metadata: , retry_policy: @config.rpcs.get_stream.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :get_stream, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_stream_object(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::StreamObject #get_stream_object(name: nil) ⇒ ::Google::Cloud::Datastream::V1::StreamObject
Use this method to get details about a stream object.
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1455 def get_stream_object request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::GetStreamObjectRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_stream_object..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_stream_object.timeout, metadata: , retry_policy: @config.rpcs.get_stream_object.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :get_stream_object, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_connection_profiles(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::ConnectionProfile> #list_connection_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::ConnectionProfile>
Use this method to list connection profiles created in a project and location.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 298 def list_connection_profiles request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListConnectionProfilesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_connection_profiles..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_connection_profiles.timeout, metadata: , retry_policy: @config.rpcs.list_connection_profiles.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :list_connection_profiles, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_connection_profiles, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_private_connections(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::PrivateConnection> #list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::PrivateConnection>
Use this method to list private connectivity configurations in a project and location.
2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2219 def list_private_connections request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_private_connections..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_private_connections.timeout, metadata: , retry_policy: @config.rpcs.list_private_connections.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :list_private_connections, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_private_connections, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_routes(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Route> #list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Route>
Use this method to list routes created for a private connectivity configuration in a project and location.
2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 2637 def list_routes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListRoutesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_routes..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_routes.timeout, metadata: , retry_policy: @config.rpcs.list_routes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :list_routes, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_routes, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_stream_objects(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject> #list_stream_objects(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>
Use this method to list the objects of a specific stream.
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1643 def list_stream_objects request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListStreamObjectsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_stream_objects..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_stream_objects.timeout, metadata: , retry_policy: @config.rpcs.list_stream_objects.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :list_stream_objects, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_stream_objects, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_streams(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Stream> #list_streams(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Stream>
Use this method to list streams in a project and location.
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 938 def list_streams request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::ListStreamsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_streams..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_streams.timeout, metadata: , retry_policy: @config.rpcs.list_streams.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :list_streams, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_streams, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#lookup_stream_object(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::StreamObject #lookup_stream_object(parent: nil, source_object_identifier: nil) ⇒ ::Google::Cloud::Datastream::V1::StreamObject
Use this method to look up a stream object by its source object identifier.
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1543 def lookup_stream_object request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::LookupStreamObjectRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.lookup_stream_object..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.lookup_stream_object.timeout, metadata: , retry_policy: @config.rpcs.lookup_stream_object.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :lookup_stream_object, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#start_backfill_job(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::StartBackfillJobResponse #start_backfill_job(object: nil) ⇒ ::Google::Cloud::Datastream::V1::StartBackfillJobResponse
Use this method to start a backfill job for the specified stream object.
1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1731 def start_backfill_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::StartBackfillJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.start_backfill_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.object header_params["object"] = request.object end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.start_backfill_job.timeout, metadata: , retry_policy: @config.rpcs.start_backfill_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :start_backfill_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#stop_backfill_job(request, options = nil) ⇒ ::Google::Cloud::Datastream::V1::StopBackfillJobResponse #stop_backfill_job(object: nil) ⇒ ::Google::Cloud::Datastream::V1::StopBackfillJobResponse
Use this method to stop a backfill job for the specified stream object.
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1818 def stop_backfill_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::StopBackfillJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.stop_backfill_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.object header_params["object"] = request.object end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.stop_backfill_job.timeout, metadata: , retry_policy: @config.rpcs.stop_backfill_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :stop_backfill_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
131 132 133 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 131 def universe_domain @datastream_stub.universe_domain end |
#update_connection_profile(request, options = nil) ⇒ ::Gapic::Operation #update_connection_profile(update_mask: nil, connection_profile: nil, request_id: nil, validate_only: nil, force: nil) ⇒ ::Gapic::Operation
Use this method to update the parameters of a connection profile.
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 620 def update_connection_profile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::UpdateConnectionProfileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_connection_profile..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.connection_profile&.name header_params["connection_profile.name"] = request.connection_profile.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_connection_profile.timeout, metadata: , retry_policy: @config.rpcs.update_connection_profile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :update_connection_profile, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_stream(request, options = nil) ⇒ ::Gapic::Operation #update_stream(update_mask: nil, stream: nil, request_id: nil, validate_only: nil, force: nil) ⇒ ::Gapic::Operation
Use this method to update the configuration of a stream.
1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 |
# File 'lib/google/cloud/datastream/v1/datastream/client.rb', line 1260 def update_stream request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastream::V1::UpdateStreamRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_stream..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Datastream::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.stream&.name header_params["stream.name"] = request.stream.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_stream.timeout, metadata: , retry_policy: @config.rpcs.update_stream.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @datastream_stub.call_rpc :update_stream, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |