Dataflow V1beta3 API - Class Google::Cloud::Dataflow::V1beta3::Snapshots::Client (v0.6.0)

Reference documentation and code samples for the Dataflow V1beta3 API class Google::Cloud::Dataflow::V1beta3::Snapshots::Client.

Client for the Snapshots service.

Provides methods to manage snapshots of Google Cloud Dataflow jobs.

Inherits

  • Object

Methods

.configure

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

Configure the Snapshots 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 Snapshots clients
::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the Snapshots 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

#delete_snapshot

def delete_snapshot(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse
def delete_snapshot(project_id: nil, snapshot_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse

Deletes a snapshot.

Overloads
def delete_snapshot(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse
Pass arguments to delete_snapshot via a request object, either of type DeleteSnapshotRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotRequest, ::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_snapshot(project_id: nil, snapshot_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse
Pass arguments to delete_snapshot 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
  • project_id (::String) — The ID of the Cloud Platform project that the snapshot belongs to.
  • snapshot_id (::String) — The ID of the snapshot.
  • location (::String) — The location that contains this snapshot.
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/dataflow/v1beta3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataflow::V1beta3::DeleteSnapshotRequest.new

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

# The returned object is of type Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse.
p result

#get_snapshot

def get_snapshot(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
def get_snapshot(project_id: nil, snapshot_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot

Gets information about a snapshot.

Overloads
def get_snapshot(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
Pass arguments to get_snapshot via a request object, either of type GetSnapshotRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::GetSnapshotRequest, ::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_snapshot(project_id: nil, snapshot_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::Snapshot
Pass arguments to get_snapshot 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
  • project_id (::String) — The ID of the Cloud Platform project that the snapshot belongs to.
  • snapshot_id (::String) — The ID of the snapshot.
  • location (::String) — The location that contains this snapshot.
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/dataflow/v1beta3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataflow::V1beta3::GetSnapshotRequest.new

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

# The returned object is of type Google::Cloud::Dataflow::V1beta3::Snapshot.
p result

#initialize

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

Create a new Snapshots client object.

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

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

#list_snapshots

def list_snapshots(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse
def list_snapshots(project_id: nil, job_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse

Lists snapshots.

Overloads
def list_snapshots(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse
Pass arguments to list_snapshots via a request object, either of type ListSnapshotsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataflow::V1beta3::ListSnapshotsRequest, ::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_snapshots(project_id: nil, job_id: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse
Pass arguments to list_snapshots 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
  • project_id (::String) — The project ID to list snapshots for.
  • job_id (::String) — If specified, list snapshots created from this job.
  • location (::String) — The location to list snapshots in.
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/dataflow/v1beta3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataflow::V1beta3::ListSnapshotsRequest.new

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

# The returned object is of type Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse.
p result