Class RepositoryNotifyOnOptions
Additional options to pass to the notification rule.
Inherited Members
Namespace: Amazon.CDK.AWS.CodeCommit
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RepositoryNotifyOnOptions : IRepositoryNotifyOnOptions, INotificationRuleOptions
Syntax (vb)
Public Class RepositoryNotifyOnOptions Implements IRepositoryNotifyOnOptions, INotificationRuleOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeCommit;
using Amazon.CDK.AWS.CodeStarNotifications;
var repositoryNotifyOnOptions = new RepositoryNotifyOnOptions {
Events = new [] { RepositoryNotificationEvents.COMMIT_COMMENT },
// the properties below are optional
CreatedBy = "createdBy",
DetailType = DetailType.BASIC,
Enabled = false,
NotificationRuleName = "notificationRuleName"
};
Synopsis
Constructors
RepositoryNotifyOnOptions() | Additional options to pass to the notification rule. |
Properties
CreatedBy | The name or email alias of the person who created the notification rule. |
DetailType | The level of detail to include in the notifications for this resource. |
Enabled | The status of the notification rule. |
Events | A list of event types associated with this notification rule for CodeCommit repositories. |
NotificationRuleName | The name for the notification rule. |
Constructors
RepositoryNotifyOnOptions()
Additional options to pass to the notification rule.
public RepositoryNotifyOnOptions()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeCommit;
using Amazon.CDK.AWS.CodeStarNotifications;
var repositoryNotifyOnOptions = new RepositoryNotifyOnOptions {
Events = new [] { RepositoryNotificationEvents.COMMIT_COMMENT },
// the properties below are optional
CreatedBy = "createdBy",
DetailType = DetailType.BASIC,
Enabled = false,
NotificationRuleName = "notificationRuleName"
};
Properties
CreatedBy
The name or email alias of the person who created the notification rule.
public string? CreatedBy { get; set; }
Property Value
Remarks
If not specified, it means that the creator's alias is not provided.
Default: - No alias provided
DetailType
The level of detail to include in the notifications for this resource.
public DetailType? DetailType { get; set; }
Property Value
Remarks
BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.
Default: DetailType.FULL
Enabled
The status of the notification rule.
public bool? Enabled { get; set; }
Property Value
bool?
Remarks
If the enabled is set to DISABLED, notifications aren't sent for the notification rule.
Default: true
Events
A list of event types associated with this notification rule for CodeCommit repositories.
public RepositoryNotificationEvents[] Events { get; set; }
Property Value
RepositoryNotificationEvents[]
Remarks
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.
NotificationRuleName
The name for the notification rule.
public string? NotificationRuleName { get; set; }
Property Value
Remarks
Notification rule names must be unique in your AWS account.
Default: - generated from the id