Datastream V1 API - Class Google::Cloud::Datastream::V1::Datastream::Client (v0.6.0)

Reference documentation and code samples for the Datastream V1 API class Google::Cloud::Datastream::V1::Datastream::Client.

Client for the Datastream service.

Datastream service

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Datastream Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Datastream clients
::Google::Cloud::Datastream::V1::Datastream::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def 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 Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_connection_profile

def create_connection_profile(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def create_connection_profile(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_connection_profile via a request object, either of type CreateConnectionProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::CreateConnectionProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_connection_profile(parent: nil, connection_profile_id: nil, connection_profile: nil, request_id: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
Pass arguments to create_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of ConnectionProfiles.
  • connection_profile_id (::String) — Required. The connection profile identifier.
  • connection_profile (::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash) — Required. The connection profile resource to create.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. Only validate the connection profile, but don't create any resources. The default is false.
  • force (::Boolean) — Optional. Create the connection profile without validating it.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#create_private_connection

def create_private_connection(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def create_private_connection(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_private_connection via a request object, either of type CreatePrivateConnectionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::CreatePrivateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, force: nil) -> ::Gapic::Operation
Pass arguments to create_private_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of PrivateConnections.
  • private_connection_id (::String) — Required. The private connectivity identifier.
  • private_connection (::Google::Cloud::Datastream::V1::PrivateConnection, ::Hash) — Required. The Private Connectivity resource to create.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • force (::Boolean) — Optional. If set to true, will skip validations.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#create_route

def create_route(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def create_route(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_route via a request object, either of type CreateRouteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::CreateRouteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_route(parent: nil, route_id: nil, route: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_route via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of Routes.
  • route_id (::String) — Required. The Route identifier.
  • route (::Google::Cloud::Datastream::V1::Route, ::Hash) — Required. The Route resource to create.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#create_stream

def create_stream(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def create_stream(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_stream via a request object, either of type CreateStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::CreateStreamRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_stream(parent: nil, stream_id: nil, stream: nil, request_id: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
Pass arguments to create_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of streams.
  • stream_id (::String) — Required. The stream identifier.
  • stream (::Google::Cloud::Datastream::V1::Stream, ::Hash) — Required. The stream resource to create.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. Only validate the stream, but don't create any resources. The default is false.
  • force (::Boolean) — Optional. Create the stream without validating it.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#delete_connection_profile

def delete_connection_profile(request, options = nil) -> ::Gapic::Operation
def delete_connection_profile(name: nil, request_id: nil) -> ::Gapic::Operation

Use this method to delete a connection profile.

Overloads
def delete_connection_profile(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_connection_profile via a request object, either of type Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::DeleteConnectionProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_connection_profile(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the connection profile resource to delete.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#delete_private_connection

def delete_private_connection(request, options = nil) -> ::Gapic::Operation
def delete_private_connection(name: nil, request_id: nil, force: nil) -> ::Gapic::Operation

Use this method to delete a private connectivity configuration.

Overloads
def delete_private_connection(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_private_connection via a request object, either of type Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::DeletePrivateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_private_connection(name: nil, request_id: nil, force: nil) -> ::Gapic::Operation
Pass arguments to delete_private_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the private connectivity configuration to delete.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • force (::Boolean) — Optional. If set to true, any child routes that belong to this PrivateConnection will also be deleted.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#delete_route

def delete_route(request, options = nil) -> ::Gapic::Operation
def delete_route(name: nil, request_id: nil) -> ::Gapic::Operation

Use this method to delete a route.

Overloads
def delete_route(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_route via a request object, either of type Google::Cloud::Datastream::V1::DeleteRouteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::DeleteRouteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_route(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_route via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the Route resource to delete.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#delete_stream

def delete_stream(request, options = nil) -> ::Gapic::Operation
def delete_stream(name: nil, request_id: nil) -> ::Gapic::Operation

Use this method to delete a stream.

Overloads
def delete_stream(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_stream via a request object, either of type Google::Cloud::Datastream::V1::DeleteStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::DeleteStreamRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_stream(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the stream resource to delete.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#discover_connection_profile

def discover_connection_profile(request, options = nil) -> ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse
def 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.

Overloads
def discover_connection_profile(request, options = nil) -> ::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse
Pass arguments to discover_connection_profile via a request object, either of type Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::DiscoverConnectionProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def 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
Pass arguments to discover_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource of the connection profile type. Must be in the format projects/*/locations/*.
  • connection_profile (::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash) — An ad-hoc connection profile configuration.
  • connection_profile_name (::String) — A reference to an existing connection profile.
  • full_hierarchy (::Boolean) — Whether to retrieve the full hierarchy of data objects (TRUE) or only the current level (FALSE).
  • hierarchy_depth (::Integer) — The number of hierarchy levels below the current level to be retrieved.
  • oracle_rdbms (::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash) — Oracle RDBMS to enrich with child data objects and metadata.
  • mysql_rdbms (::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash) — MySQL RDBMS to enrich with child data objects and metadata.
  • postgresql_rdbms (::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash) — PostgreSQL RDBMS to enrich with child data objects and metadata.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse.
p result

#fetch_static_ips

def fetch_static_ips(request, options = nil) -> ::Google::Cloud::Datastream::V1::FetchStaticIpsResponse
def 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.

Overloads
def fetch_static_ips(request, options = nil) -> ::Google::Cloud::Datastream::V1::FetchStaticIpsResponse
Pass arguments to fetch_static_ips via a request object, either of type FetchStaticIpsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::FetchStaticIpsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_static_ips(name: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Datastream::V1::FetchStaticIpsResponse
Pass arguments to fetch_static_ips via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The resource name for the location for which static IPs should be returned. Must be in the format projects/*/locations/*.
  • page_size (::Integer) — Maximum number of Ips to return, will likely not be specified.
  • page_token (::String) — A page token, received from a previous ListStaticIps call. will likely not be specified.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::FetchStaticIpsResponse.
p result

#get_connection_profile

def get_connection_profile(request, options = nil) -> ::Google::Cloud::Datastream::V1::ConnectionProfile
def get_connection_profile(name: nil) -> ::Google::Cloud::Datastream::V1::ConnectionProfile

Use this method to get details about a connection profile.

Overloads
def get_connection_profile(request, options = nil) -> ::Google::Cloud::Datastream::V1::ConnectionProfile
Pass arguments to get_connection_profile via a request object, either of type GetConnectionProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::GetConnectionProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_connection_profile(name: nil) -> ::Google::Cloud::Datastream::V1::ConnectionProfile
Pass arguments to get_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the connection profile resource to get.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::ConnectionProfile.
p result

#get_private_connection

def get_private_connection(request, options = nil) -> ::Google::Cloud::Datastream::V1::PrivateConnection
def get_private_connection(name: nil) -> ::Google::Cloud::Datastream::V1::PrivateConnection

Use this method to get details about a private connectivity configuration.

Overloads
def get_private_connection(request, options = nil) -> ::Google::Cloud::Datastream::V1::PrivateConnection
Pass arguments to get_private_connection via a request object, either of type GetPrivateConnectionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::GetPrivateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_private_connection(name: nil) -> ::Google::Cloud::Datastream::V1::PrivateConnection
Pass arguments to get_private_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the private connectivity configuration to get.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::PrivateConnection.
p result

#get_route

def get_route(request, options = nil) -> ::Google::Cloud::Datastream::V1::Route
def get_route(name: nil) -> ::Google::Cloud::Datastream::V1::Route

Use this method to get details about a route.

Overloads
def get_route(request, options = nil) -> ::Google::Cloud::Datastream::V1::Route
Pass arguments to get_route via a request object, either of type GetRouteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::GetRouteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_route(name: nil) -> ::Google::Cloud::Datastream::V1::Route
Pass arguments to get_route via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the Route resource to get.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::Route.
p result

#get_stream

def get_stream(request, options = nil) -> ::Google::Cloud::Datastream::V1::Stream
def get_stream(name: nil) -> ::Google::Cloud::Datastream::V1::Stream

Use this method to get details about a stream.

Overloads
def get_stream(request, options = nil) -> ::Google::Cloud::Datastream::V1::Stream
Pass arguments to get_stream via a request object, either of type GetStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::GetStreamRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_stream(name: nil) -> ::Google::Cloud::Datastream::V1::Stream
Pass arguments to get_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the stream resource to get.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::Stream.
p result

#get_stream_object

def get_stream_object(request, options = nil) -> ::Google::Cloud::Datastream::V1::StreamObject
def get_stream_object(name: nil) -> ::Google::Cloud::Datastream::V1::StreamObject

Use this method to get details about a stream object.

Overloads
def get_stream_object(request, options = nil) -> ::Google::Cloud::Datastream::V1::StreamObject
Pass arguments to get_stream_object via a request object, either of type GetStreamObjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::GetStreamObjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_stream_object(name: nil) -> ::Google::Cloud::Datastream::V1::StreamObject
Pass arguments to get_stream_object via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the stream object resource to get.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::StreamObject.
p result

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

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

Returns
  • (Google::Iam::V1::IAMPolicy::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new Datastream client object.

Yields
  • (config) — Configure the Datastream client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Datastream::V1::Datastream::Client.new

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

#list_connection_profiles

def list_connection_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::ConnectionProfile>
def 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.

Overloads
def list_connection_profiles(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::ConnectionProfile>
Pass arguments to list_connection_profiles via a request object, either of type ListConnectionProfilesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::ListConnectionProfilesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_connection_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::ConnectionProfile>
Pass arguments to list_connection_profiles via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of connection profiles.
  • page_size (::Integer) — Maximum number of connection profiles to return. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Page token received from a previous ListConnectionProfiles call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListConnectionProfiles must match the call that provided the page token.

  • filter (::String) — Filter request.
  • order_by (::String) — Order by fields for the result.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Datastream::V1::ConnectionProfile.
  p item
end

#list_private_connections

def list_private_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::PrivateConnection>
def 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.

Overloads
def list_private_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::PrivateConnection>
Pass arguments to list_private_connections via a request object, either of type ListPrivateConnectionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::ListPrivateConnectionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::PrivateConnection>
Pass arguments to list_private_connections via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of private connectivity configurations.
  • page_size (::Integer) — Maximum number of private connectivity configurations to return. If unspecified, at most 50 private connectivity configurations that will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Page token received from a previous ListPrivateConnections call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListPrivateConnections must match the call that provided the page token.

  • filter (::String) — Filter request.
  • order_by (::String) — Order by fields for the result.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Datastream::V1::PrivateConnection.
  p item
end

#list_routes

def list_routes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Route>
def 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.

Overloads
def list_routes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Route>
Pass arguments to list_routes via a request object, either of type ListRoutesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::ListRoutesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Route>
Pass arguments to list_routes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of Routess.
  • page_size (::Integer) — Maximum number of Routes to return. The service may return fewer than this value. If unspecified, at most 50 Routes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Page token received from a previous ListRoutes call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListRoutes must match the call that provided the page token.

  • filter (::String) — Filter request.
  • order_by (::String) — Order by fields for the result.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Datastream::V1::Route.
  p item
end

#list_stream_objects

def list_stream_objects(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>
def 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.

Overloads
def list_stream_objects(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>
Pass arguments to list_stream_objects via a request object, either of type ListStreamObjectsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::ListStreamObjectsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_stream_objects(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::StreamObject>
Pass arguments to list_stream_objects via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent stream that owns the collection of objects.
  • page_size (::Integer) — Maximum number of objects to return. Default is 50. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Page token received from a previous ListStreamObjectsRequest call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListStreamObjectsRequest must match the call that provided the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Datastream::V1::StreamObject.
  p item
end

#list_streams

def list_streams(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Stream>
def 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.

Overloads
def list_streams(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Stream>
Pass arguments to list_streams via a request object, either of type ListStreamsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::ListStreamsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_streams(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Datastream::V1::Stream>
Pass arguments to list_streams via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent that owns the collection of streams.
  • page_size (::Integer) — Maximum number of streams to return. If unspecified, at most 50 streams will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Page token received from a previous ListStreams call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListStreams must match the call that provided the page token.

  • filter (::String) — Filter request.
  • order_by (::String) — Order by fields for the result.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Datastream::V1::Stream.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

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

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

#lookup_stream_object

def lookup_stream_object(request, options = nil) -> ::Google::Cloud::Datastream::V1::StreamObject
def 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.

Overloads
def lookup_stream_object(request, options = nil) -> ::Google::Cloud::Datastream::V1::StreamObject
Pass arguments to lookup_stream_object via a request object, either of type LookupStreamObjectRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::LookupStreamObjectRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def lookup_stream_object(parent: nil, source_object_identifier: nil) -> ::Google::Cloud::Datastream::V1::StreamObject
Pass arguments to lookup_stream_object via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::StreamObject.
p result

#operations_client

def operations_client() -> ::Google::Cloud::Datastream::V1::Datastream::Operations

Get the associated client for long-running operations.

#start_backfill_job

def start_backfill_job(request, options = nil) -> ::Google::Cloud::Datastream::V1::StartBackfillJobResponse
def start_backfill_job(object: nil) -> ::Google::Cloud::Datastream::V1::StartBackfillJobResponse

Use this method to start a backfill job for the specified stream object.

Overloads
def start_backfill_job(request, options = nil) -> ::Google::Cloud::Datastream::V1::StartBackfillJobResponse
Pass arguments to start_backfill_job via a request object, either of type StartBackfillJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::StartBackfillJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def start_backfill_job(object: nil) -> ::Google::Cloud::Datastream::V1::StartBackfillJobResponse
Pass arguments to start_backfill_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • object (::String) — Required. The name of the stream object resource to start a backfill job for.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::StartBackfillJobResponse.
p result

#stop_backfill_job

def stop_backfill_job(request, options = nil) -> ::Google::Cloud::Datastream::V1::StopBackfillJobResponse
def stop_backfill_job(object: nil) -> ::Google::Cloud::Datastream::V1::StopBackfillJobResponse

Use this method to stop a backfill job for the specified stream object.

Overloads
def stop_backfill_job(request, options = nil) -> ::Google::Cloud::Datastream::V1::StopBackfillJobResponse
Pass arguments to stop_backfill_job via a request object, either of type StopBackfillJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::StopBackfillJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def stop_backfill_job(object: nil) -> ::Google::Cloud::Datastream::V1::StopBackfillJobResponse
Pass arguments to stop_backfill_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • object (::String) — Required. The name of the stream object resource to stop the backfill job for.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

# The returned object is of type Google::Cloud::Datastream::V1::StopBackfillJobResponse.
p result

#update_connection_profile

def update_connection_profile(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def update_connection_profile(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_connection_profile via a request object, either of type UpdateConnectionProfileRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::UpdateConnectionProfileRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_connection_profile(update_mask: nil, connection_profile: nil, request_id: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
Pass arguments to update_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the ConnectionProfile resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
  • connection_profile (::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash) — Required. The connection profile to update.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. Only validate the connection profile, but don't update any resources. The default is false.
  • force (::Boolean) — Optional. Update the connection profile without validating it.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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

#update_stream

def update_stream(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def update_stream(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_stream via a request object, either of type UpdateStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Datastream::V1::UpdateStreamRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_stream(update_mask: nil, stream: nil, request_id: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
Pass arguments to update_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the stream resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
  • stream (::Google::Cloud::Datastream::V1::Stream, ::Hash) — Required. The stream resource to update.
  • request_id (::String) — Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. Only validate the stream with the changes, without actually updating it. The default is false.
  • force (::Boolean) — Optional. Update the stream without validating it.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/datastream/v1"

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

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

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

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