Class AlertPolicyServiceClientImpl (3.1.0)

public sealed class AlertPolicyServiceClientImpl : AlertPolicyServiceClient

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(AlertPolicyService.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
NameDescription
grpcClientAlertPolicyService.AlertPolicyServiceClient

The underlying gRPC client.

settingsAlertPolicyServiceSettings

The base AlertPolicyServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override AlertPolicyService.AlertPolicyServiceClient GrpcClient { get; }

The underlying gRPC AlertPolicyService client

Property Value
TypeDescription
AlertPolicyService.AlertPolicyServiceClient
Overrides

Methods

CreateAlertPolicy(CreateAlertPolicyRequest, CallSettings)

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

Creates a new alerting policy.

Parameters
NameDescription
requestCreateAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AlertPolicy

The RPC response.

Overrides

CreateAlertPolicyAsync(CreateAlertPolicyRequest, CallSettings)

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

Creates a new alerting policy.

Parameters
NameDescription
requestCreateAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AlertPolicy>

A Task containing the RPC response.

Overrides

DeleteAlertPolicy(DeleteAlertPolicyRequest, CallSettings)

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

Deletes an alerting policy.

Parameters
NameDescription
requestDeleteAlertPolicyRequest

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

callSettingsCallSettings

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.

Parameters
NameDescription
requestDeleteAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AlertPolicy

The RPC response.

Overrides

GetAlertPolicyAsync(GetAlertPolicyRequest, CallSettings)

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

Gets a single alerting policy.

Parameters
NameDescription
requestGetAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AlertPolicy>

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
NameDescription
requestListAlertPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAlertPoliciesResponse, AlertPolicy>

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
NameDescription
requestListAlertPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAlertPoliciesResponse, AlertPolicy>

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.

Parameters
NameDescription
requestUpdateAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestUpdateAlertPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AlertPolicy>

A Task containing the RPC response.

Overrides