

# CreateCurationPolicy

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.

## Request Parameters
<a name="API_CreateCurationPolicy_RequestParameters"></a>

 ** autoRejectAfterSeconds **   
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.  
Type: Long  
Valid Range: Minimum value of 1. Maximum value of 15552000.  
Required: No

 ** clientToken **   
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.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[\x21-\x7E]+`   
Required: No

 ** description **   
A description of the curation policy. Up to 1,024 characters, with no control characters.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.  
Pattern: `\P{Cc}*`   
Required: No

 ** name **   
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.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 63.  
Pattern: `[a-zA-Z][a-zA-Z0-9-]*`   
Required: Yes

 ** policyDocument **   
The policy's rules, as a Cedar policy document.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 5120.  
Required: Yes

 ** tags **   
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`.  
Type: String to string map  
Map Entries: Minimum number of 0 items. Maximum number of 200 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Value Length Constraints: Minimum length of 0. Maximum length of 256.  
Required: No

## Response Elements
<a name="API_CreateCurationPolicy_ResponseElements"></a>

The following elements are returned by the service.

 ** arn **   
The ARN of the curation policy.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 180.  
Pattern: `arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:curation-policy/[a-z0-9]+(-[a-z0-9]+)*` 

 ** autoRejectAfterSeconds **   
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.  
Type: Long  
Valid Range: Minimum value of 1. Maximum value of 15552000.

 ** createdAt **   
The date and time when the curation policy was created.  
Type: Timestamp

 ** description **   
The description of the curation policy.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 1024.  
Pattern: `\P{Cc}*` 

 ** id **   
The ID of the curation policy. Requests take it as `curationPolicyId`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-z0-9]+(-[a-z0-9]+)*` 

 ** lastPublishedVersion **   
Newest published version. Absent until the policy's first version is created (a DRAFT that has never been published has no version).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 6.  
Pattern: `[1-9][0-9]{0,5}` 

 ** name **   
The name of the curation policy.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 63.  
Pattern: `[a-zA-Z][a-zA-Z0-9-]*` 

 ** policyDocument **   
The policy's rules, as a Cedar policy document: the rule the engine evaluates. Always present on the resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 5120.

 ** revisionId **   
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.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[\x21-\x7E]+` 

 ** status **   
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.
Type: String  
Valid Values: `DRAFT | ACTIVE | DELETED` 

 ** updatedAt **   
When the resource last changed. Equal to `createdAt` until the first update.  
Type: Timestamp

## Errors
<a name="API_CreateCurationPolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.    
 ** message **   
A message that describes the error.
HTTP Status Code: 403

 ** ConflictException **   
The request conflicts with the current state of the resource. Check the resource's current state before you retry the request.    
 ** message **   
A message that describes the error.  
 ** resourceId **   
The ID of the resource that caused the conflict. When several resources caused it, a comma-separated list of their IDs.  
 ** resourceType **   
The type of the resource that caused the conflict.  
Valid values:  
+  `agent-context` - An agent context.
+  `connection` - A connection.
+  `curation-policy` - A curation policy.
+  `evaluation` - Reserved for future use.
+  `ontology` - An ontology.
+  `ontology-induction` - An ontology induction.
+  `resource-policy` - A resource-based policy.
HTTP Status Code: 409

 ** InternalServerException **   
The request failed because of an internal error. Retry the request.    
 ** message **   
A message that describes the error.
HTTP Status Code: 500

 ** ServiceQuotaExceededException **   
The request would exceed a service quota. Check the quota that `quotaCode` names, reduce your usage, and then retry the request.    
 ** message **   
A message that describes the error.  
 ** quotaCode **   
The code of the quota that the request would exceed.  
 ** resourceId **   
The ID of the resource that the quota applies to.  
 ** resourceType **   
The type of the resource that the quota applies to.  
Valid values:  
+  `agent-context` - An agent context.
+  `connection` - A connection.
+  `curation-policy` - A curation policy.
+  `evaluation` - Reserved for future use.
+  `ontology` - An ontology.
+  `ontology-induction` - An ontology induction.
+  `resource-policy` - A resource-based policy.  
 ** serviceCode **   
The code of the service that owns the quota.
HTTP Status Code: 402

 ** ThrottlingException **   
The request was denied because it exceeded a request rate quota. Wait, then retry the request.    
 ** message **   
A message that describes the error.  
 ** quotaCode **   
The code of the quota that throttled the request.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request, if AWS Context provides one.  
 ** serviceCode **   
The code of the service whose quota throttled the request.
HTTP Status Code: 429

 ** ValidationException **   
The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.    
 ** fieldList **   
The fields that failed validation, each with a message that describes why.  
 ** message **   
A message that describes the error.  
 ** reason **   
The reason that the input failed validation. Valid values:  
+  `unknownOperation` - The operation isn't recognized.
+  `cannotParse` - The request couldn't be parsed.
+  `fieldValidationFailed` - One or more fields failed validation. `fieldList` describes them.
+  `other` - Another reason. `message` describes it.
HTTP Status Code: 400

## See Also
<a name="API_CreateCurationPolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/context-2022-07-26/CreateCurationPolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/context-2022-07-26/CreateCurationPolicy) 