Chronicle v1 API - Class RuleExecutionErrorServiceClient (1.0.0-beta06)

public abstract class RuleExecutionErrorServiceClient

Reference documentation and code samples for the Chronicle v1 API class RuleExecutionErrorServiceClient.

RuleExecutionErrorService client wrapper, for convenient use.

Inheritance

object > RuleExecutionErrorServiceClient

Namespace

Google.Cloud.Chronicle.V1

Assembly

Google.Cloud.Chronicle.V1.dll

Remarks

RuleExecutionErrorService contains endpoints related to rule execution errors.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default RuleExecutionErrorService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual RuleExecutionErrorService.RuleExecutionErrorServiceClient GrpcClient { get; }

The underlying gRPC RuleExecutionErrorService client

Property Value
Type Description
RuleExecutionErrorServiceRuleExecutionErrorServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static RuleExecutionErrorServiceClient Create()

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

Returns
Type Description
RuleExecutionErrorServiceClient

The created RuleExecutionErrorServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskRuleExecutionErrorServiceClient

The task representing the created RuleExecutionErrorServiceClient.

ListRuleExecutionErrors(InstanceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> ListRuleExecutionErrors(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists rule execution errors.

Parameters
Name Description
parent InstanceName

Required. The instance to list rule execution errors from. Format: projects/{project}/locations/{location}/instances/{instance}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListRuleExecutionErrorsResponseRuleExecutionError

A pageable sequence of RuleExecutionError resources.

Example
// Create client
RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = RuleExecutionErrorServiceClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
PagedEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> response = ruleExecutionErrorServiceClient.ListRuleExecutionErrors(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (RuleExecutionError 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 (ListRuleExecutionErrorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RuleExecutionError 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<RuleExecutionError> 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 (RuleExecutionError 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;

ListRuleExecutionErrors(ListRuleExecutionErrorsRequest, CallSettings)

public virtual PagedEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> ListRuleExecutionErrors(ListRuleExecutionErrorsRequest request, CallSettings callSettings = null)

Lists rule execution errors.

Parameters
Name Description
request ListRuleExecutionErrorsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListRuleExecutionErrorsResponseRuleExecutionError

A pageable sequence of RuleExecutionError resources.

Example
// Create client
RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = RuleExecutionErrorServiceClient.Create();
// Initialize request argument(s)
ListRuleExecutionErrorsRequest request = new ListRuleExecutionErrorsRequest
{
    ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> response = ruleExecutionErrorServiceClient.ListRuleExecutionErrors(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (RuleExecutionError 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 (ListRuleExecutionErrorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RuleExecutionError 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<RuleExecutionError> 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 (RuleExecutionError 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;

ListRuleExecutionErrors(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> ListRuleExecutionErrors(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists rule execution errors.

Parameters
Name Description
parent string

Required. The instance to list rule execution errors from. Format: projects/{project}/locations/{location}/instances/{instance}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListRuleExecutionErrorsResponseRuleExecutionError

A pageable sequence of RuleExecutionError resources.

Example
// Create client
RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = RuleExecutionErrorServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
PagedEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> response = ruleExecutionErrorServiceClient.ListRuleExecutionErrors(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (RuleExecutionError 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 (ListRuleExecutionErrorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RuleExecutionError 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<RuleExecutionError> 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 (RuleExecutionError 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;

ListRuleExecutionErrorsAsync(InstanceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> ListRuleExecutionErrorsAsync(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists rule execution errors.

Parameters
Name Description
parent InstanceName

Required. The instance to list rule execution errors from. Format: projects/{project}/locations/{location}/instances/{instance}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListRuleExecutionErrorsResponseRuleExecutionError

A pageable asynchronous sequence of RuleExecutionError resources.

Example
// Create client
RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = await RuleExecutionErrorServiceClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
PagedAsyncEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> response = ruleExecutionErrorServiceClient.ListRuleExecutionErrorsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListRuleExecutionErrorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RuleExecutionError 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<RuleExecutionError> 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 (RuleExecutionError 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;

ListRuleExecutionErrorsAsync(ListRuleExecutionErrorsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> ListRuleExecutionErrorsAsync(ListRuleExecutionErrorsRequest request, CallSettings callSettings = null)

Lists rule execution errors.

Parameters
Name Description
request ListRuleExecutionErrorsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListRuleExecutionErrorsResponseRuleExecutionError

A pageable asynchronous sequence of RuleExecutionError resources.

Example
// Create client
RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = await RuleExecutionErrorServiceClient.CreateAsync();
// Initialize request argument(s)
ListRuleExecutionErrorsRequest request = new ListRuleExecutionErrorsRequest
{
    ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> response = ruleExecutionErrorServiceClient.ListRuleExecutionErrorsAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListRuleExecutionErrorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RuleExecutionError 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<RuleExecutionError> 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 (RuleExecutionError 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;

ListRuleExecutionErrorsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> ListRuleExecutionErrorsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists rule execution errors.

Parameters
Name Description
parent string

Required. The instance to list rule execution errors from. Format: projects/{project}/locations/{location}/instances/{instance}

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListRuleExecutionErrorsResponseRuleExecutionError

A pageable asynchronous sequence of RuleExecutionError resources.

Example
// Create client
RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = await RuleExecutionErrorServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
PagedAsyncEnumerable<ListRuleExecutionErrorsResponse, RuleExecutionError> response = ruleExecutionErrorServiceClient.ListRuleExecutionErrorsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListRuleExecutionErrorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (RuleExecutionError 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<RuleExecutionError> 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 (RuleExecutionError 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
Type Description
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.