Class CfnNotificationRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.codestarnotifications.CfnNotificationRule
- All Implemented Interfaces:
IInspectable,INotificationRuleRef,IEnvironmentAware,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:07.337Z")
@Stability(Stable)
public class CfnNotificationRule
extends CfnResource
implements IInspectable, INotificationRuleRef, ITaggable
Creates a notification rule for a resource.
The rule specifies the events you want notifications about and the targets (such as Amazon Simple Notification Service topics or 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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnNotificationRule.static interfaceInformation about the topics or 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.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.codestarnotifications.INotificationRuleRef
INotificationRuleRef.Jsii$Default, INotificationRuleRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnNotificationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnNotificationRule(software.amazon.jsii.JsiiObjectRef objRef) CfnNotificationRule(software.constructs.Construct scope, String id, CfnNotificationRuleProps props) Create a newAWS::CodeStarNotifications::NotificationRule. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForNotificationRule(INotificationRuleRef resource) The Amazon Resource Name (ARN) of the notification rule.The name or email alias of the person who created the notification rule.The level of detail to include in the notifications for this resource.The event type associated with this notification rule.A list of event types associated with this notification rule.getName()The name for the notification rule.A reference to a NotificationRule resource.The Amazon Resource Name (ARN) of the resource to associate with the notification rule.The status of the notification rule.getTags()Tag Manager which manages the tags for this resource.A list of tags to apply to this notification rule.The Amazon Resource Name (ARN) of the Amazon topic or client.A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnNotificationRule.renderProperties(Map<String, Object> props) voidsetCreatedBy(String value) The name or email alias of the person who created the notification rule.voidsetDetailType(String value) The level of detail to include in the notifications for this resource.voidsetEventTypeId(String value) The event type associated with this notification rule.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.voidsetTagsRaw(Map<String, String> value) A list of tags to apply to this notification rule.voidsetTargetAddress(String value) The Amazon Resource Name (ARN) of the Amazon topic or client.voidsetTargets(List<Object> value) A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule.voidsetTargets(IResolvable value) A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnNotificationRuleProps props) Create a newAWS::CodeStarNotifications::NotificationRule.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForNotificationRule
@Stability(Stable) @NotNull public static String arnForNotificationRule(@NotNull INotificationRuleRef resource) - Parameters:
resource- This parameter is required.
-
isCfnNotificationRule
Checks whether the given object is a CfnNotificationRule.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the notification rule. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getNotificationRuleRef
A reference to a NotificationRule resource.- Specified by:
getNotificationRuleRefin interfaceINotificationRuleRef
-
getTags
Tag Manager which manages the tags for this resource. -
getDetailType
The level of detail to include in the notifications for this resource. -
setDetailType
The level of detail to include in the notifications for this resource. -
getEventTypeIds
A list of event types associated with this notification rule. -
setEventTypeIds
A list of event types associated with this notification rule. -
getName
The name for the notification rule. -
setName
The name for the notification rule. -
getResource
The Amazon Resource Name (ARN) of the resource to associate with the notification rule. -
setResource
The Amazon Resource Name (ARN) of the resource to associate with the notification rule. -
getTargets
A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnNotificationRule.TargetProperty> -
setTargets
A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule. -
setTargets
A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule. -
getCreatedBy
The name or email alias of the person who created the notification rule. -
setCreatedBy
The name or email alias of the person who created the notification rule. -
getEventTypeId
The event type associated with this notification rule. -
setEventTypeId
The event type associated with this notification rule. -
getStatus
The status of the notification rule. -
setStatus
The status of the notification rule. -
getTagsRaw
A list of tags to apply to this notification rule. -
setTagsRaw
A list of tags to apply to this notification rule. -
getTargetAddress
The Amazon Resource Name (ARN) of the Amazon topic or client. -
setTargetAddress
The Amazon Resource Name (ARN) of the Amazon topic or client.
-