Google Cloud Monitoring v3 API - Class NotificationChannelServiceClient (3.9.0)

public abstract class NotificationChannelServiceClient

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

NotificationChannelService client wrapper, for convenient use.

Inheritance

object > NotificationChannelServiceClient

Namespace

Google.Cloud.Monitoring.V3

Assembly

Google.Cloud.Monitoring.V3.dll

Remarks

The Notification Channel API provides access to configuration that controls how messages related to incidents are sent.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the NotificationChannelService service, which is a host of "monitoring.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default NotificationChannelService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual NotificationChannelService.NotificationChannelServiceClient GrpcClient { get; }

The underlying gRPC NotificationChannelService client

Property Value
Type Description
NotificationChannelServiceNotificationChannelServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static NotificationChannelServiceClient Create()

Synchronously creates a NotificationChannelServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NotificationChannelServiceClientBuilder.

Returns
Type Description
NotificationChannelServiceClient

The created NotificationChannelServiceClient.

CreateAsync(CancellationToken)

public static Task<NotificationChannelServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a NotificationChannelServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NotificationChannelServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskNotificationChannelServiceClient

The task representing the created NotificationChannelServiceClient.

CreateNotificationChannel(IResourceName, NotificationChannel, CallSettings)

public virtual NotificationChannel CreateNotificationChannel(IResourceName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = notificationChannelServiceClient.CreateNotificationChannel(name, notificationChannel);

CreateNotificationChannel(FolderName, NotificationChannel, CallSettings)

public virtual NotificationChannel CreateNotificationChannel(FolderName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name FolderName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = notificationChannelServiceClient.CreateNotificationChannel(name, notificationChannel);

CreateNotificationChannel(OrganizationName, NotificationChannel, CallSettings)

public virtual NotificationChannel CreateNotificationChannel(OrganizationName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name OrganizationName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = notificationChannelServiceClient.CreateNotificationChannel(name, notificationChannel);

CreateNotificationChannel(ProjectName, NotificationChannel, CallSettings)

public virtual NotificationChannel CreateNotificationChannel(ProjectName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name ProjectName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = notificationChannelServiceClient.CreateNotificationChannel(name, notificationChannel);

CreateNotificationChannel(CreateNotificationChannelRequest, CallSettings)

public virtual NotificationChannel CreateNotificationChannel(CreateNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request CreateNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
CreateNotificationChannelRequest request = new CreateNotificationChannelRequest
{
    NotificationChannel = new NotificationChannel(),
    ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
NotificationChannel response = notificationChannelServiceClient.CreateNotificationChannel(request);

CreateNotificationChannel(string, NotificationChannel, CallSettings)

public virtual NotificationChannel CreateNotificationChannel(string name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = notificationChannelServiceClient.CreateNotificationChannel(name, notificationChannel);

CreateNotificationChannelAsync(IResourceName, NotificationChannel, CallSettings)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(IResourceName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(IResourceName, NotificationChannel, CancellationToken)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(IResourceName name, NotificationChannel notificationChannel, CancellationToken cancellationToken)

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.

Parameters
Name Description
name IResourceName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(FolderName, NotificationChannel, CallSettings)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(FolderName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name FolderName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(FolderName, NotificationChannel, CancellationToken)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(FolderName name, NotificationChannel notificationChannel, CancellationToken cancellationToken)

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.

Parameters
Name Description
name FolderName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(OrganizationName, NotificationChannel, CallSettings)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(OrganizationName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name OrganizationName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(OrganizationName, NotificationChannel, CancellationToken)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(OrganizationName name, NotificationChannel notificationChannel, CancellationToken cancellationToken)

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.

Parameters
Name Description
name OrganizationName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(ProjectName, NotificationChannel, CallSettings)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(ProjectName name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name ProjectName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(ProjectName, NotificationChannel, CancellationToken)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(ProjectName name, NotificationChannel notificationChannel, CancellationToken cancellationToken)

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.

Parameters
Name Description
name ProjectName

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(CreateNotificationChannelRequest, CallSettings)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(CreateNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request CreateNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
CreateNotificationChannelRequest request = new CreateNotificationChannelRequest
{
    NotificationChannel = new NotificationChannel(),
    ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(request);

CreateNotificationChannelAsync(CreateNotificationChannelRequest, CancellationToken)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(CreateNotificationChannelRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request CreateNotificationChannelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
CreateNotificationChannelRequest request = new CreateNotificationChannelRequest
{
    NotificationChannel = new NotificationChannel(),
    ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(request);

CreateNotificationChannelAsync(string, NotificationChannel, CallSettings)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(string name, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

CreateNotificationChannelAsync(string, NotificationChannel, CancellationToken)

public virtual Task<NotificationChannel> CreateNotificationChannelAsync(string name, NotificationChannel notificationChannel, CancellationToken cancellationToken)

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.

Parameters
Name Description
name string

Required. The project 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.

notificationChannel NotificationChannel

Required. The definition of the NotificationChannel to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.CreateNotificationChannelAsync(name, notificationChannel);

DeleteNotificationChannel(IResourceName, bool, CallSettings)

public virtual void DeleteNotificationChannel(IResourceName name, bool force, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
bool force = false;
// Make the request
notificationChannelServiceClient.DeleteNotificationChannel(name, force);

DeleteNotificationChannel(DeleteNotificationChannelRequest, CallSettings)

public virtual void DeleteNotificationChannel(DeleteNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request DeleteNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
DeleteNotificationChannelRequest request = new DeleteNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    Force = false,
};
// Make the request
notificationChannelServiceClient.DeleteNotificationChannel(request);

DeleteNotificationChannel(NotificationChannelName, bool, CallSettings)

public virtual void DeleteNotificationChannel(NotificationChannelName name, bool force, CallSettings callSettings = null)

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.

Parameters
Name Description
name NotificationChannelName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
bool force = false;
// Make the request
notificationChannelServiceClient.DeleteNotificationChannel(name, force);

DeleteNotificationChannel(string, bool, CallSettings)

public virtual void DeleteNotificationChannel(string name, bool force, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
bool force = false;
// Make the request
notificationChannelServiceClient.DeleteNotificationChannel(name, force);

DeleteNotificationChannelAsync(IResourceName, bool, CallSettings)

public virtual Task DeleteNotificationChannelAsync(IResourceName name, bool force, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
bool force = false;
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(name, force);

DeleteNotificationChannelAsync(IResourceName, bool, CancellationToken)

public virtual Task DeleteNotificationChannelAsync(IResourceName name, bool force, CancellationToken cancellationToken)

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.

Parameters
Name Description
name IResourceName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
bool force = false;
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(name, force);

DeleteNotificationChannelAsync(DeleteNotificationChannelRequest, CallSettings)

public virtual Task DeleteNotificationChannelAsync(DeleteNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request DeleteNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotificationChannelRequest request = new DeleteNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    Force = false,
};
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(request);

DeleteNotificationChannelAsync(DeleteNotificationChannelRequest, CancellationToken)

public virtual Task DeleteNotificationChannelAsync(DeleteNotificationChannelRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request DeleteNotificationChannelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotificationChannelRequest request = new DeleteNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    Force = false,
};
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(request);

DeleteNotificationChannelAsync(NotificationChannelName, bool, CallSettings)

public virtual Task DeleteNotificationChannelAsync(NotificationChannelName name, bool force, CallSettings callSettings = null)

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.

Parameters
Name Description
name NotificationChannelName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
bool force = false;
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(name, force);

DeleteNotificationChannelAsync(NotificationChannelName, bool, CancellationToken)

public virtual Task DeleteNotificationChannelAsync(NotificationChannelName name, bool force, CancellationToken cancellationToken)

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.

Parameters
Name Description
name NotificationChannelName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
bool force = false;
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(name, force);

DeleteNotificationChannelAsync(string, bool, CallSettings)

public virtual Task DeleteNotificationChannelAsync(string name, bool force, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
bool force = false;
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(name, force);

DeleteNotificationChannelAsync(string, bool, CancellationToken)

public virtual Task DeleteNotificationChannelAsync(string name, bool force, CancellationToken cancellationToken)

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.

Parameters
Name Description
name string

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

force bool

If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
bool force = false;
// Make the request
await notificationChannelServiceClient.DeleteNotificationChannelAsync(name, force);

GetNotificationChannel(IResourceName, CallSettings)

public virtual NotificationChannel GetNotificationChannel(IResourceName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
NotificationChannel response = notificationChannelServiceClient.GetNotificationChannel(name);

GetNotificationChannel(GetNotificationChannelRequest, CallSettings)

public virtual NotificationChannel GetNotificationChannel(GetNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request GetNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
GetNotificationChannelRequest request = new GetNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
};
// Make the request
NotificationChannel response = notificationChannelServiceClient.GetNotificationChannel(request);

GetNotificationChannel(NotificationChannelName, CallSettings)

public virtual NotificationChannel GetNotificationChannel(NotificationChannelName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name NotificationChannelName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
NotificationChannel response = notificationChannelServiceClient.GetNotificationChannel(name);

GetNotificationChannel(string, CallSettings)

public virtual NotificationChannel GetNotificationChannel(string name, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
NotificationChannel response = notificationChannelServiceClient.GetNotificationChannel(name);

GetNotificationChannelAsync(IResourceName, CallSettings)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(IResourceName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

GetNotificationChannelAsync(IResourceName, CancellationToken)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(IResourceName name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name IResourceName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

GetNotificationChannelAsync(GetNotificationChannelRequest, CallSettings)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(GetNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request GetNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationChannelRequest request = new GetNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(request);

GetNotificationChannelAsync(GetNotificationChannelRequest, CancellationToken)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(GetNotificationChannelRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request GetNotificationChannelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationChannelRequest request = new GetNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(request);

GetNotificationChannelAsync(NotificationChannelName, CallSettings)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(NotificationChannelName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name NotificationChannelName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

GetNotificationChannelAsync(NotificationChannelName, CancellationToken)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(NotificationChannelName name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name NotificationChannelName

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

GetNotificationChannelAsync(string, CallSettings)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(string name, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

GetNotificationChannelAsync(string, CancellationToken)

public virtual Task<NotificationChannel> GetNotificationChannelAsync(string name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name string

Required. The channel for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

GetNotificationChannelDescriptor(IResourceName, CallSettings)

public virtual NotificationChannelDescriptor GetNotificationChannelDescriptor(IResourceName name, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name IResourceName

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannelDescriptor

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
NotificationChannelDescriptor response = notificationChannelServiceClient.GetNotificationChannelDescriptor(name);

GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest, CallSettings)

public virtual NotificationChannelDescriptor GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest request, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
request GetNotificationChannelDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannelDescriptor

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
GetNotificationChannelDescriptorRequest request = new GetNotificationChannelDescriptorRequest
{
    NotificationChannelDescriptorName = NotificationChannelDescriptorName.FromProjectChannelDescriptor("[PROJECT]", "[CHANNEL_DESCRIPTOR]"),
};
// Make the request
NotificationChannelDescriptor response = notificationChannelServiceClient.GetNotificationChannelDescriptor(request);

GetNotificationChannelDescriptor(NotificationChannelDescriptorName, CallSettings)

public virtual NotificationChannelDescriptor GetNotificationChannelDescriptor(NotificationChannelDescriptorName name, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name NotificationChannelDescriptorName

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannelDescriptor

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
NotificationChannelDescriptorName name = NotificationChannelDescriptorName.FromProjectChannelDescriptor("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
// Make the request
NotificationChannelDescriptor response = notificationChannelServiceClient.GetNotificationChannelDescriptor(name);

GetNotificationChannelDescriptor(string, CallSettings)

public virtual NotificationChannelDescriptor GetNotificationChannelDescriptor(string name, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name string

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannelDescriptor

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannelDescriptors/[CHANNEL_DESCRIPTOR]";
// Make the request
NotificationChannelDescriptor response = notificationChannelServiceClient.GetNotificationChannelDescriptor(name);

GetNotificationChannelDescriptorAsync(IResourceName, CallSettings)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(IResourceName name, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name IResourceName

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(name);

GetNotificationChannelDescriptorAsync(IResourceName, CancellationToken)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(IResourceName name, CancellationToken cancellationToken)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name IResourceName

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(name);

GetNotificationChannelDescriptorAsync(GetNotificationChannelDescriptorRequest, CallSettings)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(GetNotificationChannelDescriptorRequest request, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
request GetNotificationChannelDescriptorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationChannelDescriptorRequest request = new GetNotificationChannelDescriptorRequest
{
    NotificationChannelDescriptorName = NotificationChannelDescriptorName.FromProjectChannelDescriptor("[PROJECT]", "[CHANNEL_DESCRIPTOR]"),
};
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(request);

GetNotificationChannelDescriptorAsync(GetNotificationChannelDescriptorRequest, CancellationToken)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(GetNotificationChannelDescriptorRequest request, CancellationToken cancellationToken)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
request GetNotificationChannelDescriptorRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationChannelDescriptorRequest request = new GetNotificationChannelDescriptorRequest
{
    NotificationChannelDescriptorName = NotificationChannelDescriptorName.FromProjectChannelDescriptor("[PROJECT]", "[CHANNEL_DESCRIPTOR]"),
};
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(request);

GetNotificationChannelDescriptorAsync(NotificationChannelDescriptorName, CallSettings)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(NotificationChannelDescriptorName name, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name NotificationChannelDescriptorName

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelDescriptorName name = NotificationChannelDescriptorName.FromProjectChannelDescriptor("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(name);

GetNotificationChannelDescriptorAsync(NotificationChannelDescriptorName, CancellationToken)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(NotificationChannelDescriptorName name, CancellationToken cancellationToken)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name NotificationChannelDescriptorName

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelDescriptorName name = NotificationChannelDescriptorName.FromProjectChannelDescriptor("[PROJECT]", "[CHANNEL_DESCRIPTOR]");
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(name);

GetNotificationChannelDescriptorAsync(string, CallSettings)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(string name, CallSettings callSettings = null)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name string

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannelDescriptors/[CHANNEL_DESCRIPTOR]";
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(name);

GetNotificationChannelDescriptorAsync(string, CancellationToken)

public virtual Task<NotificationChannelDescriptor> GetNotificationChannelDescriptorAsync(string name, CancellationToken cancellationToken)

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

Parameters
Name Description
name string

Required. The channel type for which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannelDescriptor

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannelDescriptors/[CHANNEL_DESCRIPTOR]";
// Make the request
NotificationChannelDescriptor response = await notificationChannelServiceClient.GetNotificationChannelDescriptorAsync(name);

GetNotificationChannelVerificationCode(IResourceName, CallSettings)

public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(IResourceName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GetNotificationChannelVerificationCodeResponse

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.GetNotificationChannelVerificationCode(name);

GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest, CallSettings)

public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request GetNotificationChannelVerificationCodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GetNotificationChannelVerificationCodeResponse

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    ExpireTime = new Timestamp(),
};
// Make the request
GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.GetNotificationChannelVerificationCode(request);

GetNotificationChannelVerificationCode(NotificationChannelName, CallSettings)

public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(NotificationChannelName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name NotificationChannelName

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GetNotificationChannelVerificationCodeResponse

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.GetNotificationChannelVerificationCode(name);

GetNotificationChannelVerificationCode(string, CallSettings)

public virtual GetNotificationChannelVerificationCodeResponse GetNotificationChannelVerificationCode(string name, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GetNotificationChannelVerificationCodeResponse

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
GetNotificationChannelVerificationCodeResponse response = notificationChannelServiceClient.GetNotificationChannelVerificationCode(name);

GetNotificationChannelVerificationCodeAsync(IResourceName, CallSettings)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(IResourceName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);

GetNotificationChannelVerificationCodeAsync(IResourceName, CancellationToken)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(IResourceName name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name IResourceName

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);

GetNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest, CallSettings)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request GetNotificationChannelVerificationCodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    ExpireTime = new Timestamp(),
};
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(request);

GetNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest, CancellationToken)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request GetNotificationChannelVerificationCodeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationChannelVerificationCodeRequest request = new GetNotificationChannelVerificationCodeRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    ExpireTime = new Timestamp(),
};
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(request);

GetNotificationChannelVerificationCodeAsync(NotificationChannelName, CallSettings)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(NotificationChannelName name, CallSettings callSettings = null)

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.

Parameters
Name Description
name NotificationChannelName

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);

GetNotificationChannelVerificationCodeAsync(NotificationChannelName, CancellationToken)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(NotificationChannelName name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name NotificationChannelName

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);

GetNotificationChannelVerificationCodeAsync(string, CallSettings)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(string name, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);

GetNotificationChannelVerificationCodeAsync(string, CancellationToken)

public virtual Task<GetNotificationChannelVerificationCodeResponse> GetNotificationChannelVerificationCodeAsync(string name, CancellationToken cancellationToken)

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.

Parameters
Name Description
name string

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.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetNotificationChannelVerificationCodeResponse

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
GetNotificationChannelVerificationCodeResponse response = await notificationChannelServiceClient.GetNotificationChannelVerificationCodeAsync(name);

ListNotificationChannelDescriptors(IResourceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptors(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name IResourceName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptors(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannelDescriptor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelDescriptorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptors(FolderName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptors(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name FolderName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptors(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannelDescriptor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelDescriptorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptors(OrganizationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptors(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name OrganizationName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptors(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannelDescriptor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelDescriptorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptors(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptors(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name ProjectName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptors(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannelDescriptor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelDescriptorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest request, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
request ListNotificationChannelDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
ListNotificationChannelDescriptorsRequest request = new ListNotificationChannelDescriptorsRequest
{
    ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptors(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannelDescriptor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelDescriptorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptors(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptors(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name string

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptors(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannelDescriptor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelDescriptorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptorsAsync(IResourceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptorsAsync(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name IResourceName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable asynchronous sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptorsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannelDescriptor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelDescriptorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptorsAsync(FolderName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptorsAsync(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name FolderName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable asynchronous sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptorsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannelDescriptor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelDescriptorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptorsAsync(OrganizationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptorsAsync(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name OrganizationName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable asynchronous sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptorsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannelDescriptor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelDescriptorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptorsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptorsAsync(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name ProjectName

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable asynchronous sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptorsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannelDescriptor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelDescriptorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptorsAsync(ListNotificationChannelDescriptorsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptorsAsync(ListNotificationChannelDescriptorsRequest request, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
request ListNotificationChannelDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable asynchronous sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
ListNotificationChannelDescriptorsRequest request = new ListNotificationChannelDescriptorsRequest
{
    ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptorsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannelDescriptor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelDescriptorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelDescriptorsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> ListNotificationChannelDescriptorsAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

Parameters
Name Description
name string

Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] operation, instead.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelDescriptorsResponseNotificationChannelDescriptor

A pageable asynchronous sequence of NotificationChannelDescriptor resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListNotificationChannelDescriptorsResponse, NotificationChannelDescriptor> response = notificationChannelServiceClient.ListNotificationChannelDescriptorsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannelDescriptor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelDescriptorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannelDescriptor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannelDescriptor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannelDescriptor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannels(IResourceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannels(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelsResponseNotificationChannel

A pageable sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannel item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannels(FolderName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannels(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name FolderName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelsResponseNotificationChannel

A pageable sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannel item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannels(OrganizationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannels(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name OrganizationName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelsResponseNotificationChannel

A pageable sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannel item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannels(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannels(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name ProjectName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelsResponseNotificationChannel

A pageable sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannel item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannels(ListNotificationChannelsRequest, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannels(ListNotificationChannelsRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request ListNotificationChannelsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelsResponseNotificationChannel

A pageable sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
ListNotificationChannelsRequest request = new ListNotificationChannelsRequest
{
    ProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannel item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannels(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannels(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotificationChannelsResponseNotificationChannel

A pageable sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationChannel item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationChannelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelsAsync(IResourceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannelsAsync(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name IResourceName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelsResponseNotificationChannel

A pageable asynchronous sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannelsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannel item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelsAsync(FolderName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannelsAsync(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name FolderName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelsResponseNotificationChannel

A pageable asynchronous sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannelsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannel item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelsAsync(OrganizationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannelsAsync(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name OrganizationName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelsResponseNotificationChannel

A pageable asynchronous sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannelsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannel item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannelsAsync(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name ProjectName

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelsResponseNotificationChannel

A pageable asynchronous sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannelsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannel item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelsAsync(ListNotificationChannelsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannelsAsync(ListNotificationChannelsRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request ListNotificationChannelsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelsResponseNotificationChannel

A pageable asynchronous sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
ListNotificationChannelsRequest request = new ListNotificationChannelsRequest
{
    ProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannelsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannel item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListNotificationChannelsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> ListNotificationChannelsAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
name string

Required. The project 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][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotificationChannelsResponseNotificationChannel

A pageable asynchronous sequence of NotificationChannel resources.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannelsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationChannel item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationChannelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (NotificationChannel item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationChannel> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationChannel item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

SendNotificationChannelVerificationCode(IResourceName, CallSettings)

public virtual void SendNotificationChannelVerificationCode(IResourceName name, CallSettings callSettings = null)

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

Parameters
Name Description
name IResourceName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
notificationChannelServiceClient.SendNotificationChannelVerificationCode(name);

SendNotificationChannelVerificationCode(NotificationChannelName, CallSettings)

public virtual void SendNotificationChannelVerificationCode(NotificationChannelName name, CallSettings callSettings = null)

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

Parameters
Name Description
name NotificationChannelName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
notificationChannelServiceClient.SendNotificationChannelVerificationCode(name);

SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest, CallSettings)

public virtual void SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request SendNotificationChannelVerificationCodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
};
// Make the request
notificationChannelServiceClient.SendNotificationChannelVerificationCode(request);

SendNotificationChannelVerificationCode(string, CallSettings)

public virtual void SendNotificationChannelVerificationCode(string name, CallSettings callSettings = null)

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

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
notificationChannelServiceClient.SendNotificationChannelVerificationCode(name);

SendNotificationChannelVerificationCodeAsync(IResourceName, CallSettings)

public virtual Task SendNotificationChannelVerificationCodeAsync(IResourceName name, CallSettings callSettings = null)

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

Parameters
Name Description
name IResourceName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);

SendNotificationChannelVerificationCodeAsync(IResourceName, CancellationToken)

public virtual Task SendNotificationChannelVerificationCodeAsync(IResourceName name, CancellationToken cancellationToken)

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

Parameters
Name Description
name IResourceName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);

SendNotificationChannelVerificationCodeAsync(NotificationChannelName, CallSettings)

public virtual Task SendNotificationChannelVerificationCodeAsync(NotificationChannelName name, CallSettings callSettings = null)

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

Parameters
Name Description
name NotificationChannelName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);

SendNotificationChannelVerificationCodeAsync(NotificationChannelName, CancellationToken)

public virtual Task SendNotificationChannelVerificationCodeAsync(NotificationChannelName name, CancellationToken cancellationToken)

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

Parameters
Name Description
name NotificationChannelName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);

SendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest, CallSettings)

public virtual Task SendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request SendNotificationChannelVerificationCodeRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
};
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(request);

SendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest, CancellationToken)

public virtual Task SendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request SendNotificationChannelVerificationCodeRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
SendNotificationChannelVerificationCodeRequest request = new SendNotificationChannelVerificationCodeRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
};
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(request);

SendNotificationChannelVerificationCodeAsync(string, CallSettings)

public virtual Task SendNotificationChannelVerificationCodeAsync(string name, CallSettings callSettings = null)

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

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);

SendNotificationChannelVerificationCodeAsync(string, CancellationToken)

public virtual Task SendNotificationChannelVerificationCodeAsync(string name, CancellationToken cancellationToken)

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

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
// Make the request
await notificationChannelServiceClient.SendNotificationChannelVerificationCodeAsync(name);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateNotificationChannel(UpdateNotificationChannelRequest, CallSettings)

public virtual NotificationChannel UpdateNotificationChannel(UpdateNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request UpdateNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
UpdateNotificationChannelRequest request = new UpdateNotificationChannelRequest
{
    UpdateMask = new FieldMask(),
    NotificationChannel = new NotificationChannel(),
};
// Make the request
NotificationChannel response = notificationChannelServiceClient.UpdateNotificationChannel(request);

UpdateNotificationChannel(FieldMask, NotificationChannel, CallSettings)

public virtual NotificationChannel UpdateNotificationChannel(FieldMask updateMask, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
updateMask FieldMask

The fields to update.

notificationChannel NotificationChannel

Required. A description of the changes to be applied to the specified notification channel. The description must provide a definition for fields to be updated; the names of these fields should also be included in the update_mask.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
FieldMask updateMask = new FieldMask();
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = notificationChannelServiceClient.UpdateNotificationChannel(updateMask, notificationChannel);

UpdateNotificationChannelAsync(UpdateNotificationChannelRequest, CallSettings)

public virtual Task<NotificationChannel> UpdateNotificationChannelAsync(UpdateNotificationChannelRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request UpdateNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateNotificationChannelRequest request = new UpdateNotificationChannelRequest
{
    UpdateMask = new FieldMask(),
    NotificationChannel = new NotificationChannel(),
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.UpdateNotificationChannelAsync(request);

UpdateNotificationChannelAsync(UpdateNotificationChannelRequest, CancellationToken)

public virtual Task<NotificationChannel> UpdateNotificationChannelAsync(UpdateNotificationChannelRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request UpdateNotificationChannelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateNotificationChannelRequest request = new UpdateNotificationChannelRequest
{
    UpdateMask = new FieldMask(),
    NotificationChannel = new NotificationChannel(),
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.UpdateNotificationChannelAsync(request);

UpdateNotificationChannelAsync(FieldMask, NotificationChannel, CallSettings)

public virtual Task<NotificationChannel> UpdateNotificationChannelAsync(FieldMask updateMask, NotificationChannel notificationChannel, CallSettings callSettings = null)

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.

Parameters
Name Description
updateMask FieldMask

The fields to update.

notificationChannel NotificationChannel

Required. A description of the changes to be applied to the specified notification channel. The description must provide a definition for fields to be updated; the names of these fields should also be included in the update_mask.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
FieldMask updateMask = new FieldMask();
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.UpdateNotificationChannelAsync(updateMask, notificationChannel);

UpdateNotificationChannelAsync(FieldMask, NotificationChannel, CancellationToken)

public virtual Task<NotificationChannel> UpdateNotificationChannelAsync(FieldMask updateMask, NotificationChannel notificationChannel, CancellationToken cancellationToken)

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.

Parameters
Name Description
updateMask FieldMask

The fields to update.

notificationChannel NotificationChannel

Required. A description of the changes to be applied to the specified notification channel. The description must provide a definition for fields to be updated; the names of these fields should also be included in the update_mask.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
FieldMask updateMask = new FieldMask();
NotificationChannel notificationChannel = new NotificationChannel();
// Make the request
NotificationChannel response = await notificationChannelServiceClient.UpdateNotificationChannelAsync(updateMask, notificationChannel);

VerifyNotificationChannel(IResourceName, string, CallSettings)

public virtual NotificationChannel VerifyNotificationChannel(IResourceName name, string code, CallSettings callSettings = null)

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

Parameters
Name Description
name IResourceName

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
string code = "";
// Make the request
NotificationChannel response = notificationChannelServiceClient.VerifyNotificationChannel(name, code);

VerifyNotificationChannel(NotificationChannelName, string, CallSettings)

public virtual NotificationChannel VerifyNotificationChannel(NotificationChannelName name, string code, CallSettings callSettings = null)

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

Parameters
Name Description
name NotificationChannelName

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
string code = "";
// Make the request
NotificationChannel response = notificationChannelServiceClient.VerifyNotificationChannel(name, code);

VerifyNotificationChannel(VerifyNotificationChannelRequest, CallSettings)

public virtual NotificationChannel VerifyNotificationChannel(VerifyNotificationChannelRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request VerifyNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    Code = "",
};
// Make the request
NotificationChannel response = notificationChannelServiceClient.VerifyNotificationChannel(request);

VerifyNotificationChannel(string, string, CallSettings)

public virtual NotificationChannel VerifyNotificationChannel(string name, string code, CallSettings callSettings = null)

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

Parameters
Name Description
name string

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
NotificationChannel

The RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
string code = "";
// Make the request
NotificationChannel response = notificationChannelServiceClient.VerifyNotificationChannel(name, code);

VerifyNotificationChannelAsync(IResourceName, string, CallSettings)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(IResourceName name, string code, CallSettings callSettings = null)

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

Parameters
Name Description
name IResourceName

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
string code = "";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);

VerifyNotificationChannelAsync(IResourceName, string, CancellationToken)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(IResourceName name, string code, CancellationToken cancellationToken)

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

Parameters
Name Description
name IResourceName

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
string code = "";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);

VerifyNotificationChannelAsync(NotificationChannelName, string, CallSettings)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(NotificationChannelName name, string code, CallSettings callSettings = null)

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

Parameters
Name Description
name NotificationChannelName

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
string code = "";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);

VerifyNotificationChannelAsync(NotificationChannelName, string, CancellationToken)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(NotificationChannelName name, string code, CancellationToken cancellationToken)

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

Parameters
Name Description
name NotificationChannelName

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationChannelName name = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]");
string code = "";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);

VerifyNotificationChannelAsync(VerifyNotificationChannelRequest, CallSettings)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(VerifyNotificationChannelRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request VerifyNotificationChannelRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    Code = "",
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(request);

VerifyNotificationChannelAsync(VerifyNotificationChannelRequest, CancellationToken)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(VerifyNotificationChannelRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request VerifyNotificationChannelRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
VerifyNotificationChannelRequest request = new VerifyNotificationChannelRequest
{
    NotificationChannelName = NotificationChannelName.FromProjectNotificationChannel("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
    Code = "",
};
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(request);

VerifyNotificationChannelAsync(string, string, CallSettings)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(string name, string code, CallSettings callSettings = null)

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

Parameters
Name Description
name string

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
string code = "";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);

VerifyNotificationChannelAsync(string, string, CancellationToken)

public virtual Task<NotificationChannel> VerifyNotificationChannelAsync(string name, string code, CancellationToken cancellationToken)

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

Parameters
Name Description
name string

Required. The notification channel to verify.

code string

Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskNotificationChannel

A Task containing the RPC response.

Example
// Create client
NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notificationChannels/[NOTIFICATION_CHANNEL]";
string code = "";
// Make the request
NotificationChannel response = await notificationChannelServiceClient.VerifyNotificationChannelAsync(name, code);