batch_update_case
async
¶
batch_update_case(
domain_id: DomainId,
cases: BatchUpdateCaseIdentifierList,
fields: FieldValueInputList,
*,
config_overrides: Optional[AsyncConnectCasesClientConfig] = None,
performed_by: Optional[UserUnion] = None,
title: Optional[CaseTitle] = None,
status: Optional[CaseStatus] = None,
customer_id: Optional[CustomerProfileArn] = None,
client_token: Optional[str] = None,
) -> BatchUpdateCaseResponse
Updates fields on multiple cases in a single request. All cases must belong to the same domain. Set the title, status, and customer ID through the top-level title, status, and customerId parameters, and set other fields through the fields array.
Each case is processed independently. If some cases fail, the remaining cases are still updated. To determine whether individual cases failed, inspect the failedCases array in the response.
The entire request fails, and no cases are updated, in the following cases:
-
The specified domain doesn't exist.
-
A reference ID doesn't match any case in the domain.
-
The request contains duplicate case IDs.
-
The request doesn't specify any update. Provide at least one entry in
fields, or atitle,status, orcustomerId. -
A field identifier in
fieldsdoesn't resolve to a field in the domain, for example, an unknown field name. -
A field name contains a pipe (
|) or comma (,) character. -
fieldsincludestitle,status, orcustomerId.
This operation uses the same IAM action as UpdateCase (cases:UpdateCase). 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 for performedBy.userArn, you must also have DescribeUser permission on the ARN of the user that you provide.
Endpoints: See Connect Customer endpoints and quotas.
Parameters:
-
domain_id(DomainId) –The unique identifier of the Cases domain.
-
cases(BatchUpdateCaseIdentifierList) –The list of cases to update. All cases must belong to the same domain.
-
fields(FieldValueInputList) –An array of objects, each with a
fieldIdentifierand avalue. You can identify each field by its ID or by its name; identifying a field by name is supported only inBatchUpdateCase. The same field values are applied to every case in the request. This field must be present, but can be an empty list when you provide the top-leveltitle,status, orcustomerIdparameters. Do not includetitle,status, orcustomerIdin this list; set those values only through their top-level parameters. Duplicating them infieldsresults in a validation error. -
performed_by(Optional[UserUnion], default:None) –The entity that performed the action.
-
title(Optional[CaseTitle], default:None) –The title to apply to all cases in the request.
-
status(Optional[CaseStatus], default:None) –The status to apply to all cases in the request.
-
customer_id(Optional[CustomerProfileArn], default:None) –The ARN of the customer profile to associate with all cases in the request.
-
client_token(Optional[str], default:None) –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.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details.
-
InternalServerException–We couldn't process your request because of an issue with the server. Try again later.
-
ResourceNotFoundException–We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.
-
ThrottlingException–The rate has been exceeded for this API. Please try again after a few minutes.
-
ValidationException–The request isn't valid. Check the syntax and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connectcases/_services/async_connect_cases.py
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 | |