Class CfnNotificationRule
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::CodeStarNotifications::NotificationRule
.
Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as AWS Chatbot topics or AWS Chatbot clients configured for Slack) where you want to receive them.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.codestarnotifications.*; CfnNotificationRule cfnNotificationRule = CfnNotificationRule.Builder.create(this, "MyCfnNotificationRule") .detailType("detailType") .eventTypeIds(List.of("eventTypeIds")) .name("name") .resource("resource") .targets(List.of(TargetProperty.builder() .targetAddress("targetAddress") .targetType("targetType") .build())) // the properties below are optional .createdBy("createdBy") .eventTypeId("eventTypeId") .status("status") .tags(Map.of( "tagsKey", "tags")) .targetAddress("targetAddress") .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnNotificationRule
.static interface
Information about the AWS Chatbot topics or AWS Chatbot clients associated with a notification rule.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnNotificationRule
(Construct scope, String id, CfnNotificationRuleProps props) Create a newAWS::CodeStarNotifications::NotificationRule
.protected
CfnNotificationRule
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnNotificationRule
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionAWS::CodeStarNotifications::NotificationRule.CreatedBy
.The level of detail to include in the notifications for this resource.AWS::CodeStarNotifications::NotificationRule.EventTypeId
.A list of event types associated with this notification rule.getName()
The name for the notification rule.The Amazon Resource Name (ARN) of the resource to associate with the notification rule.The status of the notification rule.getTags()
A list of tags to apply to this notification rule.AWS::CodeStarNotifications::NotificationRule.TargetAddress
.A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and AWS Chatbot clients to associate with the notification rule.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCreatedBy
(String value) AWS::CodeStarNotifications::NotificationRule.CreatedBy
.void
setDetailType
(String value) The level of detail to include in the notifications for this resource.void
setEventTypeId
(String value) AWS::CodeStarNotifications::NotificationRule.EventTypeId
.void
setEventTypeIds
(List<String> value) A list of event types associated with this notification rule.void
The name for the notification rule.void
setResource
(String value) The Amazon Resource Name (ARN) of the resource to associate with the notification rule.void
The status of the notification rule.void
setTargetAddress
(String value) AWS::CodeStarNotifications::NotificationRule.TargetAddress
.void
setTargets
(List<Object> value) A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and AWS Chatbot clients to associate with the notification rule.void
setTargets
(IResolvable value) A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and AWS Chatbot clients to associate with the notification rule.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnNotificationRule
protected CfnNotificationRule(software.amazon.jsii.JsiiObjectRef objRef) -
CfnNotificationRule
protected CfnNotificationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnNotificationRule
@Stability(Stable) public CfnNotificationRule(@NotNull Construct scope, @NotNull String id, @NotNull CfnNotificationRuleProps props) Create a newAWS::CodeStarNotifications::NotificationRule
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
A list of tags to apply to this notification rule.Key names cannot start with "
aws
". -
getDetailType
The level of detail to include in the notifications for this resource.BASIC
will include only the contents of the event as it would appear in Amazon 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. -
setDetailType
The level of detail to include in the notifications for this resource.BASIC
will include only the contents of the event as it would appear in Amazon 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. -
getEventTypeIds
A list of event types associated with this notification rule.For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
-
setEventTypeIds
A list of event types associated with this notification rule.For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
-
getName
The name for the notification rule.Notification rule names must be unique in your AWS account .
-
setName
The name for the notification rule.Notification rule names must be unique in your AWS account .
-
getResource
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
-
setResource
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
-
getTargets
A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and AWS Chatbot clients to associate with the notification rule. -
setTargets
A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and AWS Chatbot clients to associate with the notification rule. -
setTargets
A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and AWS Chatbot clients to associate with the notification rule. -
getCreatedBy
AWS::CodeStarNotifications::NotificationRule.CreatedBy
. -
setCreatedBy
AWS::CodeStarNotifications::NotificationRule.CreatedBy
. -
getEventTypeId
AWS::CodeStarNotifications::NotificationRule.EventTypeId
. -
setEventTypeId
AWS::CodeStarNotifications::NotificationRule.EventTypeId
. -
getStatus
The status of the notification rule.The default value is
ENABLED
. If the status is set toDISABLED
, notifications aren't sent for the notification rule. -
setStatus
The status of the notification rule.The default value is
ENABLED
. If the status is set toDISABLED
, notifications aren't sent for the notification rule. -
getTargetAddress
AWS::CodeStarNotifications::NotificationRule.TargetAddress
. -
setTargetAddress
AWS::CodeStarNotifications::NotificationRule.TargetAddress
.
-