1. Packages
  2. AWS
  3. API Docs
  4. codestarnotifications
  5. NotificationRule
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.codestarnotifications.NotificationRule

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a CodeStar Notifications Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const code = new aws.codecommit.Repository("code", {repositoryName: "example-code-repo"});
    const notif = new aws.sns.Topic("notif", {name: "notification"});
    const notifAccess = notif.arn.apply(arn => aws.iam.getPolicyDocumentOutput({
        statements: [{
            actions: ["sns:Publish"],
            principals: [{
                type: "Service",
                identifiers: ["codestar-notifications.amazonaws.com"],
            }],
            resources: [arn],
        }],
    }));
    const _default = new aws.sns.TopicPolicy("default", {
        arn: notif.arn,
        policy: notifAccess.apply(notifAccess => notifAccess.json),
    });
    const commits = new aws.codestarnotifications.NotificationRule("commits", {
        detailType: "BASIC",
        eventTypeIds: ["codecommit-repository-comments-on-commits"],
        name: "example-code-repo-commits",
        resource: code.arn,
        targets: [{
            address: notif.arn,
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    code = aws.codecommit.Repository("code", repository_name="example-code-repo")
    notif = aws.sns.Topic("notif", name="notification")
    notif_access = notif.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{
        "actions": ["sns:Publish"],
        "principals": [{
            "type": "Service",
            "identifiers": ["codestar-notifications.amazonaws.com"],
        }],
        "resources": [arn],
    }]))
    default = aws.sns.TopicPolicy("default",
        arn=notif.arn,
        policy=notif_access.json)
    commits = aws.codestarnotifications.NotificationRule("commits",
        detail_type="BASIC",
        event_type_ids=["codecommit-repository-comments-on-commits"],
        name="example-code-repo-commits",
        resource=code.arn,
        targets=[{
            "address": notif.arn,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codecommit"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarnotifications"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    code, err := codecommit.NewRepository(ctx, "code", &codecommit.RepositoryArgs{
    RepositoryName: pulumi.String("example-code-repo"),
    })
    if err != nil {
    return err
    }
    notif, err := sns.NewTopic(ctx, "notif", &sns.TopicArgs{
    Name: pulumi.String("notification"),
    })
    if err != nil {
    return err
    }
    notifAccess := notif.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {
    return iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
    Statements: []iam.GetPolicyDocumentStatement{
    {
    Actions: []string{
    "sns:Publish",
    },
    Principals: []iam.GetPolicyDocumentStatementPrincipal{
    {
    Type: "Service",
    Identifiers: []string{
    "codestar-notifications.amazonaws.com",
    },
    },
    },
    Resources: interface{}{
    arn,
    },
    },
    },
    }, nil))), nil
    }).(iam.GetPolicyDocumentResultOutput)
    _, err = sns.NewTopicPolicy(ctx, "default", &sns.TopicPolicyArgs{
    Arn: notif.Arn,
    Policy: pulumi.String(notifAccess.ApplyT(func(notifAccess iam.GetPolicyDocumentResult) (*string, error) {
    return &notifAccess.Json, nil
    }).(pulumi.StringPtrOutput)),
    })
    if err != nil {
    return err
    }
    _, err = codestarnotifications.NewNotificationRule(ctx, "commits", &codestarnotifications.NotificationRuleArgs{
    DetailType: pulumi.String("BASIC"),
    EventTypeIds: pulumi.StringArray{
    pulumi.String("codecommit-repository-comments-on-commits"),
    },
    Name: pulumi.String("example-code-repo-commits"),
    Resource: code.Arn,
    Targets: codestarnotifications.NotificationRuleTargetArray{
    &codestarnotifications.NotificationRuleTargetArgs{
    Address: notif.Arn,
    },
    },
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var code = new Aws.CodeCommit.Repository("code", new()
        {
            RepositoryName = "example-code-repo",
        });
    
        var notif = new Aws.Sns.Topic("notif", new()
        {
            Name = "notification",
        });
    
        var notifAccess = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Actions = new[]
                    {
                        "sns:Publish",
                    },
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "codestar-notifications.amazonaws.com",
                            },
                        },
                    },
                    Resources = new[]
                    {
                        notif.Arn,
                    },
                },
            },
        });
    
        var @default = new Aws.Sns.TopicPolicy("default", new()
        {
            Arn = notif.Arn,
            Policy = notifAccess.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var commits = new Aws.CodeStarNotifications.NotificationRule("commits", new()
        {
            DetailType = "BASIC",
            EventTypeIds = new[]
            {
                "codecommit-repository-comments-on-commits",
            },
            Name = "example-code-repo-commits",
            Resource = code.Arn,
            Targets = new[]
            {
                new Aws.CodeStarNotifications.Inputs.NotificationRuleTargetArgs
                {
                    Address = notif.Arn,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.codecommit.Repository;
    import com.pulumi.aws.codecommit.RepositoryArgs;
    import com.pulumi.aws.sns.Topic;
    import com.pulumi.aws.sns.TopicArgs;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
    import com.pulumi.aws.sns.TopicPolicy;
    import com.pulumi.aws.sns.TopicPolicyArgs;
    import com.pulumi.aws.codestarnotifications.NotificationRule;
    import com.pulumi.aws.codestarnotifications.NotificationRuleArgs;
    import com.pulumi.aws.codestarnotifications.inputs.NotificationRuleTargetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var code = new Repository("code", RepositoryArgs.builder()
                .repositoryName("example-code-repo")
                .build());
    
            var notif = new Topic("notif", TopicArgs.builder()
                .name("notification")
                .build());
    
            final var notifAccess = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .actions("sns:Publish")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("codestar-notifications.amazonaws.com")
                        .build())
                    .resources(notif.arn())
                    .build())
                .build());
    
            var default_ = new TopicPolicy("default", TopicPolicyArgs.builder()
                .arn(notif.arn())
                .policy(notifAccess.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(notifAccess -> notifAccess.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
                .build());
    
            var commits = new NotificationRule("commits", NotificationRuleArgs.builder()
                .detailType("BASIC")
                .eventTypeIds("codecommit-repository-comments-on-commits")
                .name("example-code-repo-commits")
                .resource(code.arn())
                .targets(NotificationRuleTargetArgs.builder()
                    .address(notif.arn())
                    .build())
                .build());
    
        }
    }
    
    resources:
      code:
        type: aws:codecommit:Repository
        properties:
          repositoryName: example-code-repo
      notif:
        type: aws:sns:Topic
        properties:
          name: notification
      default:
        type: aws:sns:TopicPolicy
        properties:
          arn: ${notif.arn}
          policy: ${notifAccess.json}
      commits:
        type: aws:codestarnotifications:NotificationRule
        properties:
          detailType: BASIC
          eventTypeIds:
            - codecommit-repository-comments-on-commits
          name: example-code-repo-commits
          resource: ${code.arn}
          targets:
            - address: ${notif.arn}
    variables:
      notifAccess:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - actions:
                  - sns:Publish
                principals:
                  - type: Service
                    identifiers:
                      - codestar-notifications.amazonaws.com
                resources:
                  - ${notif.arn}
    

    Create NotificationRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NotificationRule(name: string, args: NotificationRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NotificationRule(resource_name: str,
                         args: NotificationRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def NotificationRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         detail_type: Optional[str] = None,
                         event_type_ids: Optional[Sequence[str]] = None,
                         resource: Optional[str] = None,
                         name: Optional[str] = None,
                         status: Optional[str] = None,
                         tags: Optional[Mapping[str, str]] = None,
                         targets: Optional[Sequence[NotificationRuleTargetArgs]] = None)
    func NewNotificationRule(ctx *Context, name string, args NotificationRuleArgs, opts ...ResourceOption) (*NotificationRule, error)
    public NotificationRule(string name, NotificationRuleArgs args, CustomResourceOptions? opts = null)
    public NotificationRule(String name, NotificationRuleArgs args)
    public NotificationRule(String name, NotificationRuleArgs args, CustomResourceOptions options)
    
    type: aws:codestarnotifications:NotificationRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NotificationRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NotificationRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NotificationRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotificationRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotificationRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var notificationRuleResource = new Aws.CodeStarNotifications.NotificationRule("notificationRuleResource", new()
    {
        DetailType = "string",
        EventTypeIds = new[]
        {
            "string",
        },
        Resource = "string",
        Name = "string",
        Status = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Targets = new[]
        {
            new Aws.CodeStarNotifications.Inputs.NotificationRuleTargetArgs
            {
                Address = "string",
                Status = "string",
                Type = "string",
            },
        },
    });
    
    example, err := codestarnotifications.NewNotificationRule(ctx, "notificationRuleResource", &codestarnotifications.NotificationRuleArgs{
    	DetailType: pulumi.String("string"),
    	EventTypeIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Resource: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Status:   pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Targets: codestarnotifications.NotificationRuleTargetArray{
    		&codestarnotifications.NotificationRuleTargetArgs{
    			Address: pulumi.String("string"),
    			Status:  pulumi.String("string"),
    			Type:    pulumi.String("string"),
    		},
    	},
    })
    
    var notificationRuleResource = new NotificationRule("notificationRuleResource", NotificationRuleArgs.builder()
        .detailType("string")
        .eventTypeIds("string")
        .resource("string")
        .name("string")
        .status("string")
        .tags(Map.of("string", "string"))
        .targets(NotificationRuleTargetArgs.builder()
            .address("string")
            .status("string")
            .type("string")
            .build())
        .build());
    
    notification_rule_resource = aws.codestarnotifications.NotificationRule("notificationRuleResource",
        detail_type="string",
        event_type_ids=["string"],
        resource="string",
        name="string",
        status="string",
        tags={
            "string": "string",
        },
        targets=[{
            "address": "string",
            "status": "string",
            "type": "string",
        }])
    
    const notificationRuleResource = new aws.codestarnotifications.NotificationRule("notificationRuleResource", {
        detailType: "string",
        eventTypeIds: ["string"],
        resource: "string",
        name: "string",
        status: "string",
        tags: {
            string: "string",
        },
        targets: [{
            address: "string",
            status: "string",
            type: "string",
        }],
    });
    
    type: aws:codestarnotifications:NotificationRule
    properties:
        detailType: string
        eventTypeIds:
            - string
        name: string
        resource: string
        status: string
        tags:
            string: string
        targets:
            - address: string
              status: string
              type: string
    

    NotificationRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NotificationRule resource accepts the following input properties:

    DetailType string
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    EventTypeIds List<string>
    A list of event types associated with this notification rule. For list of allowed events see here.
    Resource string
    The ARN of the resource to associate with the notification rule.
    Name string
    The name of notification rule.
    Status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Targets List<NotificationRuleTarget>
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    DetailType string
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    EventTypeIds []string
    A list of event types associated with this notification rule. For list of allowed events see here.
    Resource string
    The ARN of the resource to associate with the notification rule.
    Name string
    The name of notification rule.
    Status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Targets []NotificationRuleTargetArgs
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    detailType String
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    eventTypeIds List<String>
    A list of event types associated with this notification rule. For list of allowed events see here.
    resource String
    The ARN of the resource to associate with the notification rule.
    name String
    The name of notification rule.
    status String
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    targets List<NotificationRuleTarget>
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    detailType string
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    eventTypeIds string[]
    A list of event types associated with this notification rule. For list of allowed events see here.
    resource string
    The ARN of the resource to associate with the notification rule.
    name string
    The name of notification rule.
    status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    targets NotificationRuleTarget[]
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    detail_type str
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    event_type_ids Sequence[str]
    A list of event types associated with this notification rule. For list of allowed events see here.
    resource str
    The ARN of the resource to associate with the notification rule.
    name str
    The name of notification rule.
    status str
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    targets Sequence[NotificationRuleTargetArgs]
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    detailType String
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    eventTypeIds List<String>
    A list of event types associated with this notification rule. For list of allowed events see here.
    resource String
    The ARN of the resource to associate with the notification rule.
    name String
    The name of notification rule.
    status String
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    targets List<Property Map>
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotificationRule resource produces the following output properties:

    Arn string
    The codestar notification rule ARN.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The codestar notification rule ARN.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The codestar notification rule ARN.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The codestar notification rule ARN.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The codestar notification rule ARN.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The codestar notification rule ARN.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing NotificationRule Resource

    Get an existing NotificationRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NotificationRuleState, opts?: CustomResourceOptions): NotificationRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            detail_type: Optional[str] = None,
            event_type_ids: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            resource: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            targets: Optional[Sequence[NotificationRuleTargetArgs]] = None) -> NotificationRule
    func GetNotificationRule(ctx *Context, name string, id IDInput, state *NotificationRuleState, opts ...ResourceOption) (*NotificationRule, error)
    public static NotificationRule Get(string name, Input<string> id, NotificationRuleState? state, CustomResourceOptions? opts = null)
    public static NotificationRule get(String name, Output<String> id, NotificationRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The codestar notification rule ARN.
    DetailType string
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    EventTypeIds List<string>
    A list of event types associated with this notification rule. For list of allowed events see here.
    Name string
    The name of notification rule.
    Resource string
    The ARN of the resource to associate with the notification rule.
    Status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Targets List<NotificationRuleTarget>
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    Arn string
    The codestar notification rule ARN.
    DetailType string
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    EventTypeIds []string
    A list of event types associated with this notification rule. For list of allowed events see here.
    Name string
    The name of notification rule.
    Resource string
    The ARN of the resource to associate with the notification rule.
    Status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Targets []NotificationRuleTargetArgs
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    arn String
    The codestar notification rule ARN.
    detailType String
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    eventTypeIds List<String>
    A list of event types associated with this notification rule. For list of allowed events see here.
    name String
    The name of notification rule.
    resource String
    The ARN of the resource to associate with the notification rule.
    status String
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targets List<NotificationRuleTarget>
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    arn string
    The codestar notification rule ARN.
    detailType string
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    eventTypeIds string[]
    A list of event types associated with this notification rule. For list of allowed events see here.
    name string
    The name of notification rule.
    resource string
    The ARN of the resource to associate with the notification rule.
    status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targets NotificationRuleTarget[]
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    arn str
    The codestar notification rule ARN.
    detail_type str
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    event_type_ids Sequence[str]
    A list of event types associated with this notification rule. For list of allowed events see here.
    name str
    The name of notification rule.
    resource str
    The ARN of the resource to associate with the notification rule.
    status str
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targets Sequence[NotificationRuleTargetArgs]
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.
    arn String
    The codestar notification rule ARN.
    detailType String
    The level of detail to include in the notifications for this resource. Possible values are BASIC and FULL.
    eventTypeIds List<String>
    A list of event types associated with this notification rule. For list of allowed events see here.
    name String
    The name of notification rule.
    resource String
    The ARN of the resource to associate with the notification rule.
    status String
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targets List<Property Map>
    Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation.

    Supporting Types

    NotificationRuleTarget, NotificationRuleTargetArgs

    Address string
    The ARN of notification rule target. For example, a SNS Topic ARN.
    Status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    Type string
    The type of the notification target. Default value is SNS.
    Address string
    The ARN of notification rule target. For example, a SNS Topic ARN.
    Status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    Type string
    The type of the notification target. Default value is SNS.
    address String
    The ARN of notification rule target. For example, a SNS Topic ARN.
    status String
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    type String
    The type of the notification target. Default value is SNS.
    address string
    The ARN of notification rule target. For example, a SNS Topic ARN.
    status string
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    type string
    The type of the notification target. Default value is SNS.
    address str
    The ARN of notification rule target. For example, a SNS Topic ARN.
    status str
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    type str
    The type of the notification target. Default value is SNS.
    address String
    The ARN of notification rule target. For example, a SNS Topic ARN.
    status String
    The status of the notification rule. Possible values are ENABLED and DISABLED, default is ENABLED.
    type String
    The type of the notification target. Default value is SNS.

    Import

    Using pulumi import, import CodeStar notification rule using the ARN. For example:

    $ pulumi import aws:codestarnotifications/notificationRule:NotificationRule foo arn:aws:codestar-notifications:us-west-1:0123456789:notificationrule/2cdc68a3-8f7c-4893-b6a5-45b362bd4f2b
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi