Class ErrorStatsServiceClient (1.0.0)

ErrorStatsServiceClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.errorreporting_v1beta1.services.error_stats_service.transports.base.ErrorStatsServiceTransport] = None, client_options: <module 'google.api_core.client_options' from '/workspace/python-error-reporting/.nox/docfx/lib/python3.9/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

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

Methods

ErrorStatsServiceClient

ErrorStatsServiceClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.errorreporting_v1beta1.services.error_stats_service.transports.base.ErrorStatsServiceTransport] = None, client_options: <module 'google.api_core.client_options' from '/workspace/python-error-reporting/.nox/docfx/lib/python3.9/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiate the error stats service client.

Parameters
NameDescription
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Union[str, .ErrorStatsServiceTransport]

The transport to use. If set to None, a transport is chosen automatically.

client_options ClientOptions

Custom options for the client. It won't take effect if a transport instance is provided. (1) The api_endpoint property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS environment variable can also be used to override the endpoint: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint, this is the default value for the environment variable) and "auto" (auto switch to the default mTLS endpoint if client SSL credentials is present). However, the api_endpoint property takes precedence if provided. (2) The client_cert_source property is used to provide client SSL credentials for mutual TLS transport. If not provided, the default SSL credentials will be used if present.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
TypeDescription
google.auth.exceptions.MutualTLSChannelErrorIf mutual TLS transport creation failed for any reason.

delete_events

delete_events(request: Optional[google.cloud.errorreporting_v1beta1.types.error_stats_service.DeleteEventsRequest] = None, *, project_name: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes all error events of a given project.

Parameters
NameDescription
request .error_stats_service.DeleteEventsRequest

The request object. Deletes all events in the project.

project_name str

Required. The resource name of the Google Cloud Platform project. Written as projects/ plus the Google Cloud Platform project ID https://support.google.com/cloud/answer/6158840__. Example: projects/my-project-123. This corresponds to the project_name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.error_stats_service.DeleteEventsResponseResponse message for deleting error events.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
{@api.name}The constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
NameDescription
filename str

The path to the service account private key json file.

Returns
TypeDescription
{@api.name}The constructed client.

list_events

list_events(request: Optional[google.cloud.errorreporting_v1beta1.types.error_stats_service.ListEventsRequest] = None, *, project_name: Optional[str] = None, group_id: Optional[str] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists the specified events.

Parameters
NameDescription
request .error_stats_service.ListEventsRequest

The request object. Specifies a set of error events to return.

project_name str

Required. The resource name of the Google Cloud Platform project. Written as projects/ plus the Google Cloud Platform project ID https://support.google.com/cloud/answer/6158840__. Example: projects/my-project-123. This corresponds to the project_name field on the request instance; if request is provided, this should not be set.

group_id str

Required. The group for which events shall be returned. This corresponds to the group_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.pagers.ListEventsPagerContains a set of requested error events. Iterating over this object will yield results and resolve additional pages automatically.

list_group_stats

list_group_stats(request: Optional[google.cloud.errorreporting_v1beta1.types.error_stats_service.ListGroupStatsRequest] = None, *, project_name: Optional[str] = None, time_range: Optional[google.cloud.errorreporting_v1beta1.types.error_stats_service.QueryTimeRange] = None, retry: google.api_core.retry.Retry = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Lists the specified groups.

Parameters
NameDescription
request .error_stats_service.ListGroupStatsRequest

The request object. Specifies a set of ErrorGroupStats to return.

project_name str

Required. The resource name of the Google Cloud Platform project. Written as projects/ plus the Google Cloud Platform project ID. Example: projects/my- project-123. This corresponds to the project_name field on the request instance; if request is provided, this should not be set.

time_range .error_stats_service.QueryTimeRange

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. This corresponds to the time_range field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, str]]

Strings which should be sent along with the request as metadata.

Returns
TypeDescription
.pagers.ListGroupStatsPagerContains a set of requested error group stats. Iterating over this object will yield results and resolve additional pages automatically.