Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateNotificationRule = CreateNotificationRule' {
- clientRequestToken :: Maybe Text
- status :: Maybe NotificationRuleStatus
- tags :: Maybe (HashMap Text Text)
- name :: Sensitive Text
- eventTypeIds :: [Text]
- resource :: Text
- targets :: [Target]
- detailType :: DetailType
- newCreateNotificationRule :: Text -> Text -> DetailType -> CreateNotificationRule
- createNotificationRule_clientRequestToken :: Lens' CreateNotificationRule (Maybe Text)
- createNotificationRule_status :: Lens' CreateNotificationRule (Maybe NotificationRuleStatus)
- createNotificationRule_tags :: Lens' CreateNotificationRule (Maybe (HashMap Text Text))
- createNotificationRule_name :: Lens' CreateNotificationRule Text
- createNotificationRule_eventTypeIds :: Lens' CreateNotificationRule [Text]
- createNotificationRule_resource :: Lens' CreateNotificationRule Text
- createNotificationRule_targets :: Lens' CreateNotificationRule [Target]
- createNotificationRule_detailType :: Lens' CreateNotificationRule DetailType
- data CreateNotificationRuleResponse = CreateNotificationRuleResponse' {
- arn :: Maybe Text
- httpStatus :: Int
- newCreateNotificationRuleResponse :: Int -> CreateNotificationRuleResponse
- createNotificationRuleResponse_arn :: Lens' CreateNotificationRuleResponse (Maybe Text)
- createNotificationRuleResponse_httpStatus :: Lens' CreateNotificationRuleResponse Int
Creating a Request
data CreateNotificationRule Source #
See: newCreateNotificationRule
smart constructor.
CreateNotificationRule' | |
|
Instances
newCreateNotificationRule Source #
:: Text | |
-> Text | |
-> DetailType | |
-> CreateNotificationRule |
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.
CreateNotificationRuleResponse' | |
|
Instances
Generic CreateNotificationRuleResponse Source # | |
Read CreateNotificationRuleResponse Source # | |
Show CreateNotificationRuleResponse Source # | |
NFData CreateNotificationRuleResponse Source # | |
Defined in Amazonka.CodeStarNotifications.CreateNotificationRule rnf :: CreateNotificationRuleResponse -> () # | |
Eq CreateNotificationRuleResponse Source # | |
type Rep CreateNotificationRuleResponse Source # | |
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.
createNotificationRuleResponse_httpStatus :: Lens' CreateNotificationRuleResponse Int Source #
The response's http status code.