Documentation ¶
Index ¶
- type NotificationRule
- func (*NotificationRule) ElementType() reflect.Type
- func (i *NotificationRule) ToNotificationRuleOutput() NotificationRuleOutput
- func (i *NotificationRule) ToNotificationRuleOutputWithContext(ctx context.Context) NotificationRuleOutput
- func (i *NotificationRule) ToNotificationRulePtrOutput() NotificationRulePtrOutput
- func (i *NotificationRule) ToNotificationRulePtrOutputWithContext(ctx context.Context) NotificationRulePtrOutput
- type NotificationRuleArgs
- type NotificationRuleArray
- type NotificationRuleArrayInput
- type NotificationRuleArrayOutput
- func (NotificationRuleArrayOutput) ElementType() reflect.Type
- func (o NotificationRuleArrayOutput) Index(i pulumi.IntInput) NotificationRuleOutput
- func (o NotificationRuleArrayOutput) ToNotificationRuleArrayOutput() NotificationRuleArrayOutput
- func (o NotificationRuleArrayOutput) ToNotificationRuleArrayOutputWithContext(ctx context.Context) NotificationRuleArrayOutput
- type NotificationRuleInput
- type NotificationRuleMap
- type NotificationRuleMapInput
- type NotificationRuleMapOutput
- func (NotificationRuleMapOutput) ElementType() reflect.Type
- func (o NotificationRuleMapOutput) MapIndex(k pulumi.StringInput) NotificationRuleOutput
- func (o NotificationRuleMapOutput) ToNotificationRuleMapOutput() NotificationRuleMapOutput
- func (o NotificationRuleMapOutput) ToNotificationRuleMapOutputWithContext(ctx context.Context) NotificationRuleMapOutput
- type NotificationRuleOutput
- func (NotificationRuleOutput) ElementType() reflect.Type
- func (o NotificationRuleOutput) ToNotificationRuleOutput() NotificationRuleOutput
- func (o NotificationRuleOutput) ToNotificationRuleOutputWithContext(ctx context.Context) NotificationRuleOutput
- func (o NotificationRuleOutput) ToNotificationRulePtrOutput() NotificationRulePtrOutput
- func (o NotificationRuleOutput) ToNotificationRulePtrOutputWithContext(ctx context.Context) NotificationRulePtrOutput
- type NotificationRulePtrInput
- type NotificationRulePtrOutput
- type NotificationRuleState
- type NotificationRuleTarget
- type NotificationRuleTargetArgs
- type NotificationRuleTargetArray
- func (NotificationRuleTargetArray) ElementType() reflect.Type
- func (i NotificationRuleTargetArray) ToNotificationRuleTargetArrayOutput() NotificationRuleTargetArrayOutput
- func (i NotificationRuleTargetArray) ToNotificationRuleTargetArrayOutputWithContext(ctx context.Context) NotificationRuleTargetArrayOutput
- type NotificationRuleTargetArrayInput
- type NotificationRuleTargetArrayOutput
- func (NotificationRuleTargetArrayOutput) ElementType() reflect.Type
- func (o NotificationRuleTargetArrayOutput) Index(i pulumi.IntInput) NotificationRuleTargetOutput
- func (o NotificationRuleTargetArrayOutput) ToNotificationRuleTargetArrayOutput() NotificationRuleTargetArrayOutput
- func (o NotificationRuleTargetArrayOutput) ToNotificationRuleTargetArrayOutputWithContext(ctx context.Context) NotificationRuleTargetArrayOutput
- type NotificationRuleTargetInput
- type NotificationRuleTargetOutput
- func (o NotificationRuleTargetOutput) Address() pulumi.StringOutput
- func (NotificationRuleTargetOutput) ElementType() reflect.Type
- func (o NotificationRuleTargetOutput) Status() pulumi.StringPtrOutput
- func (o NotificationRuleTargetOutput) ToNotificationRuleTargetOutput() NotificationRuleTargetOutput
- func (o NotificationRuleTargetOutput) ToNotificationRuleTargetOutputWithContext(ctx context.Context) NotificationRuleTargetOutput
- func (o NotificationRuleTargetOutput) Type() pulumi.StringPtrOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationRule ¶
type NotificationRule struct { pulumi.CustomResourceState // The codestar notification rule ARN. Arn pulumi.StringOutput `pulumi:"arn"` // The level of detail to include in the notifications for this resource. Possible values are `BASIC` and `FULL`. DetailType pulumi.StringOutput `pulumi:"detailType"` // 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.StringArrayOutput `pulumi:"eventTypeIds"` // The name of notification rule. Name pulumi.StringOutput `pulumi:"name"` // The ARN of the resource to associate with the notification rule. Resource pulumi.StringOutput `pulumi:"resource"` // The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. Status pulumi.StringPtrOutput `pulumi:"status"` // A map of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation. Targets NotificationRuleTargetArrayOutput `pulumi:"targets"` }
Provides a CodeStar Notifications Rule.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codecommit" "github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codestarnotifications" "github.com/pulumi/pulumi-aws/sdk/v3/go/aws/iam" "github.com/pulumi/pulumi-aws/sdk/v3/go/aws/sns" "github.com/pulumi/pulumi/sdk/v2/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", nil) if err != nil { return err } _, err = sns.NewTopicPolicy(ctx, "_default", &sns.TopicPolicyArgs{ Arn: notif.Arn, Policy: notifAccess.ApplyT(func(notifAccess iam.GetPolicyDocumentResult) (string, error) { return notifAccess.Json, nil }).(pulumi.StringOutput), }) 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"), }, Resource: code.Arn, Targets: codestarnotifications.NotificationRuleTargetArray{ &codestarnotifications.NotificationRuleTargetArgs{ Address: notif.Arn, }, }, }) if err != nil { return err } return nil }) }
```
## Import
CodeStar notification rule can be imported using the ARN, e.g.
```sh
$ pulumi import aws:codestarnotifications/notificationRule:NotificationRule foo arn:aws:codestar-notifications:us-west-1:0123456789:notificationrule/2cdc68a3-8f7c-4893-b6a5-45b362bd4f2b
```
func GetNotificationRule ¶
func GetNotificationRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NotificationRuleState, opts ...pulumi.ResourceOption) (*NotificationRule, error)
GetNotificationRule gets an existing NotificationRule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewNotificationRule ¶
func NewNotificationRule(ctx *pulumi.Context, name string, args *NotificationRuleArgs, opts ...pulumi.ResourceOption) (*NotificationRule, error)
NewNotificationRule registers a new resource with the given unique name, arguments, and options.
func (*NotificationRule) ElementType ¶ added in v3.13.0
func (*NotificationRule) ElementType() reflect.Type
func (*NotificationRule) ToNotificationRuleOutput ¶ added in v3.13.0
func (i *NotificationRule) ToNotificationRuleOutput() NotificationRuleOutput
func (*NotificationRule) ToNotificationRuleOutputWithContext ¶ added in v3.13.0
func (i *NotificationRule) ToNotificationRuleOutputWithContext(ctx context.Context) NotificationRuleOutput
func (*NotificationRule) ToNotificationRulePtrOutput ¶ added in v3.25.0
func (i *NotificationRule) ToNotificationRulePtrOutput() NotificationRulePtrOutput
func (*NotificationRule) ToNotificationRulePtrOutputWithContext ¶ added in v3.25.0
func (i *NotificationRule) ToNotificationRulePtrOutputWithContext(ctx context.Context) NotificationRulePtrOutput
type NotificationRuleArgs ¶
type NotificationRuleArgs struct { // The level of detail to include in the notifications for this resource. Possible values are `BASIC` and `FULL`. DetailType pulumi.StringInput // 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.StringArrayInput // The name of notification rule. Name pulumi.StringPtrInput // The ARN of the resource to associate with the notification rule. Resource pulumi.StringInput // The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. Status pulumi.StringPtrInput // A map of tags to assign to the resource. Tags pulumi.StringMapInput // Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation. Targets NotificationRuleTargetArrayInput }
The set of arguments for constructing a NotificationRule resource.
func (NotificationRuleArgs) ElementType ¶
func (NotificationRuleArgs) ElementType() reflect.Type
type NotificationRuleArray ¶ added in v3.25.0
type NotificationRuleArray []NotificationRuleInput
func (NotificationRuleArray) ElementType ¶ added in v3.25.0
func (NotificationRuleArray) ElementType() reflect.Type
func (NotificationRuleArray) ToNotificationRuleArrayOutput ¶ added in v3.25.0
func (i NotificationRuleArray) ToNotificationRuleArrayOutput() NotificationRuleArrayOutput
func (NotificationRuleArray) ToNotificationRuleArrayOutputWithContext ¶ added in v3.25.0
func (i NotificationRuleArray) ToNotificationRuleArrayOutputWithContext(ctx context.Context) NotificationRuleArrayOutput
type NotificationRuleArrayInput ¶ added in v3.25.0
type NotificationRuleArrayInput interface { pulumi.Input ToNotificationRuleArrayOutput() NotificationRuleArrayOutput ToNotificationRuleArrayOutputWithContext(context.Context) NotificationRuleArrayOutput }
NotificationRuleArrayInput is an input type that accepts NotificationRuleArray and NotificationRuleArrayOutput values. You can construct a concrete instance of `NotificationRuleArrayInput` via:
NotificationRuleArray{ NotificationRuleArgs{...} }
type NotificationRuleArrayOutput ¶ added in v3.25.0
type NotificationRuleArrayOutput struct{ *pulumi.OutputState }
func (NotificationRuleArrayOutput) ElementType ¶ added in v3.25.0
func (NotificationRuleArrayOutput) ElementType() reflect.Type
func (NotificationRuleArrayOutput) Index ¶ added in v3.25.0
func (o NotificationRuleArrayOutput) Index(i pulumi.IntInput) NotificationRuleOutput
func (NotificationRuleArrayOutput) ToNotificationRuleArrayOutput ¶ added in v3.25.0
func (o NotificationRuleArrayOutput) ToNotificationRuleArrayOutput() NotificationRuleArrayOutput
func (NotificationRuleArrayOutput) ToNotificationRuleArrayOutputWithContext ¶ added in v3.25.0
func (o NotificationRuleArrayOutput) ToNotificationRuleArrayOutputWithContext(ctx context.Context) NotificationRuleArrayOutput
type NotificationRuleInput ¶ added in v3.13.0
type NotificationRuleInput interface { pulumi.Input ToNotificationRuleOutput() NotificationRuleOutput ToNotificationRuleOutputWithContext(ctx context.Context) NotificationRuleOutput }
type NotificationRuleMap ¶ added in v3.25.0
type NotificationRuleMap map[string]NotificationRuleInput
func (NotificationRuleMap) ElementType ¶ added in v3.25.0
func (NotificationRuleMap) ElementType() reflect.Type
func (NotificationRuleMap) ToNotificationRuleMapOutput ¶ added in v3.25.0
func (i NotificationRuleMap) ToNotificationRuleMapOutput() NotificationRuleMapOutput
func (NotificationRuleMap) ToNotificationRuleMapOutputWithContext ¶ added in v3.25.0
func (i NotificationRuleMap) ToNotificationRuleMapOutputWithContext(ctx context.Context) NotificationRuleMapOutput
type NotificationRuleMapInput ¶ added in v3.25.0
type NotificationRuleMapInput interface { pulumi.Input ToNotificationRuleMapOutput() NotificationRuleMapOutput ToNotificationRuleMapOutputWithContext(context.Context) NotificationRuleMapOutput }
NotificationRuleMapInput is an input type that accepts NotificationRuleMap and NotificationRuleMapOutput values. You can construct a concrete instance of `NotificationRuleMapInput` via:
NotificationRuleMap{ "key": NotificationRuleArgs{...} }
type NotificationRuleMapOutput ¶ added in v3.25.0
type NotificationRuleMapOutput struct{ *pulumi.OutputState }
func (NotificationRuleMapOutput) ElementType ¶ added in v3.25.0
func (NotificationRuleMapOutput) ElementType() reflect.Type
func (NotificationRuleMapOutput) MapIndex ¶ added in v3.25.0
func (o NotificationRuleMapOutput) MapIndex(k pulumi.StringInput) NotificationRuleOutput
func (NotificationRuleMapOutput) ToNotificationRuleMapOutput ¶ added in v3.25.0
func (o NotificationRuleMapOutput) ToNotificationRuleMapOutput() NotificationRuleMapOutput
func (NotificationRuleMapOutput) ToNotificationRuleMapOutputWithContext ¶ added in v3.25.0
func (o NotificationRuleMapOutput) ToNotificationRuleMapOutputWithContext(ctx context.Context) NotificationRuleMapOutput
type NotificationRuleOutput ¶ added in v3.13.0
type NotificationRuleOutput struct {
*pulumi.OutputState
}
func (NotificationRuleOutput) ElementType ¶ added in v3.13.0
func (NotificationRuleOutput) ElementType() reflect.Type
func (NotificationRuleOutput) ToNotificationRuleOutput ¶ added in v3.13.0
func (o NotificationRuleOutput) ToNotificationRuleOutput() NotificationRuleOutput
func (NotificationRuleOutput) ToNotificationRuleOutputWithContext ¶ added in v3.13.0
func (o NotificationRuleOutput) ToNotificationRuleOutputWithContext(ctx context.Context) NotificationRuleOutput
func (NotificationRuleOutput) ToNotificationRulePtrOutput ¶ added in v3.25.0
func (o NotificationRuleOutput) ToNotificationRulePtrOutput() NotificationRulePtrOutput
func (NotificationRuleOutput) ToNotificationRulePtrOutputWithContext ¶ added in v3.25.0
func (o NotificationRuleOutput) ToNotificationRulePtrOutputWithContext(ctx context.Context) NotificationRulePtrOutput
type NotificationRulePtrInput ¶ added in v3.25.0
type NotificationRulePtrInput interface { pulumi.Input ToNotificationRulePtrOutput() NotificationRulePtrOutput ToNotificationRulePtrOutputWithContext(ctx context.Context) NotificationRulePtrOutput }
type NotificationRulePtrOutput ¶ added in v3.25.0
type NotificationRulePtrOutput struct {
*pulumi.OutputState
}
func (NotificationRulePtrOutput) ElementType ¶ added in v3.25.0
func (NotificationRulePtrOutput) ElementType() reflect.Type
func (NotificationRulePtrOutput) ToNotificationRulePtrOutput ¶ added in v3.25.0
func (o NotificationRulePtrOutput) ToNotificationRulePtrOutput() NotificationRulePtrOutput
func (NotificationRulePtrOutput) ToNotificationRulePtrOutputWithContext ¶ added in v3.25.0
func (o NotificationRulePtrOutput) ToNotificationRulePtrOutputWithContext(ctx context.Context) NotificationRulePtrOutput
type NotificationRuleState ¶
type NotificationRuleState struct { // The codestar notification rule ARN. Arn pulumi.StringPtrInput // The level of detail to include in the notifications for this resource. Possible values are `BASIC` and `FULL`. DetailType pulumi.StringPtrInput // 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.StringArrayInput // The name of notification rule. Name pulumi.StringPtrInput // The ARN of the resource to associate with the notification rule. Resource pulumi.StringPtrInput // The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. Status pulumi.StringPtrInput // A map of tags to assign to the resource. Tags pulumi.StringMapInput // Configuration blocks containing notification target information. Can be specified multiple times. At least one target must be specified on creation. Targets NotificationRuleTargetArrayInput }
func (NotificationRuleState) ElementType ¶
func (NotificationRuleState) ElementType() reflect.Type
type NotificationRuleTarget ¶
type NotificationRuleTarget struct { // The ARN of notification rule target. For example, a SNS Topic ARN. Address string `pulumi:"address"` // The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. Status *string `pulumi:"status"` // The type of the notification target. Default value is `SNS`. Type *string `pulumi:"type"` }
type NotificationRuleTargetArgs ¶
type NotificationRuleTargetArgs struct { // The ARN of notification rule target. For example, a SNS Topic ARN. Address pulumi.StringInput `pulumi:"address"` // The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`. Status pulumi.StringPtrInput `pulumi:"status"` // The type of the notification target. Default value is `SNS`. Type pulumi.StringPtrInput `pulumi:"type"` }
func (NotificationRuleTargetArgs) ElementType ¶
func (NotificationRuleTargetArgs) ElementType() reflect.Type
func (NotificationRuleTargetArgs) ToNotificationRuleTargetOutput ¶
func (i NotificationRuleTargetArgs) ToNotificationRuleTargetOutput() NotificationRuleTargetOutput
func (NotificationRuleTargetArgs) ToNotificationRuleTargetOutputWithContext ¶
func (i NotificationRuleTargetArgs) ToNotificationRuleTargetOutputWithContext(ctx context.Context) NotificationRuleTargetOutput
type NotificationRuleTargetArray ¶
type NotificationRuleTargetArray []NotificationRuleTargetInput
func (NotificationRuleTargetArray) ElementType ¶
func (NotificationRuleTargetArray) ElementType() reflect.Type
func (NotificationRuleTargetArray) ToNotificationRuleTargetArrayOutput ¶
func (i NotificationRuleTargetArray) ToNotificationRuleTargetArrayOutput() NotificationRuleTargetArrayOutput
func (NotificationRuleTargetArray) ToNotificationRuleTargetArrayOutputWithContext ¶
func (i NotificationRuleTargetArray) ToNotificationRuleTargetArrayOutputWithContext(ctx context.Context) NotificationRuleTargetArrayOutput
type NotificationRuleTargetArrayInput ¶
type NotificationRuleTargetArrayInput interface { pulumi.Input ToNotificationRuleTargetArrayOutput() NotificationRuleTargetArrayOutput ToNotificationRuleTargetArrayOutputWithContext(context.Context) NotificationRuleTargetArrayOutput }
NotificationRuleTargetArrayInput is an input type that accepts NotificationRuleTargetArray and NotificationRuleTargetArrayOutput values. You can construct a concrete instance of `NotificationRuleTargetArrayInput` via:
NotificationRuleTargetArray{ NotificationRuleTargetArgs{...} }
type NotificationRuleTargetArrayOutput ¶
type NotificationRuleTargetArrayOutput struct{ *pulumi.OutputState }
func (NotificationRuleTargetArrayOutput) ElementType ¶
func (NotificationRuleTargetArrayOutput) ElementType() reflect.Type
func (NotificationRuleTargetArrayOutput) Index ¶
func (o NotificationRuleTargetArrayOutput) Index(i pulumi.IntInput) NotificationRuleTargetOutput
func (NotificationRuleTargetArrayOutput) ToNotificationRuleTargetArrayOutput ¶
func (o NotificationRuleTargetArrayOutput) ToNotificationRuleTargetArrayOutput() NotificationRuleTargetArrayOutput
func (NotificationRuleTargetArrayOutput) ToNotificationRuleTargetArrayOutputWithContext ¶
func (o NotificationRuleTargetArrayOutput) ToNotificationRuleTargetArrayOutputWithContext(ctx context.Context) NotificationRuleTargetArrayOutput
type NotificationRuleTargetInput ¶
type NotificationRuleTargetInput interface { pulumi.Input ToNotificationRuleTargetOutput() NotificationRuleTargetOutput ToNotificationRuleTargetOutputWithContext(context.Context) NotificationRuleTargetOutput }
NotificationRuleTargetInput is an input type that accepts NotificationRuleTargetArgs and NotificationRuleTargetOutput values. You can construct a concrete instance of `NotificationRuleTargetInput` via:
NotificationRuleTargetArgs{...}
type NotificationRuleTargetOutput ¶
type NotificationRuleTargetOutput struct{ *pulumi.OutputState }
func (NotificationRuleTargetOutput) Address ¶
func (o NotificationRuleTargetOutput) Address() pulumi.StringOutput
The ARN of notification rule target. For example, a SNS Topic ARN.
func (NotificationRuleTargetOutput) ElementType ¶
func (NotificationRuleTargetOutput) ElementType() reflect.Type
func (NotificationRuleTargetOutput) Status ¶
func (o NotificationRuleTargetOutput) Status() pulumi.StringPtrOutput
The status of the notification rule. Possible values are `ENABLED` and `DISABLED`, default is `ENABLED`.
func (NotificationRuleTargetOutput) ToNotificationRuleTargetOutput ¶
func (o NotificationRuleTargetOutput) ToNotificationRuleTargetOutput() NotificationRuleTargetOutput
func (NotificationRuleTargetOutput) ToNotificationRuleTargetOutputWithContext ¶
func (o NotificationRuleTargetOutput) ToNotificationRuleTargetOutputWithContext(ctx context.Context) NotificationRuleTargetOutput
func (NotificationRuleTargetOutput) Type ¶
func (o NotificationRuleTargetOutput) Type() pulumi.StringPtrOutput
The type of the notification target. Default value is `SNS`.