Associates a flow with a phone number claimed to your Connect Customer instance.
If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a ResourceNotFoundException.
Parameters:
-
phone_number_id
(PhoneNumberId)
–
A unique identifier for the phone number.
-
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_flow_id
(ContactFlowId)
–
The identifier of the flow.
Raises:
Source code in docs_src/capo_connect/_services/connect.py
| def associate_phone_number_contact_flow(
self,
phone_number_id: "capo_connect.types.phone_number_id.PhoneNumberId",
instance_id: "capo_connect.types.instance_id.InstanceId",
contact_flow_id: "capo_connect.types.contact_flow_id.ContactFlowId",
*,
config_overrides: Optional[ConnectClientConfig] = None,
) -> None:
"""<p>Associates a flow with a phone number claimed to your Connect Customer instance.</p> <important> <p>If the number is claimed to a traffic distribution group, and you are calling this API using an instance in the Amazon Web Services Region where the traffic distribution group was created, you can use either a full phone number ARN or UUID value for the <code>PhoneNumberId</code> URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API using an instance in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a <code>ResourceNotFoundException</code>.</p> </important>
Args:
phone_number_id: <p>A unique identifier for the phone number.</p>
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_flow_id: <p>The identifier of the flow.</p>
Raises:
capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</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.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.
"""
def _handler(
req: "OperationRequest[capo_connect.types.associate_phone_number_contact_flow_request.AssociatePhoneNumberContactFlowRequest]",
) -> OperationResponse[None]:
import capo_connect._operations.amazon_connect_service.associate_phone_number_contact_flow
output, http_response = (
capo_connect._operations.amazon_connect_service.associate_phone_number_contact_flow.associate_phone_number_contact_flow(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociatePhoneNumberContactFlow")
)
input_: capo_connect.types.associate_phone_number_contact_flow_request.AssociatePhoneNumberContactFlowRequest = {
"phone_number_id": phone_number_id,
"instance_id": instance_id,
"contact_flow_id": contact_flow_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|