@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:28:56.703Z") public class CfnNotificationRule extends CfnResource implements IInspectable
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.*; Object tags; 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(tags) .targetAddress("targetAddress") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnNotificationRule.Builder
A fluent builder for
CfnNotificationRule . |
static interface |
CfnNotificationRule.TargetProperty
Information about the AWS Chatbot topics or AWS Chatbot clients associated with a notification rule.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnNotificationRule(Construct scope,
java.lang.String id,
CfnNotificationRuleProps props)
Create a new `AWS::CodeStarNotifications::NotificationRule`.
|
protected |
CfnNotificationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnNotificationRule(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCreatedBy()
`AWS::CodeStarNotifications::NotificationRule.CreatedBy`.
|
java.lang.String |
getDetailType()
The level of detail to include in the notifications for this resource.
|
java.lang.String |
getEventTypeId()
`AWS::CodeStarNotifications::NotificationRule.EventTypeId`.
|
java.util.List<java.lang.String> |
getEventTypeIds()
A list of event types associated with this notification rule.
|
java.lang.String |
getName()
The name for the notification rule.
|
java.lang.String |
getResource()
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.
|
java.lang.String |
getStatus()
The status of the notification rule.
|
TagManager |
getTags()
A list of tags to apply to this notification rule.
|
java.lang.String |
getTargetAddress()
`AWS::CodeStarNotifications::NotificationRule.TargetAddress`.
|
java.lang.Object |
getTargets()
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.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCreatedBy(java.lang.String value)
`AWS::CodeStarNotifications::NotificationRule.CreatedBy`.
|
void |
setDetailType(java.lang.String value)
The level of detail to include in the notifications for this resource.
|
void |
setEventTypeId(java.lang.String value)
`AWS::CodeStarNotifications::NotificationRule.EventTypeId`.
|
void |
setEventTypeIds(java.util.List<java.lang.String> value)
A list of event types associated with this notification rule.
|
void |
setName(java.lang.String value)
The name for the notification rule.
|
void |
setResource(java.lang.String value)
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.
|
void |
setStatus(java.lang.String value)
The status of the notification rule.
|
void |
setTargetAddress(java.lang.String value)
`AWS::CodeStarNotifications::NotificationRule.TargetAddress`.
|
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.
|
void |
setTargets(java.util.List<java.lang.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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnNotificationRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnNotificationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnNotificationRule(Construct scope, java.lang.String id, CfnNotificationRuleProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
Key names cannot start with " aws
".
public java.lang.String getDetailType()
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.
public void setDetailType(java.lang.String value)
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.
public java.util.List<java.lang.String> getEventTypeIds()
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
public void setEventTypeIds(java.util.List<java.lang.String> value)
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
public java.lang.String getName()
Notification rule names must be unique in your AWS account .
public void setName(java.lang.String value)
Notification rule names must be unique in your AWS account .
public java.lang.String getResource()
Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
public void setResource(java.lang.String value)
Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
public java.lang.Object getTargets()
public void setTargets(IResolvable value)
public void setTargets(java.util.List<java.lang.Object> value)
public java.lang.String getCreatedBy()
public void setCreatedBy(java.lang.String value)
public java.lang.String getEventTypeId()
public void setEventTypeId(java.lang.String value)
public java.lang.String getStatus()
The default value is ENABLED
. If the status is set to DISABLED
, notifications aren't sent for the notification rule.
public void setStatus(java.lang.String value)
The default value is ENABLED
. If the status is set to DISABLED
, notifications aren't sent for the notification rule.
public java.lang.String getTargetAddress()
public void setTargetAddress(java.lang.String value)