Skip to content

batch_delete_geofence

batch_delete_geofence(
    collection_name: ResourceName,
    geofence_ids: IdList,
    *,
    config_overrides: Optional[LocationClientConfig] = None,
) -> BatchDeleteGeofenceResponse

Deletes a batch of geofences from a geofence collection.

This operation deletes the resource permanently.

Parameters:

  • collection_name (ResourceName) –

    The geofence collection storing the geofences to be deleted.

  • geofence_ids (IdList) –

    The batch of geofences to be deleted.

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_geofence(
    self,
    collection_name: "capo_location.types.resource_name.ResourceName",
    geofence_ids: "capo_location.types.id_list.IdList",
    *,
    config_overrides: Optional[LocationClientConfig] = None,
) -> (
    "capo_location.types.batch_delete_geofence_response.BatchDeleteGeofenceResponse"
):
    """<p>Deletes a batch of geofences from a geofence collection.</p> <note> <p>This operation deletes the resource permanently.</p> </note>

    Args:
        collection_name: <p>The geofence collection storing the geofences to be deleted.</p>
        geofence_ids: <p>The batch of geofences to be deleted.</p>

    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_geofence_request.BatchDeleteGeofenceRequest]",
    ) -> OperationResponse[
        "capo_location.types.batch_delete_geofence_response.BatchDeleteGeofenceResponse"
    ]:
        import capo_location._operations.location_service.batch_delete_geofence

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteGeofence")
    )
    input_: capo_location.types.batch_delete_geofence_request.BatchDeleteGeofenceRequest = {
        "collection_name": collection_name,
        "geofence_ids": geofence_ids,
    }

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