NetworkFirewall / Client / delete_firewall_policy

delete_firewall_policy

NetworkFirewall.Client.delete_firewall_policy(**kwargs)

Deletes the specified FirewallPolicy.

See also: AWS API Documentation

Request Syntax

response = client.delete_firewall_policy(
    FirewallPolicyName='string',
    FirewallPolicyArn='string'
)
Parameters:
  • FirewallPolicyName (string) –

    The descriptive name of the firewall policy. You can’t change the name of a firewall policy after you create it.

    You must specify the ARN or the name, and you can specify both.

  • FirewallPolicyArn (string) –

    The Amazon Resource Name (ARN) of the firewall policy.

    You must specify the ARN or the name, and you can specify both.

Return type:

dict

Returns:

Response Syntax

{
    'FirewallPolicyResponse': {
        'FirewallPolicyName': 'string',
        'FirewallPolicyArn': 'string',
        'FirewallPolicyId': 'string',
        'Description': 'string',
        'FirewallPolicyStatus': 'ACTIVE'|'DELETING'|'ERROR'|'UPDATING',
        'StatusMessage': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'ConsumedStatelessRuleCapacity': 123,
        'ConsumedStatefulRuleCapacity': 123,
        'ConsumedStatefulDomainCapacity': 123,
        'NumberOfAssociations': 123,
        'EncryptionConfiguration': {
            'KeyId': 'string',
            'Type': 'CUSTOMER_KMS'|'AWS_OWNED_KMS_KEY'
        },
        'Errors': [
            {
                'Code': 'DNS_FIREWALL_RULE_GROUP_UNAVAILABLE'|'ROUTE53_RESOLVED_IP_VALIDATION_MISSING',
                'Message': 'string',
                'ResourceId': 'string'
            },
        ],
        'LastModifiedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • FirewallPolicyResponse (dict) –

      The object containing the definition of the FirewallPolicyResponse that you asked to delete.

      • FirewallPolicyName (string) –

        The descriptive name of the firewall policy. You can’t change the name of a firewall policy after you create it.

      • FirewallPolicyArn (string) –

        The Amazon Resource Name (ARN) of the firewall policy.

        Note

        If this response is for a create request that had DryRun set to TRUE, then this ARN is a placeholder that isn’t attached to a valid resource.

      • FirewallPolicyId (string) –

        The unique identifier for the firewall policy.

      • Description (string) –

        A description of the firewall policy.

      • FirewallPolicyStatus (string) –

        The current status of the firewall policy. You can retrieve this for a firewall policy by calling DescribeFirewallPolicy and providing the firewall policy’s name or ARN.

      • StatusMessage (string) –

        Additional detail about the firewall policy’s current status, when applicable. For example, while an Amazon Route 53 Resolver DNS Firewall rule group change is in progress, the status is UPDATING and this message is “A DNS Firewall rule group change is in progress.”

      • Tags (list) –

        The key:value pairs to associate with the resource.

        • (dict) –

          A key:value pair associated with an Amazon Web Services resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as “environment”) and the tag value represents a specific value within that category (such as “test,” “development,” or “production”). You can add up to 50 tags to each Amazon Web Services resource.

          • Key (string) –

            The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as “customer.” Tag keys are case-sensitive.

          • Value (string) –

            The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as “companyA” or “companyB.” Tag values are case-sensitive.

      • ConsumedStatelessRuleCapacity (integer) –

        The number of capacity units currently consumed by the policy’s stateless rules.

      • ConsumedStatefulRuleCapacity (integer) –

        The number of capacity units currently consumed by the policy’s stateful rules.

      • ConsumedStatefulDomainCapacity (integer) –

        The total number of domain name specifications across all domain list rule groups in the firewall policy that use the stateful-domain-rulegroup resource type.

      • NumberOfAssociations (integer) –

        The number of firewalls that are associated with this firewall policy.

      • EncryptionConfiguration (dict) –

        A complex type that contains the Amazon Web Services KMS encryption configuration settings for your firewall policy.

        • KeyId (string) –

          The ID of the Amazon Web Services Key Management Service (KMS) customer managed key. You can use any of the key identifiers that KMS supports, unless you’re using a key that’s managed by another account. If you’re using a key managed by another account, then specify the key ARN. For more information, see Key ID in the Amazon Web Services KMS Developer Guide.

        • Type (string) –

          The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources.

      • Errors (list) –

        Any configuration errors that apply to the firewall policy. Network Firewall detects these errors asynchronously, after you create or update the policy, so an error can appear after the request that caused it has already succeeded. Each entry describes the problem and how to resolve it, and Network Firewall clears it automatically after you resolve the problem.

        • (dict) –

          A configuration error that Network Firewall detected for a firewall policy.

          • Code (string) –

            The error code identifies the type of error. Valid values are the following:

            • DNS_FIREWALL_RULE_GROUP_UNAVAILABLE – The Amazon Route 53 Resolver DNS Firewall rule group that resolved IP validation references is unavailable, for example, because it was deleted or is no longer accessible from your account. Update the rule group ID or remove the resolved IP validation configuration.

            • ROUTE53_RESOLVED_IP_VALIDATION_MISSING – An associated stateful rule group uses the aws_route_53_resolved_domain keyword, but the policy doesn’t have resolved IP validation configured. The affected rules are inactive until you add resolved IP validation to the policy or remove the keyword rules.

          • Message (string) –

            A description of the error and how to resolve it.

          • ResourceId (string) –

            The ID of the resource that the error relates to, when applicable. For example, for DNS_FIREWALL_RULE_GROUP_UNAVAILABLE this is the Amazon Route 53 Resolver DNS Firewall rule group ID.

      • LastModifiedTime (datetime) –

        The last time that the firewall policy was changed.

Exceptions