

# CreateChangeSet

Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of `put`, `update`, or `delete`.

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

 ** accessControlConfig **   
Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty `accessControlList` lets nobody read them.  
Type: [AccessControlConfig](API_AccessControlConfig.md) object  
Required: No

 ** agentContextId **   
The agent context to change, by its ID or ARN.  
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}:agent-context/)?[a-z0-9]+(-[a-z0-9]+)*`   
Required: Yes

 ** clientToken **   
A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[\x21-\x7E]+`   
Required: No

 ** operations **   
The operations to write, each a `ChangeSetOperation`, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails with `ValidationException`.  
Type: Array of [ChangeSetOperation](API_ChangeSetOperation.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 1000 items.  
Required: Yes

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

The following elements are returned by the service.

 ** accessControl **   
See `AccessControl`. The service returns it on every response.  
Valid values:  
+  `ACL_RESTRICTED` - Only an allowed end user can read the content (its operations), and the change set can't be edited. Every caller can read its metadata, and its proposal's `title` names no nodes or edges.
+  `NO_ACL` - Every caller can read the content.
Type: String  
Valid Values: `ACL_RESTRICTED | NO_ACL` 

 ** id **   
The ID of the change set, which AWS Context assigns. The create is idempotent on `clientToken`: a retry with the same token returns the same change set. Treat this ID as opaque, and don't assume any relationship to `clientToken`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-z0-9]+(-[a-z0-9]+)*` 

 ** status **   
PENDING (held for curator review) or PUBLISHED (applied). A replay reports the change set's current one.  
Type: String  
Valid Values: `DRAFT | PENDING | AUTHORIZED | SUPPRESSED | PUBLISHED | FAILED` 

## Errors
<a name="API_CreateChangeSet_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

 ** ResourceNotFoundException **   
The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.    
 ** message **   
A message that describes the error.  
 ** resourceId **   
The ID of the resource that was not found.  
 ** resourceType **   
The type of the resource that wasn't found.  
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: 404

 ** 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_CreateChangeSet_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/CreateChangeSet) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/context-2022-07-26/CreateChangeSet) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/context-2022-07-26/CreateChangeSet) 