Skip to content

LocationServiceClient#

Index > LocationService > LocationServiceClient

Auto-generated documentation for LocationService type annotations stubs module mypy-boto3-location.

LocationServiceClient#

Type annotations and code completion for boto3.client("location"). boto3 documentation

# LocationServiceClient usage example

from boto3.session import Session
from mypy_boto3_location.client import LocationServiceClient

def get_location_client() -> LocationServiceClient:
    return Session().client("location")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("location").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("location")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_location.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

associate_tracker_consumer#

Creates an association between a geofence collection and a tracker resource.

Type annotations and code completion for boto3.client("location").associate_tracker_consumer method. boto3 documentation

# associate_tracker_consumer method definition

def associate_tracker_consumer(
    self,
    *,
    TrackerName: str,
    ConsumerArn: str,
) -> Dict[str, Any]:
    ...
# associate_tracker_consumer method usage example with argument unpacking

kwargs: AssociateTrackerConsumerRequestRequestTypeDef = {  # (1)
    "TrackerName": ...,
    "ConsumerArn": ...,
}

parent.associate_tracker_consumer(**kwargs)
  1. See AssociateTrackerConsumerRequestRequestTypeDef

batch_delete_device_position_history#

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

Type annotations and code completion for boto3.client("location").batch_delete_device_position_history method. boto3 documentation

# batch_delete_device_position_history method definition

def batch_delete_device_position_history(
    self,
    *,
    TrackerName: str,
    DeviceIds: Sequence[str],
) -> BatchDeleteDevicePositionHistoryResponseTypeDef:  # (1)
    ...
  1. See BatchDeleteDevicePositionHistoryResponseTypeDef
# batch_delete_device_position_history method usage example with argument unpacking

kwargs: BatchDeleteDevicePositionHistoryRequestRequestTypeDef = {  # (1)
    "TrackerName": ...,
    "DeviceIds": ...,
}

parent.batch_delete_device_position_history(**kwargs)
  1. See BatchDeleteDevicePositionHistoryRequestRequestTypeDef

batch_delete_geofence#

Deletes a batch of geofences from a geofence collection.

Type annotations and code completion for boto3.client("location").batch_delete_geofence method. boto3 documentation

# batch_delete_geofence method definition

def batch_delete_geofence(
    self,
    *,
    CollectionName: str,
    GeofenceIds: Sequence[str],
) -> BatchDeleteGeofenceResponseTypeDef:  # (1)
    ...
  1. See BatchDeleteGeofenceResponseTypeDef
# batch_delete_geofence method usage example with argument unpacking

kwargs: BatchDeleteGeofenceRequestRequestTypeDef = {  # (1)
    "CollectionName": ...,
    "GeofenceIds": ...,
}

parent.batch_delete_geofence(**kwargs)
  1. See BatchDeleteGeofenceRequestRequestTypeDef

batch_evaluate_geofences#

Evaluates device positions against the geofence geometries from a given geofence collection.

Type annotations and code completion for boto3.client("location").batch_evaluate_geofences method. boto3 documentation

# batch_evaluate_geofences method definition

def batch_evaluate_geofences(
    self,
    *,
    CollectionName: str,
    DevicePositionUpdates: Sequence[DevicePositionUpdateTypeDef],  # (1)
) -> BatchEvaluateGeofencesResponseTypeDef:  # (2)
    ...
  1. See DevicePositionUpdateTypeDef
  2. See BatchEvaluateGeofencesResponseTypeDef
# batch_evaluate_geofences method usage example with argument unpacking

kwargs: BatchEvaluateGeofencesRequestRequestTypeDef = {  # (1)
    "CollectionName": ...,
    "DevicePositionUpdates": ...,
}

parent.batch_evaluate_geofences(**kwargs)
  1. See BatchEvaluateGeofencesRequestRequestTypeDef

batch_get_device_position#

Lists the latest device positions for requested devices.

Type annotations and code completion for boto3.client("location").batch_get_device_position method.