Error Reporting V1beta1 API - Class Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client (v0.10.0)

Reference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client.

REST client for the ErrorStatsService service.

An API for retrieving and managing error statistics as well as data for individual events.

Inherits

  • Object

Methods

.configure

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

Configure the ErrorStatsService 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 ErrorStatsService clients
::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the ErrorStatsService 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_events

def delete_events(request, options = nil) -> ::Google::Cloud::ErrorReporting::V1beta1::DeleteEventsResponse
def delete_events(project_name: nil) -> ::Google::Cloud::ErrorReporting::V1beta1::DeleteEventsResponse

Deletes all error events of a given project.

Overloads
def delete_events(request, options = nil) -> ::Google::Cloud::ErrorReporting::V1beta1::DeleteEventsResponse
Pass arguments to delete_events via a request object, either of type DeleteEventsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ErrorReporting::V1beta1::DeleteEventsRequest, ::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_events(project_name: nil) -> ::Google::Cloud::ErrorReporting::V1beta1::DeleteEventsResponse
Pass arguments to delete_events 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
  • project_name (::String) — Required. The resource name of the Google Cloud Platform project. Written as projects/{projectID}, where {projectID} is the Google Cloud Platform project ID.

    Example: projects/my-project-123.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/error_reporting/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ErrorReporting::V1beta1::DeleteEventsRequest.new

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

# The returned object is of type Google::Cloud::ErrorReporting::V1beta1::DeleteEventsResponse.
p result

#initialize

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

Create a new ErrorStatsService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_events

def list_events(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorEvent>
def list_events(project_name: nil, group_id: nil, service_filter: nil, time_range: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorEvent>

Lists the specified events.

Overloads
def list_events(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorEvent>
Pass arguments to list_events via a request object, either of type ListEventsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ErrorReporting::V1beta1::ListEventsRequest, ::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_events(project_name: nil, group_id: nil, service_filter: nil, time_range: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorEvent>
Pass arguments to list_events 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_name (::String) — Required. The resource name of the Google Cloud Platform project. Written as projects/{projectID}, where {projectID} is the Google Cloud Platform project ID.

    Example: projects/my-project-123.

  • group_id (::String) — Required. The group for which events shall be returned.
  • service_filter (::Google::Cloud::ErrorReporting::V1beta1::ServiceContextFilter, ::Hash) — Optional. List only ErrorGroups which belong to a service context that matches the filter. Data for all service contexts is returned if this field is not specified.
  • time_range (::Google::Cloud::ErrorReporting::V1beta1::QueryTimeRange, ::Hash) — Optional. List only data for the given time range. If not set a default time range is used. The field time_range_begin in the response will specify the beginning of this time range.
  • page_size (::Integer) — Optional. The maximum number of results to return per response.
  • page_token (::String) — Optional. A next_page_token provided by a previous response.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/error_reporting/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ErrorReporting::V1beta1::ListEventsRequest.new

# Call the list_events method.
result = client.list_events 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::ErrorReporting::V1beta1::ErrorEvent.
  p item
end

#list_group_stats

def list_group_stats(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupStats>
def list_group_stats(project_name: nil, group_id: nil, service_filter: nil, time_range: nil, timed_count_duration: nil, alignment: nil, alignment_time: nil, order: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupStats>

Lists the specified groups.

Overloads
def list_group_stats(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupStats>
Pass arguments to list_group_stats via a request object, either of type ListGroupStatsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ErrorReporting::V1beta1::ListGroupStatsRequest, ::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_group_stats(project_name: nil, group_id: nil, service_filter: nil, time_range: nil, timed_count_duration: nil, alignment: nil, alignment_time: nil, order: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupStats>
Pass arguments to list_group_stats 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_name (::String) — Required. The resource name of the Google Cloud Platform project. Written as projects/{projectID} or projects/{projectNumber}, where {projectID} and {projectNumber} can be found in the Google Cloud Console.

    Examples: projects/my-project-123, projects/5551234.

  • group_id (::Array<::String>) — Optional. List all ErrorGroupStats with these IDs.
  • service_filter (::Google::Cloud::ErrorReporting::V1beta1::ServiceContextFilter, ::Hash) — Optional. List only ErrorGroupStats which belong to a service context that matches the filter. Data for all service contexts is returned if this field is not specified.
  • time_range (::Google::Cloud::ErrorReporting::V1beta1::QueryTimeRange, ::Hash) — Optional. List data for the given time range. If not set, a default time range is used. The field time_range_begin in the response will specify the beginning of this time range. Only ErrorGroupStats with a non-zero count in the given time range are returned, unless the request contains an explicit group_id list. If a group_id list is given, also ErrorGroupStats with zero occurrences are returned.
  • timed_count_duration (::Google::Protobuf::Duration, ::Hash) — Optional. The preferred duration for a single returned TimedCount. If not set, no timed counts are returned.
  • alignment (::Google::Cloud::ErrorReporting::V1beta1::TimedCountAlignment) — Optional. The alignment of the timed counts to be returned. Default is ALIGNMENT_EQUAL_AT_END.
  • alignment_time (::Google::Protobuf::Timestamp, ::Hash) — Optional. Time where the timed counts shall be aligned if rounded alignment is chosen. Default is 00:00 UTC.
  • order (::Google::Cloud::ErrorReporting::V1beta1::ErrorGroupOrder) — Optional. The sort order in which the results are returned. Default is COUNT_DESC.
  • page_size (::Integer) — Optional. The maximum number of results to return per response. Default is 20.
  • page_token (::String) — Optional. A next_page_token provided by a previous response. To view additional results, pass this token along with the identical query parameters as the first request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/error_reporting/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ErrorReporting::V1beta1::ErrorStatsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ErrorReporting::V1beta1::ListGroupStatsRequest.new

# Call the list_group_stats method.
result = client.list_group_stats 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::ErrorReporting::V1beta1::ErrorGroupStats.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)