forecast_geofence_events
¶
forecast_geofence_events(
collection_name: ResourceName,
device_state: ForecastGeofenceEventsDeviceState,
*,
config_overrides: Optional[LocationClientConfig] = None,
time_horizon_minutes: Optional[float] = None,
distance_unit: Optional[DistanceUnit] = None,
speed_unit: Optional[SpeedUnit] = None,
next_token: Optional[LargeToken] = None,
max_results: Optional[int] = None,
) -> ForecastGeofenceEventsResponse
This action forecasts future geofence events that are likely to occur within a specified time horizon if a device continues moving at its current speed. Each forecasted event is associated with a geofence from a provided geofence collection. A forecast event can have one of the following states:
ENTER: The device position is outside the referenced geofence, but the device may cross into the geofence during the forecasting time horizon if it maintains its current speed.
EXIT: The device position is inside the referenced geofence, but the device may leave the geofence during the forecasted time horizon if the device maintains it's current speed.
IDLE:The device is inside the geofence, and it will remain inside the geofence through the end of the time horizon if the device maintains it's current speed.
Heading direction is not considered in the current version. The API takes a conservative approach and includes events that can occur for any heading.
Parameters:
-
collection_name(ResourceName) –The name of the geofence collection.
-
device_state(ForecastGeofenceEventsDeviceState) –Represents the device's state, including its current position and speed. When speed is omitted, this API performs a containment check. The containment check operation returns
IDLEevents for geofences where the device is currently inside of, but no other events. -
time_horizon_minutes(Optional[float], default:None) –The forward-looking time window for forecasting, specified in minutes. The API only returns events that are predicted to occur within this time horizon. When no value is specified, this API performs a containment check. The containment check operation returns
IDLEevents for geofences where the device is currently inside of, but no other events. -
distance_unit(Optional[DistanceUnit], default:None) –The distance unit used for the
NearestDistanceproperty returned in a forecasted event. The measurement system must match forDistanceUnitandSpeedUnit; ifKilometersis specified forDistanceUnit, thenSpeedUnitmust beKilometersPerHour.Default Value:
Kilometers -
speed_unit(Optional[SpeedUnit], default:None) –The speed unit for the device captured by the device state. The measurement system must match for
DistanceUnitandSpeedUnit; ifKilometersis specified forDistanceUnit, thenSpeedUnitmust beKilometersPerHour.Default Value:
KilometersPerHour. -
next_token(Optional[LargeToken], default:None) –The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
Default value:
null -
max_results(Optional[int], default:None) –An optional limit for the number of resources returned in a single call.
Default value:
20
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
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 | |