Deletes a field from a cases template.
After a field is deleted:
-
You can still retrieve the field by calling BatchGetField.
-
You cannot update a deleted field by calling UpdateField; it throws a ValidationException.
-
Deleted fields are not included in the ListFields response.
-
Calling CreateCase with a deleted field throws a ValidationException denoting which field identifiers in the request have been deleted.
-
Calling GetCase with a deleted field identifier returns the deleted field's value if one exists.
-
Calling UpdateCase with a deleted field ID throws a ValidationException if the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (using emptyValue: {}) the field's value from the case.
-
GetTemplate does not return field IDs for deleted fields.
-
GetLayout does not return field IDs for deleted fields.
-
Calling SearchCases with the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria.
-
Calling SearchCases with a searchTerm value that matches a deleted field's value on a case returns the case in the response.
-
Calling BatchPutFieldOptions with a deleted field ID throw a ValidationException.
-
Calling GetCaseEventConfiguration does not return field IDs for deleted fields.
Parameters:
-
domain_id
(DomainId)
–
The unique identifier of the Cases domain.
-
field_id
(FieldId)
–
Unique identifier of the field.
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.
-
ServiceQuotaExceededException
–
-
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/connect_cases.py
| def delete_field(
self,
domain_id: "capo_connectcases.types.domain_id.DomainId",
field_id: "capo_connectcases.types.field_id.FieldId",
*,
config_overrides: Optional[ConnectCasesClientConfig] = None,
) -> "capo_connectcases.types.delete_field_response.DeleteFieldResponse":
"""<p>Deletes a field from a cases template.</p> <p>After a field is deleted:</p> <ul> <li> <p>You can still retrieve the field by calling <code>BatchGetField</code>.</p> </li> <li> <p>You cannot update a deleted field by calling <code>UpdateField</code>; it throws a <code>ValidationException</code>.</p> </li> <li> <p>Deleted fields are not included in the <code>ListFields</code> response.</p> </li> <li> <p>Calling <code>CreateCase</code> with a deleted field throws a <code>ValidationException</code> denoting which field identifiers in the request have been deleted.</p> </li> <li> <p>Calling <code>GetCase</code> with a deleted field identifier returns the deleted field's value if one exists.</p> </li> <li> <p>Calling <code>UpdateCase</code> with a deleted field ID throws a <code>ValidationException</code> if the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (using <code>emptyValue: {}</code>) the field's value from the case.</p> </li> <li> <p> <code>GetTemplate</code> does not return field IDs for deleted fields.</p> </li> <li> <p> <code>GetLayout</code> does not return field IDs for deleted fields.</p> </li> <li> <p>Calling <code>SearchCases</code> with the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria.</p> </li> <li> <p>Calling <code>SearchCases</code> with a <code>searchTerm</code> value that matches a deleted field's value on a case returns the case in the response.</p> </li> <li> <p>Calling <code>BatchPutFieldOptions</code> with a deleted field ID throw a <code>ValidationException</code>.</p> </li> <li> <p>Calling <code>GetCaseEventConfiguration</code> does not return field IDs for deleted fields.</p> </li> </ul>
Args:
domain_id: <p>The unique identifier of the Cases domain.</p>
field_id: <p>Unique identifier of the field.</p>
Raises:
capo_connectcases.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_connectcases.errors.conflict_exception.ConflictException: <p>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.</p>
capo_connectcases.errors.internal_server_exception.InternalServerException: <p>We couldn't process your request because of an issue with the server. Try again later.</p>
capo_connectcases.errors.resource_not_found_exception.ResourceNotFoundException: <p>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.</p>
capo_connectcases.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded. For a list of service quotas, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect Service Quotas</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
capo_connectcases.errors.throttling_exception.ThrottlingException: <p>The rate has been exceeded for this API. Please try again after a few minutes.</p>
capo_connectcases.errors.validation_exception.ValidationException: <p>The request isn't valid. Check the syntax and try again.</p>
capo_connectcases.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_connectcases.types.delete_field_request.DeleteFieldRequest]",
) -> OperationResponse[
"capo_connectcases.types.delete_field_response.DeleteFieldResponse"
]:
import capo_connectcases._operations.amazon_connect_cases.delete_field
output, http_response = (
capo_connectcases._operations.amazon_connect_cases.delete_field.delete_field(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteField")
)
input_: capo_connectcases.types.delete_field_request.DeleteFieldRequest = {
"domain_id": domain_id,
"field_id": field_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|