Google Cloud Monitoring v3 API - Class AlertPolicyServiceClientImpl (3.13.0)

public sealed class AlertPolicyServiceClientImpl : AlertPolicyServiceClient

Reference documentation and code samples for the Google Cloud Monitoring v3 API class AlertPolicyServiceClientImpl.

AlertPolicyService client wrapper implementation, for convenient use.

Inheritance

object > AlertPolicyServiceClient > AlertPolicyServiceClientImpl

Namespace

Google.Cloud.Monitoring.V3

Assembly

Google.Cloud.Monitoring.V3.dll

Remarks

The AlertPolicyService API is used to manage (list, create, delete, edit) alert policies in Cloud Monitoring. An alerting policy is a description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. In addition to using this API, alert policies can also be managed through Cloud Monitoring, which can be reached by clicking the "Monitoring" tab in Cloud console.

Constructors

AlertPolicyServiceClientImpl(AlertPolicyServiceClient, AlertPolicyServiceSettings, ILogger)

public AlertPolicyServiceClientImpl(AlertPolicyService.AlertPolicyServiceClient grpcClient, AlertPolicyServiceSettings settings, ILogger logger)

Constructs a client wrapper for the AlertPolicyService service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient AlertPolicyServiceAlertPolicyServiceClient

The underlying gRPC client.

settings AlertPolicyServiceSettings

The base AlertPolicyServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override AlertPolicyService.AlertPolicyServiceClient GrpcClient { get; }

The underlying gRPC AlertPolicyService client

Property Value
Type Description
AlertPolicyServiceAlertPolicyServiceClient
Overrides

Methods

CreateAlertPolicy(CreateAlertPolicyRequest, CallSettings)

public override AlertPolicy CreateAlertPolicy(CreateAlertPolicyRequest request, CallSettings callSettings = null)

Creates a new alerting policy.

Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.

Parameters
Name Description
request CreateAlertPolicyRequest

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
AlertPolicy

The RPC response.

Overrides

CreateAlertPolicyAsync(CreateAlertPolicyRequest, CallSettings)

public override Task<AlertPolicy> CreateAlertPolicyAsync(CreateAlertPolicyRequest request, CallSettings callSettings = null)

Creates a new alerting policy.

Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.

Parameters
Name Description
request CreateAlertPolicyRequest

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
TaskAlertPolicy

A Task containing the RPC response.

Overrides

DeleteAlertPolicy(DeleteAlertPolicyRequest, CallSettings)

public override void DeleteAlertPolicy(DeleteAlertPolicyRequest request, CallSettings callSettings = null)

Deletes an alerting policy.

Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.

Parameters
Name Description
request DeleteAlertPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteAlertPolicyAsync(DeleteAlertPolicyRequest, CallSettings)

public override Task DeleteAlertPolicyAsync(DeleteAlertPolicyRequest request, CallSettings callSettings = null)

Deletes an alerting policy.

Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.

Parameters
Name Description
request DeleteAlertPolicyRequest

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
Task

A Task containing the RPC response.

Overrides

GetAlertPolicy(GetAlertPolicyRequest, CallSettings)

public override AlertPolicy GetAlertPolicy(GetAlertPolicyRequest request, CallSettings callSettings = null)

Gets a single alerting policy.

Parameters
Name Description
request GetAlertPolicyRequest

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
AlertPolicy

The RPC response.

Overrides

GetAlertPolicyAsync(GetAlertPolicyRequest, CallSettings)

public override Task<AlertPolicy> GetAlertPolicyAsync(GetAlertPolicyRequest request, CallSettings callSettings = null)

Gets a single alerting policy.

Parameters
Name Description
request GetAlertPolicyRequest

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
TaskAlertPolicy

A Task containing the RPC response.

Overrides

ListAlertPolicies(ListAlertPoliciesRequest, CallSettings)

public override PagedEnumerable<ListAlertPoliciesResponse, AlertPolicy> ListAlertPolicies(ListAlertPoliciesRequest request, CallSettings callSettings = null)

Lists the existing alerting policies for the workspace.

Parameters
Name Description
request ListAlertPoliciesRequest

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
PagedEnumerableListAlertPoliciesResponseAlertPolicy

A pageable sequence of AlertPolicy resources.

Overrides

ListAlertPoliciesAsync(ListAlertPoliciesRequest, CallSettings)

public override PagedAsyncEnumerable<ListAlertPoliciesResponse, AlertPolicy> ListAlertPoliciesAsync(ListAlertPoliciesRequest request, CallSettings callSettings = null)

Lists the existing alerting policies for the workspace.

Parameters
Name Description
request ListAlertPoliciesRequest

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
PagedAsyncEnumerableListAlertPoliciesResponseAlertPolicy

A pageable asynchronous sequence of AlertPolicy resources.

Overrides

UpdateAlertPolicy(UpdateAlertPolicyRequest, CallSettings)

public override AlertPolicy UpdateAlertPolicy(UpdateAlertPolicyRequest request, CallSettings callSettings = null)

Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.

Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.

Parameters
Name Description
request UpdateAlertPolicyRequest

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
AlertPolicy

The RPC response.

Overrides

UpdateAlertPolicyAsync(UpdateAlertPolicyRequest, CallSettings)

public override Task<AlertPolicy> UpdateAlertPolicyAsync(UpdateAlertPolicyRequest request, CallSettings callSettings = null)

Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.

Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.

Parameters
Name Description
request UpdateAlertPolicyRequest

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
TaskAlertPolicy

A Task containing the RPC response.

Overrides