Skip to content

batch_delete_device_position_history

batch_delete_device_position_history(
    tracker_name: ResourceName,
    device_ids: DeviceIdsList,
    *,
    config_overrides: Optional[LocationClientConfig] = None,
) -> BatchDeleteDevicePositionHistoryResponse

Deletes the position history of one or more devices from a tracker resource.

Parameters:

  • tracker_name (ResourceName) –

    The name of the tracker resource to delete the device position history from.

  • device_ids (DeviceIdsList) –

    Devices whose position history you want to delete.

    • For example, for two devices: “DeviceIds” : [DeviceId1,DeviceId2]

Raises:

  • AccessDeniedException –

    The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

  • InternalServerException –

    The request has failed to process because of an unknown server error, exception, or failure.

  • ResourceNotFoundException –

    The resource that you've entered was not found in your AWS account.

  • ThrottlingException –

    The request was denied because of request throttling.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_location/_services/location.py
def batch_delete_device_position_history(
    self,
    tracker_name: "capo_location.types.resource_name.ResourceName",
    device_ids: "capo_location.types.device_ids_list.DeviceIdsList",
    *,
    config_overrides: Optional[LocationClientConfig] = None,
) -> "capo_location.types.batch_delete_device_position_history_response.BatchDeleteDevicePositionHistoryResponse":
    """<p>Deletes the position history of one or more devices from a tracker resource.</p>

    Args:
        tracker_name: <p>The name of the tracker resource to delete the device position history from.</p>
        device_ids: <p>Devices whose position history you want to delete.</p> <ul> <li> <p>For example, for two devices: <code>“DeviceIds” : [DeviceId1,DeviceId2]</code> </p> </li> </ul>

    Raises:
        capo_location.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.</p>
        capo_location.errors.internal_server_exception.InternalServerException: <p>The request has failed to process because of an unknown server error, exception, or failure.</p>
        capo_location.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource that you've entered was not found in your AWS account.</p>
        capo_location.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling.</p>
        capo_location.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service. </p>
        capo_location.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_location.types.batch_delete_device_position_history_request.BatchDeleteDevicePositionHistoryRequest]",
    ) -> OperationResponse[
        "capo_location.types.batch_delete_device_position_history_response.BatchDeleteDevicePositionHistoryResponse"
    ]:
        import capo_location._operations.location_service.batch_delete_device_position_history

        output, http_response = (
            capo_location._operations.location_service.batch_delete_device_position_history.batch_delete_device_position_history(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteDevicePositionHistory")
    )
    input_: capo_location.types.batch_delete_device_position_history_request.BatchDeleteDevicePositionHistoryRequest = {
        "tracker_name": tracker_name,
        "device_ids": device_ids,
    }

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