CfnNotificationRuleProps Struct
Properties for defining a CfnNotificationRule.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codestarnotifications as codestarnotifications } from 'aws-cdk-lib';
const cfnNotificationRuleProps: codestarnotifications.CfnNotificationRuleProps = {
detailType: 'detailType',
eventTypeIds: ['eventTypeIds'],
name: 'name',
resource: 'resource',
targets: [{
targetAddress: 'targetAddress',
targetType: 'targetType',
}],
// the properties below are optional
createdBy: 'createdBy',
eventTypeId: 'eventTypeId',
status: 'status',
tags: {
tagsKey: 'tags',
},
targetAddress: 'targetAddress',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codestarnotifications as codestarnotifications
cfn_notification_rule_props = codestarnotifications.CfnNotificationRuleProps(
detail_type="detailType",
event_type_ids=["eventTypeIds"],
name="name",
resource="resource",
targets=[codestarnotifications.CfnNotificationRule.TargetProperty(
target_address="targetAddress",
target_type="targetType"
)],
# the properties below are optional
created_by="createdBy",
event_type_id="eventTypeId",
status="status",
tags={
"tags_key": "tags"
},
target_address="targetAddress"
)
// 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.*;
CfnNotificationRuleProps cfnNotificationRuleProps = CfnNotificationRuleProps.builder()
.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();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeStarNotifications;
var cfnNotificationRuleProps = new CfnNotificationRuleProps {
DetailType = "detailType",
EventTypeIds = new [] { "eventTypeIds" },
Name = "name",
Resource = "resource",
Targets = new [] { new TargetProperty {
TargetAddress = "targetAddress",
TargetType = "targetType"
} },
// the properties below are optional
CreatedBy = "createdBy",
EventTypeId = "eventTypeId",
Status = "status",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
TargetAddress = "targetAddress"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnNotificationRuleProps := &CfnNotificationRuleProps{
DetailType: jsii.String("detailType"),
EventTypeIds: []*string{
jsii.String("eventTypeIds"),
},
Name: jsii.String("name"),
Resource: jsii.String("resource"),
Targets: []interface{}{
&TargetProperty{
TargetAddress: jsii.String("targetAddress"),
TargetType: jsii.String("targetType"),
},
},
// the properties below are optional
CreatedBy: jsii.String("createdBy"),
EventTypeId: jsii.String("eventTypeId"),
Status: jsii.String("status"),
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
TargetAddress: jsii.String("targetAddress"),
}
Properties
createdByoptionalstringcreated_byoptionalstrcreatedByoptionalStringCreatedByoptionalstringCreatedByoptional*string #notes
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.
eventTypeIdoptionalstringevent_type_idoptionalstreventTypeIdoptionalStringEventTypeIdoptionalstringEventTypeIdoptional*string #For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
eventTypeIdsstring[]event_type_idstyping.List[str]eventTypeIdsList<String>EventTypeIdsstring[]EventTypeIds*[]*string required #For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide .
Notification rule names must be unique in your AWS account .
Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
statusoptionalstringstatusoptionalstrstatusoptionalStringStatusoptionalstringStatusoptional*string #The default value is ENABLED . If the status is set to DISABLED , notifications aren't sent for the notification rule.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #Key names cannot start with " aws ".
targetAddressoptionalstringtarget_addressoptionalstrtargetAddressoptionalStringTargetAddressoptionalstringTargetAddressoptional*string #targetsIResolvable | IResolvable | CfnNotificationRule.targetstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TargetProperty]]]targetsIResolvableTargetsIResolvableTargetsinterface{} required #