Show / Hide Table of Contents

Class ProjectsResource.AlertPoliciesResource.PatchRequest

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.

Inheritance
object
ClientServiceRequest
ClientServiceRequest<AlertPolicy>
MonitoringBaseServiceRequest<AlertPolicy>
ProjectsResource.AlertPoliciesResource.PatchRequest
Implements
IClientServiceRequest<AlertPolicy>
IClientServiceRequest
Inherited Members
MonitoringBaseServiceRequest<AlertPolicy>.Xgafv
MonitoringBaseServiceRequest<AlertPolicy>.AccessToken
MonitoringBaseServiceRequest<AlertPolicy>.Alt
MonitoringBaseServiceRequest<AlertPolicy>.Callback
MonitoringBaseServiceRequest<AlertPolicy>.Fields
MonitoringBaseServiceRequest<AlertPolicy>.Key
MonitoringBaseServiceRequest<AlertPolicy>.OauthToken
MonitoringBaseServiceRequest<AlertPolicy>.PrettyPrint
MonitoringBaseServiceRequest<AlertPolicy>.QuotaUser
MonitoringBaseServiceRequest<AlertPolicy>.UploadType
MonitoringBaseServiceRequest<AlertPolicy>.UploadProtocol
ClientServiceRequest<AlertPolicy>.Execute()
ClientServiceRequest<AlertPolicy>.ExecuteAsStream()
ClientServiceRequest<AlertPolicy>.ExecuteAsync()
ClientServiceRequest<AlertPolicy>.ExecuteAsync(CancellationToken)
ClientServiceRequest<AlertPolicy>.ExecuteAsStreamAsync()
ClientServiceRequest<AlertPolicy>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<AlertPolicy>.CreateRequest(bool?)
ClientServiceRequest<AlertPolicy>.GenerateRequestUri()
ClientServiceRequest<AlertPolicy>.GetDefaultETagAction(string)
ClientServiceRequest<AlertPolicy>.ETagAction
ClientServiceRequest<AlertPolicy>.ModifyRequest
ClientServiceRequest<AlertPolicy>.ValidateParameters
ClientServiceRequest<AlertPolicy>.ApiVersion
ClientServiceRequest<AlertPolicy>.RequestParameters
ClientServiceRequest<AlertPolicy>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Monitoring.v3
Assembly: Google.Apis.Monitoring.v3.dll
Syntax
public class ProjectsResource.AlertPoliciesResource.PatchRequest : MonitoringBaseServiceRequest<AlertPolicy>, IClientServiceRequest<AlertPolicy>, IClientServiceRequest

Constructors

PatchRequest(IClientService, AlertPolicy, string)

Constructs a new Patch request.

Declaration
public PatchRequest(IClientService service, AlertPolicy body, string name)
Parameters
Type Name Description
IClientService service
AlertPolicy body
string name

Properties

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<AlertPolicy>.HttpMethod

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<AlertPolicy>.MethodName

Name

Identifier. Required if the policy exists. The resource name for this policy. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.

Declaration
[RequestParameter("name", RequestParameterType.Path)]
public virtual string Name { get; }
Property Value
Type Description
string

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<AlertPolicy>.RestPath

UpdateMask

Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value.Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following: The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents. Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.

Declaration
[RequestParameter("updateMask", RequestParameterType.Query)]
public virtual object UpdateMask { get; set; }
Property Value
Type Description
object

Methods

GetBody()

Returns the body of the request.

Declaration
protected override object GetBody()
Returns
Type Description
object
Overrides
ClientServiceRequest<AlertPolicy>.GetBody()

InitParameters()

Initializes Patch parameter list.

Declaration
protected override void InitParameters()
Overrides
MonitoringBaseServiceRequest<AlertPolicy>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
In this article
Back to top Generated by DocFX