Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data CreateNotificationRule = CreateNotificationRule' {
- status :: Maybe NotificationRuleStatus
- clientRequestToken :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- name :: Sensitive Text
- eventTypeIds :: [Text]
- resource :: Text
- targets :: [Target]
- detailType :: DetailType
- newCreateNotificationRule :: Text -> Text -> DetailType -> CreateNotificationRule
- createNotificationRule_status :: Lens' CreateNotificationRule (Maybe NotificationRuleStatus)
- createNotificationRule_clientRequestToken :: Lens' CreateNotificationRule (Maybe Text)
- 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: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.
CreateNotificationRuleResponse' | |
|
Instances
Eq CreateNotificationRuleResponse Source # | |
Read CreateNotificationRuleResponse Source # | |
Show CreateNotificationRuleResponse Source # | |
Generic CreateNotificationRuleResponse Source # | |
NFData CreateNotificationRuleResponse Source # | |
Defined in Amazonka.CodeStarNotifications.CreateNotificationRule rnf :: CreateNotificationRuleResponse -> () # | |
type Rep CreateNotificationRuleResponse Source # | |
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.
createNotificationRuleResponse_httpStatus :: Lens' CreateNotificationRuleResponse Int Source #
The response's http status code.