Class ProjectsResource.AlertPoliciesResource.CreateRequest
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.
Inheritance
Inherited Members
Namespace: Google.Apis.Monitoring.v3
Assembly: Google.Apis.Monitoring.v3.dll
Syntax
public class ProjectsResource.AlertPoliciesResource.CreateRequest : MonitoringBaseServiceRequest<AlertPolicy>, IClientServiceRequest<AlertPolicy>, IClientServiceRequest
Constructors
CreateRequest(IClientService, AlertPolicy, string)
Constructs a new Create request.
Declaration
public CreateRequest(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
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Name
Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) in which to create the alerting policy. The format is: projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. |name| must be a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will return. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[ALERT_POLICY_ID], identifying the policy in the container.
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
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()