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.
Namespace
Google.Cloud.Monitoring.V3Assembly
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 |
Methods
CreateAlertPolicy(CreateAlertPolicyRequest, CallSettings)
public override AlertPolicy CreateAlertPolicy(CreateAlertPolicyRequest request, CallSettings callSettings = null)
Creates a new alerting policy.
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. |
CreateAlertPolicyAsync(CreateAlertPolicyRequest, CallSettings)
public override Task<AlertPolicy> CreateAlertPolicyAsync(CreateAlertPolicyRequest request, CallSettings callSettings = null)
Creates a new alerting policy.
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. |
DeleteAlertPolicy(DeleteAlertPolicyRequest, CallSettings)
public override void DeleteAlertPolicy(DeleteAlertPolicyRequest request, CallSettings callSettings = null)
Deletes an alerting policy.
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. |
DeleteAlertPolicyAsync(DeleteAlertPolicyRequest, CallSettings)
public override Task DeleteAlertPolicyAsync(DeleteAlertPolicyRequest request, CallSettings callSettings = null)
Deletes an alerting policy.
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. |
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. |
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. |
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. |
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. |
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 | |
---|---|
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. |
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 | |
---|---|
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. |