Google Cloud Monitoring v3 API - Class AlertPolicyService.AlertPolicyServiceClient (3.8.0)

public class AlertPolicyService.AlertPolicyServiceClient : ClientBase<AlertPolicyService.AlertPolicyServiceClient>

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

Client for AlertPolicyService

Inheritance

object > ClientBase > ClientBaseAlertPolicyServiceAlertPolicyServiceClient > AlertPolicyService.AlertPolicyServiceClient

Namespace

Google.Cloud.Monitoring.V3

Assembly

Google.Cloud.Monitoring.V3.dll

Constructors

AlertPolicyServiceClient()

protected AlertPolicyServiceClient()

Protected parameterless constructor to allow creation of test doubles.

AlertPolicyServiceClient(CallInvoker)

public AlertPolicyServiceClient(CallInvoker callInvoker)

Creates a new client for AlertPolicyService that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

AlertPolicyServiceClient(ChannelBase)

public AlertPolicyServiceClient(ChannelBase channel)

Creates a new client for AlertPolicyService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

AlertPolicyServiceClient(ClientBaseConfiguration)

protected AlertPolicyServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateAlertPolicy(CreateAlertPolicyRequest, CallOptions)

public virtual AlertPolicy CreateAlertPolicy(CreateAlertPolicyRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AlertPolicy

The response received from the server.

CreateAlertPolicy(CreateAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AlertPolicy CreateAlertPolicy(CreateAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AlertPolicy

The response received from the server.

CreateAlertPolicyAsync(CreateAlertPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<AlertPolicy> CreateAlertPolicyAsync(CreateAlertPolicyRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAlertPolicy

The call object.

CreateAlertPolicyAsync(CreateAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AlertPolicy> CreateAlertPolicyAsync(CreateAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAlertPolicy

The call object.

DeleteAlertPolicy(DeleteAlertPolicyRequest, CallOptions)

public virtual Empty DeleteAlertPolicy(DeleteAlertPolicyRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAlertPolicy(DeleteAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteAlertPolicy(DeleteAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAlertPolicyAsync(DeleteAlertPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteAlertPolicyAsync(DeleteAlertPolicyRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteAlertPolicyAsync(DeleteAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteAlertPolicyAsync(DeleteAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

GetAlertPolicy(GetAlertPolicyRequest, CallOptions)

public virtual AlertPolicy GetAlertPolicy(GetAlertPolicyRequest request, CallOptions options)

Gets a single alerting policy.

Parameters
NameDescription
requestGetAlertPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AlertPolicy

The response received from the server.

GetAlertPolicy(GetAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AlertPolicy GetAlertPolicy(GetAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a single alerting policy.

Parameters
NameDescription
requestGetAlertPolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AlertPolicy

The response received from the server.

GetAlertPolicyAsync(GetAlertPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<AlertPolicy> GetAlertPolicyAsync(GetAlertPolicyRequest request, CallOptions options)

Gets a single alerting policy.

Parameters
NameDescription
requestGetAlertPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAlertPolicy

The call object.

GetAlertPolicyAsync(GetAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AlertPolicy> GetAlertPolicyAsync(GetAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a single alerting policy.

Parameters
NameDescription
requestGetAlertPolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAlertPolicy

The call object.

ListAlertPolicies(ListAlertPoliciesRequest, CallOptions)

public virtual ListAlertPoliciesResponse ListAlertPolicies(ListAlertPoliciesRequest request, CallOptions options)

Lists the existing alerting policies for the workspace.

Parameters
NameDescription
requestListAlertPoliciesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListAlertPoliciesResponse

The response received from the server.

ListAlertPolicies(ListAlertPoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListAlertPoliciesResponse ListAlertPolicies(ListAlertPoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the existing alerting policies for the workspace.

Parameters
NameDescription
requestListAlertPoliciesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListAlertPoliciesResponse

The response received from the server.

ListAlertPoliciesAsync(ListAlertPoliciesRequest, CallOptions)

public virtual AsyncUnaryCall<ListAlertPoliciesResponse> ListAlertPoliciesAsync(ListAlertPoliciesRequest request, CallOptions options)

Lists the existing alerting policies for the workspace.

Parameters
NameDescription
requestListAlertPoliciesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListAlertPoliciesResponse

The call object.

ListAlertPoliciesAsync(ListAlertPoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListAlertPoliciesResponse> ListAlertPoliciesAsync(ListAlertPoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the existing alerting policies for the workspace.

Parameters
NameDescription
requestListAlertPoliciesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListAlertPoliciesResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override AlertPolicyService.AlertPolicyServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
AlertPolicyServiceAlertPolicyServiceClient
Overrides

UpdateAlertPolicy(UpdateAlertPolicyRequest, CallOptions)

public virtual AlertPolicy UpdateAlertPolicy(UpdateAlertPolicyRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AlertPolicy

The response received from the server.

UpdateAlertPolicy(UpdateAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AlertPolicy UpdateAlertPolicy(UpdateAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AlertPolicy

The response received from the server.

UpdateAlertPolicyAsync(UpdateAlertPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<AlertPolicy> UpdateAlertPolicyAsync(UpdateAlertPolicyRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallAlertPolicy

The call object.

UpdateAlertPolicyAsync(UpdateAlertPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AlertPolicy> UpdateAlertPolicyAsync(UpdateAlertPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallAlertPolicy

The call object.