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,
    *,
    ConsumerArn: str,
    TrackerName: str,
) -> Dict[str, Any]:
    ...
# associate_tracker_consumer method usage example with argument unpacking

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

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,
    *,
    DeviceIds: Sequence[str],
    TrackerName: str,
) -> BatchDeleteDevicePositionHistoryResponseTypeDef:  # (1)
    ...
  1. See BatchDeleteDevicePositionHistoryResponseTypeDef
# batch_delete_device_position_history method usage example with argument unpacking

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

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. boto3 documentation

# batch_get_device_position method definition

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

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

parent.batch_get_device_position(**kwargs)
  1. See BatchGetDevicePositionRequestRequestTypeDef

batch_put_geofence#

A batch request for storing geofence geometries into a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.

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

# batch_put_geofence method definition

def batch_put_geofence(
    self,
    *,
    CollectionName: str,
    Entries: Sequence[BatchPutGeofenceRequestEntryTypeDef],  # (1)
) -> BatchPutGeofenceResponseTypeDef:  # (2)
    ...
  1. See BatchPutGeofenceRequestEntryTypeDef
  2. See BatchPutGeofenceResponseTypeDef
# batch_put_geofence method usage example with argument unpacking

kwargs: BatchPutGeofenceRequestRequestTypeDef = {  # (1)
    "CollectionName": ...,
    "Entries": ...,
}

parent.batch_put_geofence(**kwargs)
  1. See BatchPutGeofenceRequestRequestTypeDef

batch_update_device_position#

Uploads position update data for one or more devices to a tracker resource (up to 10 devices per batch).

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

# batch_update_device_position method definition

def batch_update_device_position(
    self,
    *,
    TrackerName: str,
    Updates: Sequence[DevicePositionUpdateTypeDef],  # (1)
) -> BatchUpdateDevicePositionResponseTypeDef:  # (2)
    ...
  1. See DevicePositionUpdateTypeDef
  2. See BatchUpdateDevicePositionResponseTypeDef
# batch_update_device_position method usage example with argument unpacking

kwargs: BatchUpdateDevicePositionRequestRequestTypeDef = {  # (1)
    "TrackerName": ...,
    "Updates": ...,
}

parent.batch_update_device_position(**kwargs)
  1. See BatchUpdateDevicePositionRequestRequestTypeDef

calculate_route#

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

# calculate_route method definition

def calculate_route(
    self,
    *,
    CalculatorName: str,
    DeparturePosition: Sequence[float],
    DestinationPosition: Sequence[float],
    ArrivalTime: Union[datetime, str] = ...,
    CarModeOptions: CalculateRouteCarModeOptionsTypeDef = ...,  # (1)
    DepartNow: bool = ...,
    DepartureTime: Union[datetime, str] = ...,
    DistanceUnit: DistanceUnitType = ...,  # (2)
    IncludeLegGeometry: bool = ...,
    Key: str = ...,
    OptimizeFor: OptimizationModeType = ...,  # (3)
    TravelMode: TravelModeType = ...,  # (4)
    TruckModeOptions: CalculateRouteTruckModeOptionsTypeDef = ...,  # (5)
    WaypointPositions: Sequence[Sequence[float]] = ...,
) -> CalculateRouteResponseTypeDef:  # (6)
    ...
  1. See CalculateRouteCarModeOptionsTypeDef
  2. See DistanceUnitType
  3. See OptimizationModeType
  4. See TravelModeType
  5. See CalculateRouteTruckModeOptionsTypeDef
  6. See CalculateRouteResponseTypeDef
# calculate_route method usage example with argument unpacking

kwargs: CalculateRouteRequestRequestTypeDef = {  # (1)
    "CalculatorName": ...,
    "DeparturePosition": ...,
    "DestinationPosition": ...,
}

parent.calculate_route(**kwargs)
  1. See CalculateRouteRequestRequestTypeDef

calculate_route_matrix#

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

# calculate_route_matrix method definition

def calculate_route_matrix(
    self,
    *,
    CalculatorName: str,
    DeparturePositions: Sequence[Sequence[float]],
    DestinationPositions: Sequence[Sequence[float]],
    CarModeOptions: CalculateRouteCarModeOptionsTypeDef = ...,  # (1)
    DepartNow: bool = ...,
    DepartureTime: Union[datetime, str] = ...,
    DistanceUnit: DistanceUnitType = ...,  # (2)
    Key: str = ...,
    TravelMode: TravelModeType = ...,  # (3)
    TruckModeOptions: CalculateRouteTruckModeOptionsTypeDef = ...,  # (4)
) -> CalculateRouteMatrixResponseTypeDef:  # (5)
    ...
  1. See CalculateRouteCarModeOptionsTypeDef
  2. See DistanceUnitType
  3. See TravelModeType
  4. See CalculateRouteTruckModeOptionsTypeDef
  5. See CalculateRouteMatrixResponseTypeDef
# calculate_route_matrix method usage example with argument unpacking

kwargs: CalculateRouteMatrixRequestRequestTypeDef = {  # (1)
    "CalculatorName": ...,
    "DeparturePositions": ...,
    "DestinationPositions": ...,
}

parent.calculate_route_matrix(**kwargs)
  1. See CalculateRouteMatrixRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

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

# close method definition

def close(
    self,
) -> None:
    ...

create_geofence_collection#

Creates a geofence collection, which manages and stores geofences.

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

# create_geofence_collection method definition

def create_geofence_collection(
    self,
    *,
    CollectionName: str,
    Description: str = ...,
    KmsKeyId: str = ...,
    PricingPlan: PricingPlanType = ...,  # (1)
    PricingPlanDataSource: str = ...,
    Tags: Mapping[str, str] = ...,
) -> CreateGeofenceCollectionResponseTypeDef:  # (2)
    ...
  1. See