Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . events ]

delete-rule

Description

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.

Managed rules are rules created and managed by another AWS service on your behalf. These rules are created by those other AWS services to support functionality in those services. You can delete these rules using the Force option, but you should do so only if you're sure that the other service isn't still using that rule.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  delete-rule
--name <value>
[--event-bus-name <value>]
[--force | --no-force]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--name (string)

The name of the rule.

--event-bus-name (string)

The event bus associated with the rule. If you omit this, the default event bus is used.

--force | --no-force (boolean)

If this is a managed rule, created by an AWS 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.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To delete a CloudWatch Events rule

This example deletes the rule named EC2InstanceStateChanges:

aws events delete-rule --name "EC2InstanceStateChanges"

Output

None