Context / Client / list_curation_policies

list_curation_policies

Context.Client.list_curation_policies(**kwargs)

Lists the curation policies in your account, or the ones associated with an agent context. Each item is a summary without the policy document. GetCurationPolicy returns the document. If agentContextId doesn’t name an agent context in your account, the operation returns an empty page instead of an error.

See also: AWS API Documentation

Request Syntax

response = client.list_curation_policies(
    agentContextId='string',
    status='DRAFT'|'ACTIVE',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • agentContextId (string) – The agent context whose associated policies you want to list, by its ID or ARN. If you omit it, every policy in your account is listed.

  • status (string) –

    Return only policies with this status. If you omit it, policies in both statuses are returned.

    Valid values:

    • DRAFT - Policies that have never been published.

    • ACTIVE - Policies with a published version.

  • maxResults (integer) – Maximum number of results per page (upper bound, not a target). The service might return fewer. Defaults to 50. A value outside 1–100 fails with ValidationException.

  • nextToken (string) – Opaque pagination cursor from a prior response. Omit for the first page.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'lastPublishedVersion': 'string',
            'revisionId': 'string',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'autoRejectAfterSeconds': 123,
            'status': 'DRAFT'|'ACTIVE'|'DELETED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      The matching policies, as summaries: the agent context’s associated policies, or every policy in your account when agentContextId is omitted, in no particular order. The account-wide list is eventually consistent, so a policy created moments ago might be missing. Always present, and empty when there are none.

      • (dict) –

        A summary of a curation policy, as returned by ListCurationPolicies. It omits the full resource’s description and policyDocument. Get those with GetCurationPolicy.

        • id (string) –

          The ID of the curation policy. Requests take it as curationPolicyId.

        • arn (string) –

          The ARN of the curation policy.

        • name (string) –

          The name of the curation policy.

        • lastPublishedVersion (string) –

          Newest published version. Absent until the policy’s first version is created (a DRAFT that has never been published has no version).

        • revisionId (string) –

          An opaque revision token for the working copy. Pass it as revisionId on UpdateCurationPolicy. The update applies only if the token still matches the current working copy.

        • createdAt (datetime) –

          The date and time when the curation policy was created.

        • updatedAt (datetime) –

          When the resource last changed. Equal to createdAt until the first update.

        • autoRejectAfterSeconds (integer) –

          The number of seconds that a proposal held for review under this policy can wait for a decision before AWS Context rejects it with statusReasonCode REQUEST_EXPIRED. From 86,400 seconds (1 day) to 15,552,000 seconds (180 days). Absent if proposals held under this policy are never rejected automatically.

        • status (string) –

          The policy’s status.

          Valid values:

          • DRAFT - The policy has never been published, so no agent context enforces it.

          • ACTIVE - The policy has a published version, which the agent contexts associated with it enforce.

          • DELETED - The policy is deleted. Nothing enforces it, and only GetCurationPolicy still returns it.

    • nextToken (string) –

      Pagination cursor for the next page. Absent when no more results exist.

Exceptions