Organizations / Paginator / ListPolicies

ListPolicies

class Organizations.Paginator.ListPolicies
paginator = client.get_paginator('list_policies')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Organizations.Client.list_policies().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filter='SERVICE_CONTROL_POLICY'|'RESOURCE_CONTROL_POLICY'|'TAG_POLICY'|'BACKUP_POLICY'|'AISERVICES_OPT_OUT_POLICY'|'CHATBOT_POLICY'|'DECLARATIVE_POLICY_EC2'|'SECURITYHUB_POLICY'|'INSPECTOR_POLICY'|'UPGRADE_ROLLOUT_POLICY'|'BEDROCK_POLICY'|'S3_POLICY',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
Return type:

dict

Returns:

Response Syntax

{
    'Policies': [
        {
            'Id': 'string',
            'Arn': 'string',
            'Name': 'string',
            'Description': 'string',
            'Type': 'SERVICE_CONTROL_POLICY'|'RESOURCE_CONTROL_POLICY'|'TAG_POLICY'|'BACKUP_POLICY'|'AISERVICES_OPT_OUT_POLICY'|'CHATBOT_POLICY'|'DECLARATIVE_POLICY_EC2'|'SECURITYHUB_POLICY'|'INSPECTOR_POLICY'|'UPGRADE_ROLLOUT_POLICY'|'BEDROCK_POLICY'|'S3_POLICY',
            'AwsManaged': True|False
        },
    ],

}

Response Structure

  • (dict) –

    • Policies (list) –

      A list of policies that match the filter criteria in the request. The output list doesn’t include the policy contents. To see the content for a policy, see DescribePolicy.

      • (dict) –

        Contains information about a policy, but does not include the content. To see the content of a policy, see DescribePolicy.

        • Id (string) –

          The unique identifier (ID) of the policy.

          The regex pattern for a policy ID string requires “p-” followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).

        • Arn (string) –

          The Amazon Resource Name (ARN) of the policy.

          For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the Amazon Web Services Service Authorization Reference.

        • Name (string) –

          The friendly name of the policy.

          The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

        • Description (string) –

          The description of the policy.

        • Type (string) –

          The type of policy.

        • AwsManaged (boolean) –

          A boolean value that indicates whether the specified policy is an Amazon Web Services managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.