list_project_policies

Rekognition.Client.list_project_policies(**kwargs)

Gets a list of the project policies attached to a project.

To attach a project policy to a project, call PutProjectPolicy. To remove a project policy from a project, call DeleteProjectPolicy.

See also: AWS API Documentation

Request Syntax

response = client.list_project_policies(
    ProjectArn='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • ProjectArn (string) --

    [REQUIRED]

    The ARN of the project for which you want to list the project policies.

  • NextToken (string) -- If the previous response was incomplete (because there is more results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
  • MaxResults (integer) -- The maximum number of results to return per paginated call. The largest value you can specify is 5. If you specify a value greater than 5, a ValidationException error occurs. The default value is 5.
Return type

dict

Returns

Response Syntax

{
    'ProjectPolicies': [
        {
            'ProjectArn': 'string',
            'PolicyName': 'string',
            'PolicyRevisionId': 'string',
            'PolicyDocument': 'string',
            'CreationTimestamp': datetime(2015, 1, 1),
            'LastUpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ProjectPolicies (list) --

      A list of project policies attached to the project.

      • (dict) --

        Describes a project policy in the response from ListProjectPolicies.

        • ProjectArn (string) --

          The Amazon Resource Name (ARN) of the project to which the project policy is attached.

        • PolicyName (string) --

          The name of the project policy.

        • PolicyRevisionId (string) --

          The revision ID of the project policy.

        • PolicyDocument (string) --

          The JSON document for the project policy.

        • CreationTimestamp (datetime) --

          The Unix datetime for the creation of the project policy.

        • LastUpdatedTimestamp (datetime) --

          The Unix datetime for when the project policy was last updated.

    • NextToken (string) --

      If the response is truncated, Amazon Rekognition returns this token that you can use in the subsequent request to retrieve the next set of project policies.

Exceptions

  • Rekognition.Client.exceptions.AccessDeniedException
  • Rekognition.Client.exceptions.InternalServerError
  • Rekognition.Client.exceptions.InvalidParameterException
  • Rekognition.Client.exceptions.ResourceNotFoundException
  • Rekognition.Client.exceptions.ThrottlingException
  • Rekognition.Client.exceptions.ProvisionedThroughputExceededException
  • Rekognition.Client.exceptions.InvalidPaginationTokenException