FMS / Client / list_policies
list_policies#
- FMS.Client.list_policies(**kwargs)#
Returns an array of
PolicySummary
objects.See also: AWS API Documentation
Request Syntax
response = client.list_policies( NextToken='string', MaxResults=123 )
- Parameters:
NextToken (string) – If you specify a value for
MaxResults
and you have morePolicySummary
objects than the number that you specify forMaxResults
, Firewall Manager returns aNextToken
value in the response that allows you to list another group ofPolicySummary
objects. For the second and subsequentListPolicies
requests, specify the value ofNextToken
from the previous response to get information about another batch ofPolicySummary
objects.MaxResults (integer) – Specifies the number of
PolicySummary
objects that you want Firewall Manager to return for this request. If you have morePolicySummary
objects than the number that you specify forMaxResults
, the response includes aNextToken
value that you can use to get another batch ofPolicySummary
objects.
- Return type:
dict
- Returns:
Response Syntax
{ 'PolicyList': [ { 'PolicyArn': 'string', 'PolicyId': 'string', 'PolicyName': 'string', 'ResourceType': 'string', 'SecurityServiceType': 'WAF'|'WAFV2'|'SHIELD_ADVANCED'|'SECURITY_GROUPS_COMMON'|'SECURITY_GROUPS_CONTENT_AUDIT'|'SECURITY_GROUPS_USAGE_AUDIT'|'NETWORK_FIREWALL'|'DNS_FIREWALL'|'THIRD_PARTY_FIREWALL'|'IMPORT_NETWORK_FIREWALL', 'RemediationEnabled': True|False, 'DeleteUnusedFMManagedResources': True|False }, ], 'NextToken': 'string' }
Response Structure
(dict) –
PolicyList (list) –
An array of
PolicySummary
objects.(dict) –
Details of the Firewall Manager policy.
PolicyArn (string) –
The Amazon Resource Name (ARN) of the specified policy.
PolicyId (string) –
The ID of the specified policy.
PolicyName (string) –
The name of the specified policy.
ResourceType (string) –
The type of resource protected by or in scope of the policy. This is in the format shown in the Amazon Web Services Resource Types Reference. For WAF and Shield Advanced, examples include
AWS::ElasticLoadBalancingV2::LoadBalancer
andAWS::CloudFront::Distribution
. For a security group common policy, valid values areAWS::EC2::NetworkInterface
andAWS::EC2::Instance
. For a security group content audit policy, valid values areAWS::EC2::SecurityGroup
,AWS::EC2::NetworkInterface
, andAWS::EC2::Instance
. For a security group usage audit policy, the value isAWS::EC2::SecurityGroup
. For an Network Firewall policy or DNS Firewall policy, the value isAWS::EC2::VPC
.SecurityServiceType (string) –
The service that the policy is using to protect the resources. This specifies the type of policy that is created, either an WAF policy, a Shield Advanced policy, or a security group policy.
RemediationEnabled (boolean) –
Indicates if the policy should be automatically applied to new resources.
DeleteUnusedFMManagedResources (boolean) –
Indicates whether Firewall Manager should automatically remove protections from resources that leave the policy scope and clean up resources that Firewall Manager is managing for accounts when those accounts leave policy scope. For example, Firewall Manager will disassociate a Firewall Manager managed web ACL from a protected customer resource when the customer resource leaves policy scope.
By default, Firewall Manager doesn’t remove protections or delete Firewall Manager managed resources.
This option is not available for Shield Advanced or WAF Classic policies.
NextToken (string) –
If you have more
PolicySummary
objects than the number that you specified forMaxResults
in the request, the response includes aNextToken
value. To list morePolicySummary
objects, submit anotherListPolicies
request, and specify theNextToken
value from the response in theNextToken
value in the next request.
Exceptions
FMS.Client.exceptions.ResourceNotFoundException
FMS.Client.exceptions.InvalidOperationException
FMS.Client.exceptions.LimitExceededException
FMS.Client.exceptions.InternalErrorException