Show / Hide Table of Contents

Class ProjectsResource.NotificationChannelsResource

The "notificationChannels" collection of methods.

Inheritance
object
ProjectsResource.NotificationChannelsResource
Inherited Members
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.NotificationChannelsResource

Constructors

NotificationChannelsResource(IClientService)

Constructs a new resource.

Declaration
public NotificationChannelsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(NotificationChannel, string)

Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.CreateRequest Create(NotificationChannel body, string name)
Parameters
Type Name Description
NotificationChannel body

The body of the request.

string name

Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.

Returns
Type Description
ProjectsResource.NotificationChannelsResource.CreateRequest

Delete(string)

Deletes a notification channel.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. The channel for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

Returns
Type Description
ProjectsResource.NotificationChannelsResource.DeleteRequest

Get(string)

Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. The channel for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

Returns
Type Description
ProjectsResource.NotificationChannelsResource.GetRequest

GetVerificationCode(GetNotificationChannelVerificationCodeRequest, string)

Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as "G-123456") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.GetVerificationCodeRequest GetVerificationCode(GetNotificationChannelVerificationCodeRequest body, string name)
Parameters
Type Name Description
GetNotificationChannelVerificationCodeRequest body

The body of the request.

string name

Required. The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.

Returns
Type Description
ProjectsResource.NotificationChannelsResource.GetVerificationCodeRequest

List(string)

Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the ListNotificationChannelDescriptors method.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.ListRequest List(string name)
Parameters
Type Name Description
string name

Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.

Returns
Type Description
ProjectsResource.NotificationChannelsResource.ListRequest

Patch(NotificationChannel, string)

Updates a notification channel. Fields not specified in the field mask remain unchanged.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.PatchRequest Patch(NotificationChannel body, string name)
Parameters
Type Name Description
NotificationChannel body

The body of the request.

string name

Identifier. The full REST resource name for this channel. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] The [CHANNEL_ID] is automatically assigned by the server on creation.

Returns
Type Description
ProjectsResource.NotificationChannelsResource.PatchRequest

SendVerificationCode(SendNotificationChannelVerificationCodeRequest, string)

Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.SendVerificationCodeRequest SendVerificationCode(SendNotificationChannelVerificationCodeRequest body, string name)
Parameters
Type Name Description
SendNotificationChannelVerificationCodeRequest body

The body of the request.

string name

Required. The notification channel to which to send a verification code.

Returns
Type Description
ProjectsResource.NotificationChannelsResource.SendVerificationCodeRequest

Verify(VerifyNotificationChannelRequest, string)

Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.

Declaration
public virtual ProjectsResource.NotificationChannelsResource.VerifyRequest Verify(VerifyNotificationChannelRequest body, string name)
Parameters
Type Name Description
VerifyNotificationChannelRequest body

The body of the request.

string name

Required. The notification channel to verify.

Returns
Type Description
ProjectsResource.NotificationChannelsResource.VerifyRequest
In this article
Back to top Generated by DocFX