libZSservicesZSamazonka-codestar-notificationsZSamazonka-codestar-notifications
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CodeStarNotifications.CreateNotificationRule

Description

Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as SNS topics) where you want to receive them.

Synopsis

Creating a Request

data CreateNotificationRule Source #

See: newCreateNotificationRule smart constructor.

Constructors

CreateNotificationRule' 

Fields

  • status :: Maybe NotificationRuleStatus

    The status of the notification rule. The default value is ENABLED. If the status is set to DISABLED, notifications aren't sent for the notification rule.

  • clientRequestToken :: Maybe Text

    A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.

    The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, an idempotency token is created for you.

  • tags :: Maybe (HashMap Text Text)

    A list of tags to apply to this notification rule. Key names cannot start with "aws".

  • name :: Sensitive Text

    The name for the notification rule. Notifictaion rule names must be unique in your AWS account.

  • eventTypeIds :: [Text]

    A list of event types associated with this notification rule. For a list of allowed events, see EventTypeSummary.

  • resource :: Text

    The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in AWS CodePipeline, repositories in AWS CodeCommit, and build projects in AWS CodeBuild.

  • targets :: [Target]

    A list of Amazon Resource Names (ARNs) of SNS topics to associate with the notification rule.

  • detailType :: DetailType

    The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS 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.

Instances

Instances details
Eq CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Show CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Generic CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Associated Types

type Rep CreateNotificationRule :: Type -> Type #

NFData CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Methods

rnf :: CreateNotificationRule -> () #

Hashable CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

ToJSON CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

AWSRequest CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Associated Types

type AWSResponse CreateNotificationRule #

ToHeaders CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

ToPath CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

ToQuery CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

type Rep CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

type Rep CreateNotificationRule = D1 ('MetaData "CreateNotificationRule" "Amazonka.CodeStarNotifications.CreateNotificationRule" "libZSservicesZSamazonka-codestar-notificationsZSamazonka-codestar-notifications" 'False) (C1 ('MetaCons "CreateNotificationRule'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NotificationRuleStatus)) :*: S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Text)))) :*: ((S1 ('MetaSel ('Just "eventTypeIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "resource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "targets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Target]) :*: S1 ('MetaSel ('Just "detailType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DetailType)))))
type AWSResponse CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

newCreateNotificationRule Source #

Create a value of CreateNotificationRule with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:status:CreateNotificationRule', createNotificationRule_status - The status of the notification rule. The default value is ENABLED. If the status is set to DISABLED, notifications aren't sent for the notification rule.

$sel:clientRequestToken:CreateNotificationRule', createNotificationRule_clientRequestToken - A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.

The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, an idempotency token is created for you.

$sel:tags:CreateNotificationRule', createNotificationRule_tags - A list of tags to apply to this notification rule. Key names cannot start with "aws".

$sel:name:CreateNotificationRule', createNotificationRule_name - The name for the notification rule. Notifictaion rule names must be unique in your AWS account.

$sel:eventTypeIds:CreateNotificationRule', createNotificationRule_eventTypeIds - A list of event types associated with this notification rule. For a list of allowed events, see EventTypeSummary.

$sel:resource:CreateNotificationRule', createNotificationRule_resource - The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in AWS CodePipeline, repositories in AWS CodeCommit, and build projects in AWS CodeBuild.

$sel:targets:CreateNotificationRule', createNotificationRule_targets - A list of Amazon Resource Names (ARNs) of SNS topics to associate with the notification rule.

$sel:detailType:CreateNotificationRule', createNotificationRule_detailType - The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS 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.

Request Lenses

createNotificationRule_status :: Lens' CreateNotificationRule (Maybe NotificationRuleStatus) Source #

The status of the notification rule. The default value is ENABLED. If the status is set to DISABLED, notifications aren't sent for the notification rule.

createNotificationRule_clientRequestToken :: Lens' CreateNotificationRule (Maybe Text) Source #

A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.

The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, an idempotency token is created for you.

createNotificationRule_tags :: Lens' CreateNotificationRule (Maybe (HashMap Text Text)) Source #

A list of tags to apply to this notification rule. Key names cannot start with "aws".

createNotificationRule_name :: Lens' CreateNotificationRule Text Source #

The name for the notification rule. Notifictaion rule names must be unique in your AWS account.

createNotificationRule_eventTypeIds :: Lens' CreateNotificationRule [Text] Source #

A list of event types associated with this notification rule. For a list of allowed events, see EventTypeSummary.

createNotificationRule_resource :: Lens' CreateNotificationRule Text Source #

The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in AWS CodePipeline, repositories in AWS CodeCommit, and build projects in AWS CodeBuild.

createNotificationRule_targets :: Lens' CreateNotificationRule [Target] Source #

A list of Amazon Resource Names (ARNs) of SNS topics to associate with the notification rule.

createNotificationRule_detailType :: Lens' CreateNotificationRule DetailType Source #

The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS 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.

Destructuring the Response

data CreateNotificationRuleResponse Source #

See: newCreateNotificationRuleResponse smart constructor.

Constructors

CreateNotificationRuleResponse' 

Fields

Instances

Instances details
Eq CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Read CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Show CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Generic CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Associated Types

type Rep CreateNotificationRuleResponse :: Type -> Type #

NFData CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

type Rep CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

type Rep CreateNotificationRuleResponse = D1 ('MetaData "CreateNotificationRuleResponse" "Amazonka.CodeStarNotifications.CreateNotificationRule" "libZSservicesZSamazonka-codestar-notificationsZSamazonka-codestar-notifications" 'False) (C1 ('MetaCons "CreateNotificationRuleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateNotificationRuleResponse Source #

Create a value of CreateNotificationRuleResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:arn:CreateNotificationRuleResponse', createNotificationRuleResponse_arn - The Amazon Resource Name (ARN) of the notification rule.

$sel:httpStatus:CreateNotificationRuleResponse', createNotificationRuleResponse_httpStatus - The response's http status code.

Response Lenses

createNotificationRuleResponse_arn :: Lens' CreateNotificationRuleResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the notification rule.