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 |
Deletes the specified rule.
Before you can delete the rule, you must remove all targets, using RemoveTargets.
When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time for changes to take effect.
If you call delete rule multiple times for the same rule, all calls will
succeed. When you call delete rule for a non-existent custom eventbus,
ResourceNotFoundException
is returned.
Managed rules are rules created and managed by another Amazon Web
Services service on your behalf. These rules are created by those other
Amazon Web Services services to support functionality in those services.
You can delete these rules using the Force
option, but you should do
so only if you are sure the other service is not still using that rule.
Synopsis
- data DeleteRule = DeleteRule' {}
- newDeleteRule :: Text -> DeleteRule
- deleteRule_force :: Lens' DeleteRule (Maybe Bool)
- deleteRule_eventBusName :: Lens' DeleteRule (Maybe Text)
- deleteRule_name :: Lens' DeleteRule Text
- data DeleteRuleResponse = DeleteRuleResponse' {
- newDeleteRuleResponse :: DeleteRuleResponse
Creating a Request
data DeleteRule Source #
See: newDeleteRule
smart constructor.
DeleteRule' | |
|
Instances
Create a value of DeleteRule
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:force:DeleteRule'
, deleteRule_force
- If this is a managed rule, created by an Amazon Web Services service on
your behalf, you must specify Force
as True
to delete the rule. This
parameter is ignored for rules that are not managed rules. You can check
whether a rule is a managed rule by using DescribeRule
or ListRules
and checking the ManagedBy
field of the response.
$sel:eventBusName:DeleteRule'
, deleteRule_eventBusName
- The name or ARN of the event bus associated with the rule. If you omit
this, the default event bus is used.
$sel:name:DeleteRule'
, deleteRule_name
- The name of the rule.
Request Lenses
deleteRule_force :: Lens' DeleteRule (Maybe Bool) Source #
If this is a managed rule, created by an Amazon Web Services service on
your behalf, you must specify Force
as True
to delete the rule. This
parameter is ignored for rules that are not managed rules. You can check
whether a rule is a managed rule by using DescribeRule
or ListRules
and checking the ManagedBy
field of the response.
deleteRule_eventBusName :: Lens' DeleteRule (Maybe Text) Source #
The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
deleteRule_name :: Lens' DeleteRule Text Source #
The name of the rule.
Destructuring the Response
data DeleteRuleResponse Source #
See: newDeleteRuleResponse
smart constructor.
Instances
Eq DeleteRuleResponse Source # | |
Defined in Amazonka.CloudWatchEvents.DeleteRule (==) :: DeleteRuleResponse -> DeleteRuleResponse -> Bool # (/=) :: DeleteRuleResponse -> DeleteRuleResponse -> Bool # | |
Read DeleteRuleResponse Source # | |
Show DeleteRuleResponse Source # | |
Defined in Amazonka.CloudWatchEvents.DeleteRule showsPrec :: Int -> DeleteRuleResponse -> ShowS # show :: DeleteRuleResponse -> String # showList :: [DeleteRuleResponse] -> ShowS # | |
Generic DeleteRuleResponse Source # | |
Defined in Amazonka.CloudWatchEvents.DeleteRule type Rep DeleteRuleResponse :: Type -> Type # from :: DeleteRuleResponse -> Rep DeleteRuleResponse x # to :: Rep DeleteRuleResponse x -> DeleteRuleResponse # | |
NFData DeleteRuleResponse Source # | |
Defined in Amazonka.CloudWatchEvents.DeleteRule rnf :: DeleteRuleResponse -> () # | |
type Rep DeleteRuleResponse Source # | |
Defined in Amazonka.CloudWatchEvents.DeleteRule |
newDeleteRuleResponse :: DeleteRuleResponse Source #
Create a value of DeleteRuleResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.