Skip to content

update_map

update_map(
    map_name: ResourceName,
    *,
    config_overrides: Optional[LocationClientConfig] = None,
    pricing_plan: Optional[PricingPlan] = None,
    description: Optional[ResourceDescription] = None,
    configuration_update: Optional[MapConfigurationUpdate] = None,
) -> UpdateMapResponse

This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require Grab data.

  • UpdateMap is part of a previous Amazon Location Service Maps API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).

  • The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.

  • If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under geo-maps or geo_maps, not under location.

  • Since Grab is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Maps V2 API Reference or the Developer Guide.

Updates the specified properties of a given map resource.

Parameters:

  • map_name (ResourceName) –

    The name of the map resource to update.

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

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

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

    Updates the description for the map resource.

  • configuration_update (Optional[MapConfigurationUpdate], default: None ) –

    Updates the parts of the map configuration that can be updated, including the political view.

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
def update_map(
    self,
    map_name: "capo_location.types.resource_name.ResourceName",
    *,
    config_overrides: Optional[LocationClientConfig] = None,
    pricing_plan: Optional["capo_location.types.pricing_plan.PricingPlan"] = None,
    description: Optional[
        "capo_location.types.resource_description.ResourceDescription"
    ] = None,
    configuration_update: Optional[
        "capo_location.types.map_configuration_update.MapConfigurationUpdate"
    ] = None,
) -> "capo_location.types.update_map_response.UpdateMapResponse":
    """<important> <p>This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require <code>Grab</code> data.</p> <ul> <li> <p> <code>UpdateMap</code> is part of a previous Amazon Location Service Maps API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).</p> </li> <li> <p>The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.</p> </li> <li> <p>If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under <code>geo-maps</code> or <code>geo_maps</code>, not under <code>location</code>.</p> </li> <li> <p>Since <code>Grab</code> is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using <code>Grab</code>.</p> </li> <li> <p>Start your version 2 API journey with the <a href="https://docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html">Maps V2 API Reference</a> or the <a href="https://docs.aws.amazon.com/location/latest/developerguide/maps.html">Developer Guide</a>.</p> </li> </ul> </important> <p>Updates the specified properties of a given map resource.</p>

    Args:
        map_name: <p>The name of the map resource to update.</p>
        pricing_plan: <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
        description: <p>Updates the description for the map resource.</p>
        configuration_update: <p>Updates the parts of the map configuration that can be updated, including the political view.</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.
    """

    def _handler(
        req: "OperationRequest[capo_location.types.update_map_request.UpdateMapRequest]",
    ) -> OperationResponse[
        "capo_location.types.update_map_response.UpdateMapResponse"
    ]:
        import capo_location._operations.location_service.update_map

        output, http_response = (
            capo_location._operations.location_service.update_map.update_map(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_location.types.update_map_request.UpdateMapRequest",
    ) -> dict[str, Any]:
        import capo_location.types.update_map_request

        return capo_location.types.update_map_request.redact_sensitive(input_)

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

        return capo_location.types.update_map_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateMap", redact_input=_redact_input, redact_output=_redact_output
        ),
    )
    input_: capo_location.types.update_map_request.UpdateMapRequest = {
        "map_name": map_name
    }
    if pricing_plan is not None:
        input_["pricing_plan"] = pricing_plan
    if description is not None:
        input_["description"] = description
    if configuration_update is not None:
        input_["configuration_update"] = configuration_update

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output