Context / Client / create_curation_policy

create_curation_policy

Context.Client.create_curation_policy(**kwargs)

Creates a curation policy, which decides which changes to an agent context are held for review as curation proposals instead of applied automatically. The policy starts as an unpublished draft. The agent contexts associated with it enforce it once CreateCurationPolicyVersion publishes it.

See also: AWS API Documentation

Request Syntax

response = client.create_curation_policy(
    clientToken='string',
    name='string',
    description='string',
    policyDocument='string',
    autoRejectAfterSeconds=123,
    tags={
        'string': 'string'
    }
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token and the same parameters returns the curation policy that the first request created. If you don’t specify one, the AWS SDKs generate one.

    This field is autopopulated if not provided.

  • name (string) –

    [REQUIRED]

    The name of the curation policy. 3 to 63 characters: it must start with a letter and can contain only ASCII letters, digits, and hyphens.

  • description (string) – A description of the curation policy. Up to 1,024 characters, with no control characters.

  • policyDocument (string) –

    [REQUIRED]

    The policy’s rules, as a Cedar policy document.

  • autoRejectAfterSeconds (integer) – The number of seconds that a curation proposal held for review under this policy can wait for a decision before it is rejected automatically. Valid range: 86,400 (1 day) to 15,552,000 (180 days). If you omit it, proposals held under this policy are never rejected automatically.

  • tags (dict) –

    Tags to add to the curation policy when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can’t start with aws:. To add tags, you also need context:TagResource permission on the new curation policy. If you specify more than 50 user tags, the request fails with ServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails with ValidationException.

    • (string) –

      A tag key. Leading and trailing whitespace is trimmed. Keys starting with aws: are reserved for AWS.

      • (string) –

        A tag value. Leading and trailing whitespace is trimmed.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • 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.

    • description (string) –

      The description of the curation policy.

    • policyDocument (string) –

      The policy’s rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.

    • 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.

Exceptions