put_geofence
async
¶
put_geofence(
collection_name: ResourceName,
geofence_id: Id,
geometry: GeofenceGeometry,
*,
config_overrides: Optional[AsyncLocationClientConfig] = None,
geofence_properties: Optional[PropertyMap] = None,
) -> PutGeofenceResponse
Stores a geofence geometry in a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.
Parameters:
-
collection_name(ResourceName) –The geofence collection to store the geofence in.
-
geofence_id(Id) –An identifier for the geofence. For example,
ExampleGeofence-1. -
geometry(GeofenceGeometry) –Contains the details to specify the position of the geofence. Can be a circle, a polygon, or a multipolygon.
PolygonandMultiPolygongeometries can be defined using their respective parameters, or encoded in Geobuf format using theGeobufparameter. Including multiple geometry types in the same request will return a validation error.The geofence
PolygonandMultiPolygonformats support a maximum of 1,000 total vertices. TheGeobufformat supports a maximum of 100,000 vertices. -
geofence_properties(Optional[PropertyMap], default:None) –Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.
Format:
"key" : "value"
Raises:
-
AccessDeniedException–The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.
-
ConflictException–The request was unsuccessful because of a conflict.
-
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/async_location.py
1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 | |