Did you find this page useful? Do you have a suggestion to improve the documentation? Give us feedback.
If you would like to suggest an improvement or fix for the AWS CLI, check out our contributing guide on GitHub.
First time using the AWS CLI? See the User Guide for help getting started.
[ aws . connectcases ]
Creates a comment and associates it with multiple cases in a single request. All cases must belong to the same domain. This operation supports only the Comment related item type.
Each case is processed independently. If some cases fail, the remaining cases still receive the related item. To determine whether individual items failed, inspect the failedItems array in the response.
The entire request fails, and no related items are created, in the following cases:
cases:CreateRelatedItem ). You can use the cases:IsBatchAction condition key in IAM policies to allow or deny batch operations independently from single-case operations.If you provide a value forperformedBy.userArn, you must also have DescribeUser permission on the ARN of the user that you provide.
Endpoints : See Connect Customer endpoints and quotas .
See also: AWS API Documentation
batch-create-related-item
--domain-id <value>
--content <value>
--cases <value>
[--performed-by <value>]
[--client-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
--domain-id (string) [required]
The unique identifier of the Cases domain.
Constraints:
- min:
1- max:
500
--content (tagged union structure) [required]
The content of the related item to be created. The same content is applied to every case in the request. Only comment content is supported for batch creation.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:contact,comment,file,sla,connectCase,custom.contact -> (structure)
Object representing a contact in Connect Customer as an API request field.
contactArn -> (string) [required]
A unique identifier of a contact in Connect Customer.
Constraints:
- min:
1- max:
500comment -> (structure)
Represents the content of a comment to be returned to agents.
body -> (string) [required]
Text in the body of a
Commenton a case.Constraints:
- min:
1- max:
15000contentType -> (string) [required]
Type of the text in the box of a
Commenton a case.Possible values:
Text/Plainfile -> (structure)
A file of related items.
fileArn -> (string) [required]
The Amazon Resource Name (ARN) of a File in Connect Customer.
Constraints:
- min:
1- max:
500sla -> (tagged union structure)
Represents the content of an SLA to be created.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:slaInputConfiguration.slaInputConfiguration -> (structure)
Represents an input SLA configuration.
name -> (string) [required]
Name of an SLA.
Constraints:
- min:
1- max:
500- pattern:
.*[\S]type -> (string) [required]
Type of SLA.
Possible values:
CaseFieldfieldId -> (string)
Unique identifier of a field.
Constraints:
- min:
1- max:
500targetFieldValues -> (list)
Represents a list of target field values for the fieldId specified in SlaInputConfiguration. The SLA is considered met if any one of these target field values matches the actual field value.
Constraints:
- min:
1- max:
1(tagged union structure)
Object to store union of Field values.
Note
TheSummarysystem field accepts up to 3000 characters, while all other fields accept up to 4100 characters. If you use multi-byte characters, the effective character limit may be lower.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:stringValue,doubleValue,booleanValue,emptyValue,userArnValue.stringValue -> (string)
String value type.
Constraints:
- min:
0- max:
4100doubleValue -> (double)
Can be either null, or have a Double number value type. Only one value can be provided.booleanValue -> (boolean)
Can be either null, or have a Boolean value type. Only one value can be provided.emptyValue -> (structure)
An empty value.userArnValue -> (string)
Represents the user that performed the audit.targetSlaMinutes -> (long) [required]
Target duration in minutes within which an SLA should be completed.
Constraints:
- min:
1- max:
1051200connectCase -> (structure)
Represents the Connect Customer case to be created as a related item.
caseId -> (string) [required]
A unique identifier of the case.
Constraints:
- min:
1- max:
500- pattern:
[A-Za-z0-9\-._/:#=+-]*custom -> (structure)
Represents the content of a
Customtype related item.fields -> (list) [required]
List of field values for the
Customrelated item.Constraints:
- min:
1- max:
50(structure)
Object for case field values.
id -> (string) [required]
Unique identifier of a field.
Constraints:
- min:
1- max:
500value -> (tagged union structure) [required]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:stringValue,doubleValue,booleanValue,emptyValue,userArnValue.stringValue -> (string)
String value type.
Constraints:
- min:
0- max:
4100doubleValue -> (double)
Can be either null, or have a Double number value type. Only one value can be provided.booleanValue -> (boolean)
Can be either null, or have a Boolean value type. Only one value can be provided.emptyValue -> (structure)
An empty value.userArnValue -> (string)
Represents the user that performed the audit.
JSON Syntax:
{
"contact": {
"contactArn": "string"
},
"comment": {
"body": "string",
"contentType": "Text/Plain"
},
"file": {
"fileArn": "string"
},
"sla": {
"slaInputConfiguration": {
"name": "string",
"type": "CaseField",
"fieldId": "string",
"targetFieldValues": [
{
"stringValue": "string",
"doubleValue": double,
"booleanValue": true|false,
"emptyValue": {
},
"userArnValue": "string"
}
...
],
"targetSlaMinutes": long
}
},
"connectCase": {
"caseId": "string"
},
"custom": {
"fields": [
{
"id": "string",
"value": {
"stringValue": "string",
"doubleValue": double,
"booleanValue": true|false,
"emptyValue": {
},
"userArnValue": "string"
}
}
...
]
}
}
--cases (list) [required]
The list of cases to associate the related item with. All cases must belong to the same domain.
Constraints:
- min:
1- max:
100(structure)
Identifies a case to associate the related item with in a
BatchCreateRelatedItemrequest.caseIdentifier -> (tagged union structure) [required]
The identifier of the case to associate the related item with. Specify either the case ID or the reference ID.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:caseId,referenceId.caseId -> (string)
The unique identifier of the case.
Constraints:
- min:
1- max:
500- pattern:
[A-Za-z0-9\-._/:#=+-]*referenceId -> (string)
The reference ID of the case. Reference IDs are unique within a domain, and uniqueness isn’t case sensitive.
Constraints:
- min:
1- max:
50- pattern:
[A-Za-z0-9\-._/:#=+-]*
Shorthand Syntax:
caseIdentifier={caseId=string,referenceId=string} ...
JSON Syntax:
[
{
"caseIdentifier": {
"caseId": "string",
"referenceId": "string"
}
}
...
]
--performed-by (tagged union structure)
The entity that created the related item.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:userArn,customEntity.userArn -> (string)
Represents the Connect Customer ARN of the user.
Constraints:
- min:
1- max:
500customEntity -> (string)
Any provided entity.
Constraints:
- min:
1- max:
500- pattern:
[a-zA-Z0-9_\-\.@:/ ]*[a-zA-Z0-9_\-\.@:/]
Shorthand Syntax:
userArn=string,customEntity=string
JSON Syntax:
{
"userArn": "string",
"customEntity": "string"
}
--client-token (string)
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .
If you retry a request with the same client token, the service returns the original response instead of processing the request again. If you reuse a client token with different request parameters, the request fails with a
ConflictException.Constraints:
- min:
0- max:
64
--cli-input-json | --cli-input-yaml (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.
--generate-cli-skeleton (string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
--cli-error-format (string)
The formatting style for error output. By default, errors are displayed in enhanced format.
--help (boolean)
Display help for the command/subcommand.
successfulItems -> (list)
The list of related items that were successfully created and associated with their cases.
(structure)
Information about a related item that was created.
caseIdentifier -> (structure) [required]
The identifiers of the case that the related item is associated with.
caseId -> (string)
The unique identifier of the case.
Constraints:
- min:
1- max:
500- pattern:
[A-Za-z0-9\-._/:#=+-]*referenceNumber -> (string)
The reference number of the case. Reference numbers aren’t guaranteed to be unique.
BatchUpdateCaseandBatchCreateRelatedItemdon’t return this value.Constraints:
- min:
1- max:
50- pattern:
[A-Za-z0-9\-._/:#=+-]*referenceId -> (string)
The reference ID of the case. Cases created before reference IDs were available don’t have one.
Constraints:
- min:
1- max:
50- pattern:
[A-Za-z0-9\-._/:#=+-]*relatedItemId -> (string) [required]
The unique identifier of the related item.
Constraints:
- min:
1- max:
500relatedItemArn -> (string) [required]
The Amazon Resource Name (ARN) of the related item.
Constraints:
- min:
1- max:
500
failedItems -> (list)
The list of related items that were not created. Each entry includes an error code and message. Possible error codes include:
CASE_NOT_FOUND- No case exists with the specified case ID.VALIDATION_ERROR- The request contains invalid input.CONFLICT- Another operation is in progress on the case, such as a concurrent update or a merge of the case into another case.THROTTLED- The request rate exceeded the allowed limit.ACCESS_DENIED- The caller lacks permission to perform the operation.SERVICE_QUOTA_EXCEEDED- The request exceeded a service quota.DOMAIN_NOT_FOUND- The case domain was deleted while the request was being processed.INTERNAL_ERROR- An unexpected error occurred on the server.(structure)
Information about a related item that wasn’t created.
caseIdentifier -> (structure) [required]
The identifiers of the case that the related item wasn’t created for.
caseId -> (string)
The unique identifier of the case.
Constraints:
- min:
1- max:
500- pattern:
[A-Za-z0-9\-._/:#=+-]*referenceNumber -> (string)
The reference number of the case. Reference numbers aren’t guaranteed to be unique.
BatchUpdateCaseandBatchCreateRelatedItemdon’t return this value.Constraints:
- min:
1- max:
50- pattern:
[A-Za-z0-9\-._/:#=+-]*referenceId -> (string)
The reference ID of the case. Cases created before reference IDs were available don’t have one.
Constraints:
- min:
1- max:
50- pattern:
[A-Za-z0-9\-._/:#=+-]*errorCode -> (string) [required]
The error code. For possible values, seefailedItems.errorMessage -> (string) [required]
A message that describes the error.