Skip to content

update_agent_status async

update_agent_status(
    instance_id: InstanceId,
    agent_status_id: AgentStatusId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    name: Optional[AgentStatusName] = None,
    description: Optional[UpdateAgentStatusDescription] = None,
    state: Optional[AgentStatusState] = None,
    display_order: Optional[AgentStatusOrderNumber] = None,
    reset_order_number: Optional[Boolean] = None,
) -> None

Updates agent status.

Parameters:

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def update_agent_status(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    agent_status_id: "capo_connect.types.agent_status_id.AgentStatusId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    name: Optional["capo_connect.types.agent_status_name.AgentStatusName"] = None,
    description: Optional[
        "capo_connect.types.update_agent_status_description.UpdateAgentStatusDescription"
    ] = None,
    state: Optional[
        "capo_connect.types.agent_status_state.AgentStatusState"
    ] = None,
    display_order: Optional[
        "capo_connect.types.agent_status_order_number.AgentStatusOrderNumber"
    ] = None,
    reset_order_number: Optional["capo_connect.types.boolean.Boolean"] = None,
) -> None:
    """<p>Updates agent status.</p>

    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>
        agent_status_id: <p>The identifier of the agent status.</p>
        name: <p>The name of the agent status.</p>
        description: <p>The description of the agent status.</p>
        state: <p>The state of the agent status.</p>
        display_order: <p>The display order of the agent status.</p>
        reset_order_number: <p>A number indicating the reset order of the agent status.</p>

    Raises:
        capo_connect.errors.duplicate_resource_exception.DuplicateResourceException: <p>A resource with the specified name already exists.</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.limit_exceeded_exception.LimitExceededException: <p>The allowed limit for the resource has been exceeded.</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_agent_status_request.UpdateAgentStatusRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_connect._operations.amazon_connect_service.update_agent_status

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAgentStatus")
    )
    input_: capo_connect.types.update_agent_status_request.UpdateAgentStatusRequest = {
        "instance_id": instance_id,
        "agent_status_id": agent_status_id,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if state is not None:
        input_["state"] = state
    if display_order is not None:
        input_["display_order"] = display_order
    if reset_order_number is not None:
        input_["reset_order_number"] = reset_order_number

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