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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnNotificationRule.static interfaceInformation 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.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnNotificationRule(Construct scope, String id, CfnNotificationRuleProps props) Create a newAWS::CodeStarNotifications::NotificationRule.protectedCfnNotificationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnNotificationRule(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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCreatedBy(String value) AWS::CodeStarNotifications::NotificationRule.CreatedBy.voidsetDetailType(String value) The level of detail to include in the notifications for this resource.voidsetEventTypeId(String value) AWS::CodeStarNotifications::NotificationRule.EventTypeId.voidsetEventTypeIds(List<String> value) A list of event types associated with this notification rule.voidThe name for the notification rule.voidsetResource(String value) The Amazon Resource Name (ARN) of the resource to associate with the notification rule.voidThe status of the notification rule.voidsetTargetAddress(String value) AWS::CodeStarNotifications::NotificationRule.TargetAddress.voidsetTargets(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.voidsetTargets(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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
-
getCfnProperties
- Overrides:
getCfnPropertiesin 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.BASICwill include only the contents of the event as it would appear in Amazon CloudWatch.FULLwill 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.BASICwill include only the contents of the event as it would appear in Amazon CloudWatch.FULLwill 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.
-