@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.575Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnNotificationRule(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrArn() |
protected Map<String,Object> |
getCfnProperties() |
String |
getCreatedBy()
`AWS::CodeStarNotifications::NotificationRule.CreatedBy`.
|
String |
getDetailType()
The level of detail to include in the notifications for this resource.
|
String |
getEventTypeId()
`AWS::CodeStarNotifications::NotificationRule.EventTypeId`.
|
List<String> |
getEventTypeIds()
A list of event types associated with this notification rule.
|
String |
getName()
The name for the notification rule.
|
String |
getResource()
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.
|
String |
getStatus()
The status of the notification rule.
|
TagManager |
getTags()
A list of tags to apply to this notification rule.
|
String |
getTargetAddress()
`AWS::CodeStarNotifications::NotificationRule.TargetAddress`.
|
Object |
getTargets()
A list of Amazon Resource Names (ARNs) of AWS Chatbot topics and AWS Chatbot clients to associate with the notification rule.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
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 |
setName(String value)
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 |
setStatus(String value)
The status of the notification rule.
|
void |
setTargetAddress(String value)
`AWS::CodeStarNotifications::NotificationRule.TargetAddress`.
|
void |
setTargets(IResolvable value)
A list of Amazon Resource Names (ARNs) of AWS Chatbot topics and AWS Chatbot clients to associate with the notification rule.
|
void |
setTargets(List<Object> value)
A list of Amazon Resource Names (ARNs) of AWS Chatbot 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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnNotificationRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnNotificationRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnNotificationRule(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Key names cannot start with " aws ".
@Stability(value=Stable) @NotNull public 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.
@Stability(value=Stable)
public void setDetailType(@NotNull
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.
@Stability(value=Stable) @NotNull public List<String> getEventTypeIds()
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
@Stability(value=Stable)
public void setEventTypeIds(@NotNull
List<String> value)
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
@Stability(value=Stable) @NotNull public String getName()
Notification rule names must be unique in your AWS account .
@Stability(value=Stable)
public void setName(@NotNull
String value)
Notification rule names must be unique in your AWS account .
@Stability(value=Stable) @NotNull public String getResource()
Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
@Stability(value=Stable)
public void setResource(@NotNull
String value)
Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
@Stability(value=Stable) @NotNull public Object getTargets()
@Stability(value=Stable)
public void setTargets(@NotNull
IResolvable value)
@Stability(value=Stable)
public void setTargets(@NotNull
List<Object> value)
@Stability(value=Stable) @Nullable public String getCreatedBy()
@Stability(value=Stable)
public void setCreatedBy(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getEventTypeId()
@Stability(value=Stable)
public void setEventTypeId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getStatus()
The default value is ENABLED . If the status is set to DISABLED , notifications aren't sent for the notification rule.
@Stability(value=Stable)
public void setStatus(@Nullable
String value)
The default value is ENABLED . If the status is set to DISABLED , notifications aren't sent for the notification rule.
@Stability(value=Stable) @Nullable public String getTargetAddress()
@Stability(value=Stable)
public void setTargetAddress(@Nullable
String value)
Copyright © 2022. All rights reserved.