# Dataflow V1beta3 API - Class Google::Cloud::Dataflow::V1beta3::Metrics::Client (v0.17.0)

0.17.0 (latest) 0.16.0 0.15.0 0.14.1 0.13.1 0.12.1 0.11.0 0.10.0 0.9.1 0.8.2 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Dataflow V1beta3 API class Google::Cloud::Dataflow::V1beta3::Metrics::Client.

Client for the Metrics service.


<br />

The Dataflow Metrics API lets you monitor the progress of Dataflow jobs.

## Inherits

- Object

## Methods

### .configure

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

Configure the Metrics Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration "Google::Cloud::Dataflow::V1beta3::Metrics::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all Metrics clients
::Google::Cloud::Dataflow::V1beta3::Metrics::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the Metrics 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client#Google__Cloud__Dataflow__V1beta3__Metrics__Client_configure_class_ "Google::Cloud::Dataflow::V1beta3::Metrics::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration "Google::Cloud::Dataflow::V1beta3::Metrics::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration))

### #get_job_execution_details

    def get_job_execution_details(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::StageSummary>
    def get_job_execution_details(project_id: nil, job_id: nil, location: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::StageSummary>

Request detailed information about the execution status of the job.


<br />

EXPERIMENTAL. This API is subject to change or removal without notice.
**Overloads**

    def get_job_execution_details(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::StageSummary>

Pass arguments to `get_job_execution_details` via a request object, either of type [GetJobExecutionDetailsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-GetJobExecutionDetailsRequest "Google::Cloud::Dataflow::V1beta3::GetJobExecutionDetailsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataflow::V1beta3::GetJobExecutionDetailsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-GetJobExecutionDetailsRequest), ::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_job_execution_details(project_id: nil, job_id: nil, location: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::StageSummary>

Pass arguments to `get_job_execution_details` 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) --- A project id.
- **job_id** (::String) --- The job to get execution details for.
- **location** (::String) --- The [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.
- **page_size** (::Integer) --- If specified, determines the maximum number of stages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.
- **page_token** (::String) --- If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataflow::V1beta3::StageSummary](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-StageSummary)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataflow::V1beta3::StageSummary](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-StageSummary)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dataflow/v1beta3"

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

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

# Call the get_job_execution_details method.
result = client.get_job_execution_details 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::Dataflow::V1beta3::StageSummary.
  p item
end
```

### #get_job_metrics

    def get_job_metrics(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::JobMetrics
    def get_job_metrics(project_id: nil, job_id: nil, start_time: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::JobMetrics

Request the job status.


<br />

To request the status of a job, we recommend using
`projects.locations.jobs.getMetrics` with a [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using
`projects.jobs.getMetrics` is not recommended, as you can only request the
status of jobs that are running in `us-central1`.
**Overloads**

    def get_job_metrics(request, options = nil) -> ::Google::Cloud::Dataflow::V1beta3::JobMetrics

Pass arguments to `get_job_metrics` via a request object, either of type [GetJobMetricsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-GetJobMetricsRequest "Google::Cloud::Dataflow::V1beta3::GetJobMetricsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataflow::V1beta3::GetJobMetricsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-GetJobMetricsRequest), ::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_job_metrics(project_id: nil, job_id: nil, start_time: nil, location: nil) -> ::Google::Cloud::Dataflow::V1beta3::JobMetrics

Pass arguments to `get_job_metrics` 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) --- A project id.
- **job_id** (::String) --- The job to get metrics for.
- **start_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Protobuf-Timestamp), ::Hash) --- Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.
- **location** (::String) --- The [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dataflow::V1beta3::JobMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-JobMetrics))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Dataflow::V1beta3::JobMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-JobMetrics))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dataflow/v1beta3"

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

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

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

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

### #get_stage_execution_details

    def get_stage_execution_details(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::WorkerDetails>
    def get_stage_execution_details(project_id: nil, job_id: nil, location: nil, stage_id: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::WorkerDetails>

Request detailed information about the execution status of a stage of the
job.


<br />

EXPERIMENTAL. This API is subject to change or removal without notice.
**Overloads**

    def get_stage_execution_details(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::WorkerDetails>

Pass arguments to `get_stage_execution_details` via a request object, either of type [GetStageExecutionDetailsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-GetStageExecutionDetailsRequest "Google::Cloud::Dataflow::V1beta3::GetStageExecutionDetailsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dataflow::V1beta3::GetStageExecutionDetailsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-GetStageExecutionDetailsRequest), ::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_stage_execution_details(project_id: nil, job_id: nil, location: nil, stage_id: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::WorkerDetails>

Pass arguments to `get_stage_execution_details` 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) --- A project id.
- **job_id** (::String) --- The job to get execution details for.
- **location** (::String) --- The [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.
- **stage_id** (::String) --- The stage for which to fetch information.
- **page_size** (::Integer) --- If specified, determines the maximum number of work items to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.
- **page_token** (::String) --- If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.
- **start_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Protobuf-Timestamp), ::Hash) --- Lower time bound of work items to include, by start time.
- **end_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Protobuf-Timestamp), ::Hash) --- Upper time bound of work items to include, by start time.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataflow::V1beta3::WorkerDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-WorkerDetails)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Dataflow::V1beta3::WorkerDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-WorkerDetails)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dataflow/v1beta3"

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

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

# Call the get_stage_execution_details method.
result = client.get_stage_execution_details 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::Dataflow::V1beta3::WorkerDetails.
  p item
end
```

### #initialize

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

Create a new Metrics client object.
**Yields**

- (config) --- Configure the Metrics client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataflow-v1beta3/latest/Google-Cloud-Dataflow-V1beta3-Metrics-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Client.new

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

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)