Deletes the specified fields containing personally identifiable information (PII) from a contact in the specified Connect Customer instance. We redact PII (such as customer endpoints, additional email recipients, and the email subject) from the contact and its associated contact trace record (CTR). The contact must be in a terminated state.
This deletion is permanent and cannot be undone. Performing this operation permanently deletes the specified PII. There is no retention period; you cannot recover the data after deletion. We remove only the fields that Connect Customer identifies and stores as PII. Any PII that you place in fields outside the scope of this operation remains your responsibility to remove.
Parameters:
-
instance_id
(InstanceId)
–
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
contact_id
(ContactId)
–
The identifier of the contact. You can delete PII only from a contact that has been disconnected (is in a terminated state).
-
contact_fields
(ContactFields)
–
The categories of PII to redact from the contact. Specify one or more of the following values:
-
CUSTOMER_ENDPOINT – The customer's contact endpoint.
-
ADDITIONAL_EMAIL_RECIPIENTS – Additional recipients on an email contact (email channel only).
-
EMAIL_SUBJECT – The subject line of an email contact (email channel only).
Raises:
Source code in docs_src/capo_connect/_services/async_connect.py
| async def delete_contact_data(
self,
instance_id: "capo_connect.types.instance_id.InstanceId",
contact_id: "capo_connect.types.contact_id.ContactId",
contact_fields: "capo_connect.types.contact_fields.ContactFields",
*,
config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> "capo_connect.types.delete_contact_data_response.DeleteContactDataResponse":
"""<p>Deletes the specified fields containing personally identifiable information (PII) from a contact in the specified Connect Customer instance. We redact PII (such as customer endpoints, additional email recipients, and the email subject) from the contact and its associated contact trace record (CTR). The contact must be in a terminated state.</p> <important> <p> <b>This deletion is permanent and cannot be undone.</b> Performing this operation permanently deletes the specified PII. There is no retention period; you cannot recover the data after deletion. We remove only the fields that Connect Customer identifies and stores as PII. Any PII that you place in fields outside the scope of this operation remains your responsibility to remove.</p> </important>
Args:
instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
contact_id: <p>The identifier of the contact. You can delete PII only from a contact that has been disconnected (is in a terminated state).</p>
contact_fields: <p>The categories of PII to redact from the contact. Specify one or more of the following values:</p> <ul> <li> <p> <code>CUSTOMER_ENDPOINT</code> – The customer's contact endpoint.</p> </li> <li> <p> <code>ADDITIONAL_EMAIL_RECIPIENTS</code> – Additional recipients on an email contact (email channel only).</p> </li> <li> <p> <code>EMAIL_SUBJECT</code> – The subject line of an email contact (email channel only).</p> </li> </ul>
Raises:
capo_connect.errors.contact_not_terminated_exception.ContactNotTerminatedException: <p>The contact has not been disconnected and is not in a terminated state. To delete PII, disconnect the contact first. Wait for it to reach the terminated state, then retry the request.</p>
capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connect.types.delete_contact_data_request.DeleteContactDataRequest]",
) -> AsyncOperationResponse[
"capo_connect.types.delete_contact_data_response.DeleteContactDataResponse"
]:
import capo_connect._operations.amazon_connect_service.delete_contact_data
(
output,
http_response,
) = await capo_connect._operations.amazon_connect_service.delete_contact_data.async_delete_contact_data(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteContactData")
)
input_: capo_connect.types.delete_contact_data_request.DeleteContactDataRequest = {
"instance_id": instance_id,
"contact_id": contact_id,
"contact_fields": contact_fields,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|