amazonka-codestar-notifications-2.0: Amazon CodeStar Notifications SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 Chatbot topics or Chatbot clients configured for Slack) where you want to receive them.

Synopsis

Creating a Request

data CreateNotificationRule Source #

See: newCreateNotificationRule smart constructor.

Constructors

CreateNotificationRule' 

Fields

  • 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 Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.

  • 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.

  • 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. Notification rule names must be unique in your Amazon Web Services 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 CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.

  • targets :: [Target]

    A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Chatbot clients 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 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.

Instances

Instances details
ToJSON CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.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

AWSRequest CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Associated Types

type AWSResponse CreateNotificationRule #

Generic CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Associated Types

type Rep CreateNotificationRule :: Type -> Type #

Show CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

NFData CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Methods

rnf :: CreateNotificationRule -> () #

Eq CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Hashable CreateNotificationRule Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

type AWSResponse 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" "amazonka-codestar-notifications-2.0-1YU4g2Ny2gz2roMHW6JQnw" 'False) (C1 ('MetaCons "CreateNotificationRule'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NotificationRuleStatus))) :*: (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)))))

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: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 Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.

$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:tags:CreateNotificationRule', createNotificationRule_tags - A list of tags to apply to this notification rule. Key names cannot start with "aws".

CreateNotificationRule, createNotificationRule_name - The name for the notification rule. Notification rule names must be unique in your Amazon Web Services 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 CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.

$sel:targets:CreateNotificationRule', createNotificationRule_targets - A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Chatbot clients 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 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.

Request Lenses

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 Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.

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_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. Notification rule names must be unique in your Amazon Web Services 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 CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.

createNotificationRule_targets :: Lens' CreateNotificationRule [Target] Source #

A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Chatbot clients 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 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.

Destructuring the Response

data CreateNotificationRuleResponse Source #

See: newCreateNotificationRuleResponse smart constructor.

Constructors

CreateNotificationRuleResponse' 

Fields

Instances

Instances details
Generic CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Associated Types

type Rep CreateNotificationRuleResponse :: Type -> Type #

Read CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Show CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

NFData CreateNotificationRuleResponse Source # 
Instance details

Defined in Amazonka.CodeStarNotifications.CreateNotificationRule

Eq 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" "amazonka-codestar-notifications-2.0-1YU4g2Ny2gz2roMHW6JQnw" '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:

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.