Skip to content

update_user_config async

update_user_config(
    user_id: UserId,
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    auto_accept_configs: Optional[AutoAcceptConfigs] = None,
    after_contact_work_configs: Optional[AfterContactWorkConfigs] = None,
    phone_number_configs: Optional[PhoneNumberConfigs] = None,
    persistent_connection_configs: Optional[PersistentConnectionConfigs] = None,
    voice_enhancement_configs: Optional[VoiceEnhancementConfigs] = None,
) -> None

Updates the configuration settings for the specified user, including per-channel auto-accept and after contact work (ACW) timeout settings.

This operation replaces the UpdateUserPhoneConfig API. While UpdateUserPhoneConfig applies the same ACW timeout to all channels, UpdateUserConfig allows you to set different auto-accept and ACW timeout values for each channel type.

Parameters:

  • auto_accept_configs (Optional[AutoAcceptConfigs], default: None ) –

    The list of auto-accept configuration settings for each channel. When auto-accept is enabled for a channel, available agents are automatically connected to contacts from that channel without needing to manually accept. Auto-accept connects agents to contacts in less than one second.

  • after_contact_work_configs (Optional[AfterContactWorkConfigs], default: None ) –

    The list of after contact work (ACW) timeout configuration settings for each channel. ACW timeout specifies how many seconds agents have for after contact work, such as entering notes about the contact. The minimum setting is 1 second, and the maximum is 2,000,000 seconds (24 days). Enter 0 for an indefinite amount of time, meaning agents must manually choose to end ACW.

  • phone_number_configs (Optional[PhoneNumberConfigs], default: None ) –

    The list of phone number configuration settings for each channel.

  • persistent_connection_configs (Optional[PersistentConnectionConfigs], default: None ) –

    The list of persistent connection configuration settings for each channel.

  • voice_enhancement_configs (Optional[VoiceEnhancementConfigs], default: None ) –

    The list of voice enhancement configuration settings for each channel.

  • user_id (UserId) –

    The identifier of the user account.

  • 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.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def update_user_config(
    self,
    user_id: "capo_connect.types.user_id.UserId",
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    auto_accept_configs: Optional[
        "capo_connect.types.auto_accept_configs.AutoAcceptConfigs"
    ] = None,
    after_contact_work_configs: Optional[
        "capo_connect.types.after_contact_work_configs.AfterContactWorkConfigs"
    ] = None,
    phone_number_configs: Optional[
        "capo_connect.types.phone_number_configs.PhoneNumberConfigs"
    ] = None,
    persistent_connection_configs: Optional[
        "capo_connect.types.persistent_connection_configs.PersistentConnectionConfigs"
    ] = None,
    voice_enhancement_configs: Optional[
        "capo_connect.types.voice_enhancement_configs.VoiceEnhancementConfigs"
    ] = None,
) -> None:
    """<p>Updates the configuration settings for the specified user, including per-channel auto-accept and after contact work (ACW) timeout settings.</p> <note> <p>This operation replaces the UpdateUserPhoneConfig API. While UpdateUserPhoneConfig applies the same ACW timeout to all channels, UpdateUserConfig allows you to set different auto-accept and ACW timeout values for each channel type.</p> </note>

    Args:
        auto_accept_configs: <p>The list of auto-accept configuration settings for each channel. When auto-accept is enabled for a channel, available agents are automatically connected to contacts from that channel without needing to manually accept. Auto-accept connects agents to contacts in less than one second.</p>
        after_contact_work_configs: <p>The list of after contact work (ACW) timeout configuration settings for each channel. ACW timeout specifies how many seconds agents have for after contact work, such as entering notes about the contact. The minimum setting is 1 second, and the maximum is 2,000,000 seconds (24 days). Enter 0 for an indefinite amount of time, meaning agents must manually choose to end ACW.</p>
        phone_number_configs: <p>The list of phone number configuration settings for each channel.</p>
        persistent_connection_configs: <p>The list of persistent connection configuration settings for each channel.</p>
        voice_enhancement_configs: <p>The list of voice enhancement configuration settings for each channel.</p>
        user_id: <p>The identifier of the user account.</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>

    Raises:
        capo_connect.errors.conditional_operation_failed_exception.ConditionalOperationFailedException: <p>Request processing failed because dependent condition failed.</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.update_user_config_request.UpdateUserConfigRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_connect._operations.amazon_connect_service.update_user_config

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.update_user_config.async_update_user_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_connect.types.update_user_config_request.UpdateUserConfigRequest",
    ) -> dict[str, Any]:
        import capo_connect.types.update_user_config_request

        return capo_connect.types.update_user_config_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateUserConfig", redact_input=_redact_input),
    )
    input_: capo_connect.types.update_user_config_request.UpdateUserConfigRequest = {
        "user_id": user_id,
        "instance_id": instance_id,
    }
    if auto_accept_configs is not None:
        input_["auto_accept_configs"] = auto_accept_configs
    if after_contact_work_configs is not None:
        input_["after_contact_work_configs"] = after_contact_work_configs
    if phone_number_configs is not None:
        input_["phone_number_configs"] = phone_number_configs
    if persistent_connection_configs is not None:
        input_["persistent_connection_configs"] = persistent_connection_configs
    if voice_enhancement_configs is not None:
        input_["voice_enhancement_configs"] = voice_enhancement_configs

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output