Google Cloud Error Reporting v1beta1 API - Class ErrorStatsServiceClient (3.0.0-beta04)

public abstract class ErrorStatsServiceClient

Reference documentation and code samples for the Google Cloud Error Reporting v1beta1 API class ErrorStatsServiceClient.

ErrorStatsService client wrapper, for convenient use.

Inheritance

object > ErrorStatsServiceClient

Namespace

Google.Cloud.ErrorReporting.V1Beta1

Assembly

Google.Cloud.ErrorReporting.V1Beta1.dll

Remarks

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

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ErrorStatsService service, which is a host of "clouderrorreporting.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ErrorStatsService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default ErrorStatsService scopes are:

GrpcClient

public virtual ErrorStatsService.ErrorStatsServiceClient GrpcClient { get; }

The underlying gRPC ErrorStatsService client

Property Value
TypeDescription
ErrorStatsServiceErrorStatsServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static ErrorStatsServiceClient Create()

Synchronously creates a ErrorStatsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ErrorStatsServiceClientBuilder.

Returns
TypeDescription
ErrorStatsServiceClient

The created ErrorStatsServiceClient.

CreateAsync(CancellationToken)

public static Task<ErrorStatsServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ErrorStatsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ErrorStatsServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskErrorStatsServiceClient

The task representing the created ErrorStatsServiceClient.

DeleteEvents(ProjectName, CallSettings)

public virtual DeleteEventsResponse DeleteEvents(ProjectName projectName, CallSettings callSettings = null)

Deletes all error events of a given project.

Parameters
NameDescription
projectNameProjectName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeleteEventsResponse

The RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
ProjectName projectName = ProjectName.FromProject("[PROJECT]");
// Make the request
DeleteEventsResponse response = errorStatsServiceClient.DeleteEvents(projectName);

DeleteEvents(DeleteEventsRequest, CallSettings)

public virtual DeleteEventsResponse DeleteEvents(DeleteEventsRequest request, CallSettings callSettings = null)

Deletes all error events of a given project.

Parameters
NameDescription
requestDeleteEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeleteEventsResponse

The RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
DeleteEventsRequest request = new DeleteEventsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
DeleteEventsResponse response = errorStatsServiceClient.DeleteEvents(request);

DeleteEvents(string, CallSettings)

public virtual DeleteEventsResponse DeleteEvents(string projectName, CallSettings callSettings = null)

Deletes all error events of a given project.

Parameters
NameDescription
projectNamestring

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DeleteEventsResponse

The RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
// Make the request
DeleteEventsResponse response = errorStatsServiceClient.DeleteEvents(projectName);

DeleteEventsAsync(ProjectName, CallSettings)

public virtual Task<DeleteEventsResponse> DeleteEventsAsync(ProjectName projectName, CallSettings callSettings = null)

Deletes all error events of a given project.

Parameters
NameDescription
projectNameProjectName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDeleteEventsResponse

A Task containing the RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName projectName = ProjectName.FromProject("[PROJECT]");
// Make the request
DeleteEventsResponse response = await errorStatsServiceClient.DeleteEventsAsync(projectName);

DeleteEventsAsync(ProjectName, CancellationToken)

public virtual Task<DeleteEventsResponse> DeleteEventsAsync(ProjectName projectName, CancellationToken cancellationToken)

Deletes all error events of a given project.

Parameters
NameDescription
projectNameProjectName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDeleteEventsResponse

A Task containing the RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName projectName = ProjectName.FromProject("[PROJECT]");
// Make the request
DeleteEventsResponse response = await errorStatsServiceClient.DeleteEventsAsync(projectName);

DeleteEventsAsync(DeleteEventsRequest, CallSettings)

public virtual Task<DeleteEventsResponse> DeleteEventsAsync(DeleteEventsRequest request, CallSettings callSettings = null)

Deletes all error events of a given project.

Parameters
NameDescription
requestDeleteEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDeleteEventsResponse

A Task containing the RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteEventsRequest request = new DeleteEventsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
DeleteEventsResponse response = await errorStatsServiceClient.DeleteEventsAsync(request);

DeleteEventsAsync(DeleteEventsRequest, CancellationToken)

public virtual Task<DeleteEventsResponse> DeleteEventsAsync(DeleteEventsRequest request, CancellationToken cancellationToken)

Deletes all error events of a given project.

Parameters
NameDescription
requestDeleteEventsRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDeleteEventsResponse

A Task containing the RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteEventsRequest request = new DeleteEventsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
DeleteEventsResponse response = await errorStatsServiceClient.DeleteEventsAsync(request);

DeleteEventsAsync(string, CallSettings)

public virtual Task<DeleteEventsResponse> DeleteEventsAsync(string projectName, CallSettings callSettings = null)

Deletes all error events of a given project.

Parameters
NameDescription
projectNamestring

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDeleteEventsResponse

A Task containing the RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
// Make the request
DeleteEventsResponse response = await errorStatsServiceClient.DeleteEventsAsync(projectName);

DeleteEventsAsync(string, CancellationToken)

public virtual Task<DeleteEventsResponse> DeleteEventsAsync(string projectName, CancellationToken cancellationToken)

Deletes all error events of a given project.

Parameters
NameDescription
projectNamestring

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDeleteEventsResponse

A Task containing the RPC response.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
// Make the request
DeleteEventsResponse response = await errorStatsServiceClient.DeleteEventsAsync(projectName);

ListEvents(ProjectName, string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEventsResponse, ErrorEvent> ListEvents(ProjectName projectName, string groupId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified events.

Parameters
NameDescription
projectNameProjectName

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.

groupIdstring

Required. The group for which events shall be returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEventsResponseErrorEvent

A pageable sequence of ErrorEvent resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
ProjectName projectName = ProjectName.FromProject("[PROJECT]");
string groupId = "";
// Make the request
PagedEnumerable<ListEventsResponse, ErrorEvent> response = errorStatsServiceClient.ListEvents(projectName, groupId);

// Iterate over all response items, lazily performing RPCs as required
foreach (ErrorEvent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorEvent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEvents(ListEventsRequest, CallSettings)

public virtual PagedEnumerable<ListEventsResponse, ErrorEvent> ListEvents(ListEventsRequest request, CallSettings callSettings = null)

Lists the specified events.

Parameters
NameDescription
requestListEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEventsResponseErrorEvent

A pageable sequence of ErrorEvent resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
ListEventsRequest request = new ListEventsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
    GroupId = "",
    ServiceFilter = new ServiceContextFilter(),
    TimeRange = new QueryTimeRange(),
};
// Make the request
PagedEnumerable<ListEventsResponse, ErrorEvent> response = errorStatsServiceClient.ListEvents(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ErrorEvent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorEvent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEvents(string, string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEventsResponse, ErrorEvent> ListEvents(string projectName, string groupId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified events.

Parameters
NameDescription
projectNamestring

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.

groupIdstring

Required. The group for which events shall be returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEventsResponseErrorEvent

A pageable sequence of ErrorEvent resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
string groupId = "";
// Make the request
PagedEnumerable<ListEventsResponse, ErrorEvent> response = errorStatsServiceClient.ListEvents(projectName, groupId);

// Iterate over all response items, lazily performing RPCs as required
foreach (ErrorEvent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorEvent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEventsAsync(ProjectName, string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEventsResponse, ErrorEvent> ListEventsAsync(ProjectName projectName, string groupId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified events.

Parameters
NameDescription
projectNameProjectName

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.

groupIdstring

Required. The group for which events shall be returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEventsResponseErrorEvent

A pageable asynchronous sequence of ErrorEvent resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName projectName = ProjectName.FromProject("[PROJECT]");
string groupId = "";
// Make the request
PagedAsyncEnumerable<ListEventsResponse, ErrorEvent> response = errorStatsServiceClient.ListEventsAsync(projectName, groupId);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ErrorEvent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorEvent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEventsAsync(ListEventsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEventsResponse, ErrorEvent> ListEventsAsync(ListEventsRequest request, CallSettings callSettings = null)

Lists the specified events.

Parameters
NameDescription
requestListEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEventsResponseErrorEvent

A pageable asynchronous sequence of ErrorEvent resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
ListEventsRequest request = new ListEventsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
    GroupId = "",
    ServiceFilter = new ServiceContextFilter(),
    TimeRange = new QueryTimeRange(),
};
// Make the request
PagedAsyncEnumerable<ListEventsResponse, ErrorEvent> response = errorStatsServiceClient.ListEventsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ErrorEvent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorEvent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEventsAsync(string, string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEventsResponse, ErrorEvent> ListEventsAsync(string projectName, string groupId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified events.

Parameters
NameDescription
projectNamestring

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.

groupIdstring

Required. The group for which events shall be returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEventsResponseErrorEvent

A pageable asynchronous sequence of ErrorEvent resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
string groupId = "";
// Make the request
PagedAsyncEnumerable<ListEventsResponse, ErrorEvent> response = errorStatsServiceClient.ListEventsAsync(projectName, groupId);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ErrorEvent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorEvent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListGroupStats(ProjectName, QueryTimeRange, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupStatsResponse, ErrorGroupStats> ListGroupStats(ProjectName projectName, QueryTimeRange timeRange, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified groups.

Parameters
NameDescription
projectNameProjectName

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.

timeRangeQueryTimeRange

Optional. List data for the given time range. If not set, a default time range is used. The field <code>time_range_begin</code> in the response will specify the beginning of this time range. Only <code>ErrorGroupStats</code> with a non-zero count in the given time range are returned, unless the request contains an explicit <code>group_id</code> list. If a <code>group_id</code> list is given, also <code>ErrorGroupStats</code> with zero occurrences are returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupStatsResponseErrorGroupStats

A pageable sequence of ErrorGroupStats resources.

Example
ErrorStatsServiceClient client = ErrorStatsServiceClient.Create();
ProjectName projectName = new ProjectName(projectId);
PagedEnumerable<ListGroupStatsResponse, ErrorGroupStats> groupStats = client.ListGroupStats(
    projectName,
    new QueryTimeRange { Period = Period._30Days });
foreach (ErrorGroupStats item in groupStats)
{
    // Sample output: Group: 8002882452986879952; Count: 6; Services: SampleApp/1.0.0
    IEnumerable<string> services = item.AffectedServices.Select(s => $"{s.Service}/{s.Version}");
    Console.WriteLine($"Group: {item.Group.GroupId}; Count: {item.Count}; Services: {string.Join(", ", services)}");
}

ListGroupStats(ListGroupStatsRequest, CallSettings)

public virtual PagedEnumerable<ListGroupStatsResponse, ErrorGroupStats> ListGroupStats(ListGroupStatsRequest request, CallSettings callSettings = null)

Lists the specified groups.

Parameters
NameDescription
requestListGroupStatsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupStatsResponseErrorGroupStats

A pageable sequence of ErrorGroupStats resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
ListGroupStatsRequest request = new ListGroupStatsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
    GroupId = { "", },
    ServiceFilter = new ServiceContextFilter(),
    TimeRange = new QueryTimeRange(),
    TimedCountDuration = new Duration(),
    Alignment = TimedCountAlignment.ErrorCountAlignmentUnspecified,
    AlignmentTime = new Timestamp(),
    Order = ErrorGroupOrder.GroupOrderUnspecified,
};
// Make the request
PagedEnumerable<ListGroupStatsResponse, ErrorGroupStats> response = errorStatsServiceClient.ListGroupStats(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ErrorGroupStats item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListGroupStatsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorGroupStats item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorGroupStats> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorGroupStats item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListGroupStats(string, QueryTimeRange, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupStatsResponse, ErrorGroupStats> ListGroupStats(string projectName, QueryTimeRange timeRange, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified groups.

Parameters
NameDescription
projectNamestring

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.

timeRangeQueryTimeRange

Optional. List data for the given time range. If not set, a default time range is used. The field <code>time_range_begin</code> in the response will specify the beginning of this time range. Only <code>ErrorGroupStats</code> with a non-zero count in the given time range are returned, unless the request contains an explicit <code>group_id</code> list. If a <code>group_id</code> list is given, also <code>ErrorGroupStats</code> with zero occurrences are returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupStatsResponseErrorGroupStats

A pageable sequence of ErrorGroupStats resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.Create();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
QueryTimeRange timeRange = new QueryTimeRange();
// Make the request
PagedEnumerable<ListGroupStatsResponse, ErrorGroupStats> response = errorStatsServiceClient.ListGroupStats(projectName, timeRange);

// Iterate over all response items, lazily performing RPCs as required
foreach (ErrorGroupStats item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListGroupStatsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorGroupStats item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorGroupStats> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorGroupStats item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListGroupStatsAsync(ProjectName, QueryTimeRange, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupStatsResponse, ErrorGroupStats> ListGroupStatsAsync(ProjectName projectName, QueryTimeRange timeRange, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified groups.

Parameters
NameDescription
projectNameProjectName

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.

timeRangeQueryTimeRange

Optional. List data for the given time range. If not set, a default time range is used. The field <code>time_range_begin</code> in the response will specify the beginning of this time range. Only <code>ErrorGroupStats</code> with a non-zero count in the given time range are returned, unless the request contains an explicit <code>group_id</code> list. If a <code>group_id</code> list is given, also <code>ErrorGroupStats</code> with zero occurrences are returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupStatsResponseErrorGroupStats

A pageable asynchronous sequence of ErrorGroupStats resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName projectName = ProjectName.FromProject("[PROJECT]");
QueryTimeRange timeRange = new QueryTimeRange();
// Make the request
PagedAsyncEnumerable<ListGroupStatsResponse, ErrorGroupStats> response = errorStatsServiceClient.ListGroupStatsAsync(projectName, timeRange);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ErrorGroupStats item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListGroupStatsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorGroupStats item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorGroupStats> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorGroupStats item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListGroupStatsAsync(ListGroupStatsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupStatsResponse, ErrorGroupStats> ListGroupStatsAsync(ListGroupStatsRequest request, CallSettings callSettings = null)

Lists the specified groups.

Parameters
NameDescription
requestListGroupStatsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupStatsResponseErrorGroupStats

A pageable asynchronous sequence of ErrorGroupStats resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
ListGroupStatsRequest request = new ListGroupStatsRequest
{
    ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
    GroupId = { "", },
    ServiceFilter = new ServiceContextFilter(),
    TimeRange = new QueryTimeRange(),
    TimedCountDuration = new Duration(),
    Alignment = TimedCountAlignment.ErrorCountAlignmentUnspecified,
    AlignmentTime = new Timestamp(),
    Order = ErrorGroupOrder.GroupOrderUnspecified,
};
// Make the request
PagedAsyncEnumerable<ListGroupStatsResponse, ErrorGroupStats> response = errorStatsServiceClient.ListGroupStatsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ErrorGroupStats item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListGroupStatsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorGroupStats item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorGroupStats> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorGroupStats item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListGroupStatsAsync(string, QueryTimeRange, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupStatsResponse, ErrorGroupStats> ListGroupStatsAsync(string projectName, QueryTimeRange timeRange, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the specified groups.

Parameters
NameDescription
projectNamestring

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.

timeRangeQueryTimeRange

Optional. List data for the given time range. If not set, a default time range is used. The field <code>time_range_begin</code> in the response will specify the beginning of this time range. Only <code>ErrorGroupStats</code> with a non-zero count in the given time range are returned, unless the request contains an explicit <code>group_id</code> list. If a <code>group_id</code> list is given, also <code>ErrorGroupStats</code> with zero occurrences are returned.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupStatsResponseErrorGroupStats

A pageable asynchronous sequence of ErrorGroupStats resources.

Example
// Create client
ErrorStatsServiceClient errorStatsServiceClient = await ErrorStatsServiceClient.CreateAsync();
// Initialize request argument(s)
string projectName = "projects/[PROJECT]";
QueryTimeRange timeRange = new QueryTimeRange();
// Make the request
PagedAsyncEnumerable<ListGroupStatsResponse, ErrorGroupStats> response = errorStatsServiceClient.ListGroupStatsAsync(projectName, timeRange);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ErrorGroupStats item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListGroupStatsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ErrorGroupStats item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ErrorGroupStats> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ErrorGroupStats item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.