Class AlertPolicyService.AlertPolicyServiceClient (2.6.0)

public class AlertPolicyServiceClient : ClientBase<AlertPolicyService.AlertPolicyServiceClient>

Client for AlertPolicyService

Inheritance

Object > ClientBase > ClientBase<AlertPolicyService.AlertPolicyServiceClient> > 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(Channel)

[Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")]
public AlertPolicyServiceClient(Channel channel)

Creates a new client using a channel.

Parameter
NameDescription
channelGrpc.Core.Channel

The channel 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(ClientBase.ClientBaseConfiguration)

protected AlertPolicyServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

CreateAlertPolicy(CreateAlertPolicyRequest, CallOptions)

public virtual AlertPolicy CreateAlertPolicy(CreateAlertPolicyRequest request, CallOptions options)

Creates a new alerting policy.

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, Nullable<DateTime>, CancellationToken)

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

Creates a new alerting policy.

Parameters
NameDescription
requestCreateAlertPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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.

Parameters
NameDescription
requestCreateAlertPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AlertPolicy>

The call object.

CreateAlertPolicyAsync(CreateAlertPolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Creates a new alerting policy.

Parameters
NameDescription
requestCreateAlertPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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
AsyncUnaryCall<AlertPolicy>

The call object.

DeleteAlertPolicy(DeleteAlertPolicyRequest, CallOptions)

public virtual Empty DeleteAlertPolicy(DeleteAlertPolicyRequest request, CallOptions options)

Deletes an alerting policy.

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, Nullable<DateTime>, CancellationToken)

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

Deletes an alerting policy.

Parameters
NameDescription
requestDeleteAlertPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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.

Parameters
NameDescription
requestDeleteAlertPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DeleteAlertPolicyAsync(DeleteAlertPolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes an alerting policy.

Parameters
NameDescription
requestDeleteAlertPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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
AsyncUnaryCall<Empty>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<AlertPolicy>

The call object.

GetAlertPolicyAsync(GetAlertPolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<AlertPolicy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListAlertPoliciesResponse>

The call object.

ListAlertPoliciesAsync(ListAlertPoliciesRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListAlertPoliciesResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
AlertPolicyService.AlertPolicyServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Monitoring.V3.AlertPolicyService.AlertPolicyServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

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.

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, Nullable<DateTime>, CancellationToken)

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

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 to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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.

Parameters
NameDescription
requestUpdateAlertPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AlertPolicy>

The call object.

UpdateAlertPolicyAsync(UpdateAlertPolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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 to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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
AsyncUnaryCall<AlertPolicy>

The call object.