Table Of Contents

Feedback

User Guide

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

[ aws . fms ]

delete-policy

Description

Permanently deletes an AWS Firewall Manager policy.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  delete-policy
--policy-id <value>
[--delete-all-policy-resources | --no-delete-all-policy-resources]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--policy-id (string)

The ID of the policy that you want to delete. PolicyId is returned by PutPolicy and by ListPolicies .

--delete-all-policy-resources | --no-delete-all-policy-resources (boolean)

If True , the request performs cleanup according to the policy type.

For AWS WAF and Shield Advanced policies, the cleanup does the following:

  • Deletes rule groups created by AWS Firewall Manager
  • Removes web ACLs from in-scope resources
  • Deletes web ACLs that contain no rules or rule groups

For security group policies, the cleanup does the following for each security group in the policy:

  • Disassociates the security group from in-scope resources
  • Deletes the security group if it was created through Firewall Manager and if it's no longer associated with any resources through another policy

After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you associate with the policy. When creating the policy, if you specify that only resources in specific accounts or with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others are out of scope. If you don't specify tags or accounts, all resources are in scope.

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

Output

None