import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a CodeStar Notifications Rule. * * ## Example Usage * * ```typescript * 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 = aws.iam.getPolicyDocumentOutput({ * statements: [{ * principals: [{ * type: "Service", * identifiers: ["codestar-notifications.amazonaws.com"], * }], * actions: ["sns:Publish"], * resources: [notif.arn], * }], * }); * const _default = new aws.sns.TopicPolicy("default", { * arn: notif.arn, * policy: notifAccess.json, * }); * const commits = new aws.codestarnotifications.NotificationRule("commits", { * targets: [{ * address: notif.arn, * }], * detailType: "BASIC", * eventTypeIds: ["codecommit-repository-comments-on-commits"], * name: "example-code-repo-commits", * resource: code.arn, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * - `arn` (String) ARN of the CodeStar notification rule. * * Using `pulumi import`, import CodeStar notification rule using the ARN. For example: * * ```sh * $ pulumi import aws:codestarnotifications/notificationRule:NotificationRule foo arn:aws:codestar-notifications:us-west-1:0123456789:notificationrule/2cdc68a3-8f7c-4893-b6a5-45b362bd4f2b * ``` */ export declare class NotificationRule extends pulumi.CustomResource { /** * Get an existing NotificationRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: NotificationRuleState, opts?: pulumi.CustomResourceOptions): NotificationRule; /** * Returns true if the given object is an instance of NotificationRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is NotificationRule; /** * The codestar notification rule ARN. */ readonly arn: pulumi.Output; /** * The level of detail to include in the notifications for this resource. Possible values are `BASIC` and `FULL`. */ readonly detailType: pulumi.Output; /** * A list of event types associated with this notification rule. * For list of allowed events see [here](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api). */ readonly eventTypeIds: pulumi.Output; /** * The name of notification rule. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * The ARN of the resource to associate with the notification rule. */ readonly resource: pulumi.Output; /** * The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. */ readonly status: pulumi.Output; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation. */ readonly targets: pulumi.Output; /** * Create a NotificationRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: NotificationRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NotificationRule resources. */ export interface NotificationRuleState { /** * The codestar notification rule ARN. */ arn?: pulumi.Input; /** * The level of detail to include in the notifications for this resource. Possible values are `BASIC` and `FULL`. */ detailType?: pulumi.Input; /** * A list of event types associated with this notification rule. * For list of allowed events see [here](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api). */ eventTypeIds?: pulumi.Input[] | undefined>; /** * The name of notification rule. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * The ARN of the resource to associate with the notification rule. */ resource?: pulumi.Input; /** * The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. */ status?: pulumi.Input; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation. */ targets?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a NotificationRule resource. */ export interface NotificationRuleArgs { /** * The level of detail to include in the notifications for this resource. Possible values are `BASIC` and `FULL`. */ detailType: pulumi.Input; /** * A list of event types associated with this notification rule. * For list of allowed events see [here](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api). */ eventTypeIds: pulumi.Input[]>; /** * The name of notification rule. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * The ARN of the resource to associate with the notification rule. */ resource: pulumi.Input; /** * The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. */ status?: pulumi.Input; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation. */ targets?: pulumi.Input[] | undefined>; } //# sourceMappingURL=notificationRule.d.ts.map