public abstract class NotificationChannelServiceClient
Reference documentation and code samples for the Google Cloud Monitoring v3 API class NotificationChannelServiceClient.
NotificationChannelService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Monitoring.V3Assembly
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 |
The default NotificationChannelService scopes are:
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 |
notificationChannel | NotificationChannel Required. The definition of the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NotificationChannel | The RPC response. |
// 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 |
notificationChannel | NotificationChannel Required. The definition of the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NotificationChannel | The RPC response. |
// 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 |
notificationChannel | NotificationChannel Required. The definition of the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NotificationChannel | The RPC response. |
// 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 |
notificationChannel | NotificationChannel Required. The definition of the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
NotificationChannel | The RPC response. |
// 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. |
// 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 |
notificationChannel | NotificationChannel Required. The definition of the |
|