Skip to content

update_geofence_collection async

update_geofence_collection(
    collection_name: ResourceName,
    *,
    config_overrides: Optional[AsyncLocationClientConfig] = None,
    pricing_plan: Optional[PricingPlan] = None,
    pricing_plan_data_source: Optional[str] = None,
    description: Optional[ResourceDescription] = None,
) -> UpdateGeofenceCollectionResponse

Updates the specified properties of a given geofence collection.

Parameters:

  • collection_name (ResourceName) –

    The name of the geofence collection to update.

  • pricing_plan (Optional[PricingPlan], default: None ) –

    No longer used. If included, the only allowed value is RequestBasedUsage.

  • pricing_plan_data_source (Optional[str], default: None ) –

    This parameter is no longer used.

  • description (Optional[ResourceDescription], default: None ) –

    Updates the description for the geofence collection.

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/async_location.py
async def update_geofence_collection(
    self,
    collection_name: "capo_location.types.resource_name.ResourceName",
    *,
    config_overrides: Optional[AsyncLocationClientConfig] = None,
    pricing_plan: Optional["capo_location.types.pricing_plan.PricingPlan"] = None,
    pricing_plan_data_source: Optional[str] = None,
    description: Optional[
        "capo_location.types.resource_description.ResourceDescription"
    ] = None,
) -> "capo_location.types.update_geofence_collection_response.UpdateGeofenceCollectionResponse":
    """<p>Updates the specified properties of a given geofence collection.</p>

    Args:
        collection_name: <p>The name of the geofence collection to update.</p>
        pricing_plan: <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
        pricing_plan_data_source: <p>This parameter is no longer used.</p>
        description: <p>Updates the description for the geofence collection.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_location.types.update_geofence_collection_request.UpdateGeofenceCollectionRequest]",
    ) -> AsyncOperationResponse[
        "capo_location.types.update_geofence_collection_response.UpdateGeofenceCollectionResponse"
    ]:
        import capo_location._operations.location_service.update_geofence_collection

        (
            output,
            http_response,
        ) = await capo_location._operations.location_service.update_geofence_collection.async_update_geofence_collection(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_location.types.update_geofence_collection_response.UpdateGeofenceCollectionResponse",
    ) -> dict[str, Any]:
        import capo_location.types.update_geofence_collection_response

        return capo_location.types.update_geofence_collection_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateGeofenceCollection", redact_output=_redact_output),
    )
    input_: capo_location.types.update_geofence_collection_request.UpdateGeofenceCollectionRequest = {
        "collection_name": collection_name
    }
    if pricing_plan is not None:
        input_["pricing_plan"] = pricing_plan
    if pricing_plan_data_source is not None:
        input_["pricing_plan_data_source"] = pricing_plan_data_source
    if description is not None:
        input_["description"] = description

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output