Skip to content

monitor_contact

monitor_contact(
    instance_id: InstanceId,
    contact_id: ContactId,
    user_id: AgentResourceId,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    allowed_monitor_capabilities: Optional[AllowedMonitorCapabilities] = None,
    client_token: Optional[ClientToken] = None,
) -> MonitorContactResponse

Initiates silent monitoring of a contact. The Contact Control Panel (CCP) of the user specified by userId will be set to silent monitoring mode on the contact.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance.

  • contact_id (ContactId) –

    The identifier of the contact.

  • user_id (AgentResourceId) –

    The identifier of the user account.

  • allowed_monitor_capabilities (Optional[AllowedMonitorCapabilities], default: None ) –

    Specify which monitoring actions the user is allowed to take. For example, whether the user is allowed to escalate from silent monitoring to barge. AllowedMonitorCapabilities is required if barge is enabled.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def monitor_contact(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    contact_id: "capo_connect.types.contact_id.ContactId",
    user_id: "capo_connect.types.agent_resource_id.AgentResourceId",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    allowed_monitor_capabilities: Optional[
        "capo_connect.types.allowed_monitor_capabilities.AllowedMonitorCapabilities"
    ] = None,
    client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
) -> "capo_connect.types.monitor_contact_response.MonitorContactResponse":
    """<p>Initiates silent monitoring of a contact. The Contact Control Panel (CCP) of the user specified by <i>userId</i> will be set to silent monitoring mode on the contact.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance.</p>
        contact_id: <p>The identifier of the contact.</p>
        user_id: <p>The identifier of the user account.</p>
        allowed_monitor_capabilities: <p>Specify which monitoring actions the user is allowed to take. For example, whether the user is allowed to escalate from silent monitoring to barge. AllowedMonitorCapabilities is required if barge is enabled.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.idempotency_exception.IdempotencyException: <p>An entity with the same 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_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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded.</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.monitor_contact_request.MonitorContactRequest]",
    ) -> OperationResponse[
        "capo_connect.types.monitor_contact_response.MonitorContactResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.monitor_contact

        output, http_response = (
            capo_connect._operations.amazon_connect_service.monitor_contact.monitor_contact(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("MonitorContact")
    )
    input_: capo_connect.types.monitor_contact_request.MonitorContactRequest = {
        "instance_id": instance_id,
        "contact_id": contact_id,
        "user_id": user_id,
    }
    if allowed_monitor_capabilities is not None:
        input_["allowed_monitor_capabilities"] = allowed_monitor_capabilities
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output