updatePlaceIndex method
Updates the specified properties of a given place index resource.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter indexName :
The name of the place index resource to update.
Parameter dataSourceConfiguration :
Updates the data storage option for the place index resource.
Parameter description :
Updates the description for the place index resource.
Parameter pricingPlan :
No longer used. If included, the only allowed value is
RequestBasedUsage.
Implementation
Future<UpdatePlaceIndexResponse> updatePlaceIndex({
required String indexName,
DataSourceConfiguration? dataSourceConfiguration,
String? description,
PricingPlan? pricingPlan,
}) async {
final $payload = <String, dynamic>{
if (dataSourceConfiguration != null)
'DataSourceConfiguration': dataSourceConfiguration,
if (description != null) 'Description': description,
if (pricingPlan != null) 'PricingPlan': pricingPlan.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/places/v0/indexes/${Uri.encodeComponent(indexName)}',
hostPrefix: 'cp.places.',
exceptionFnMap: _exceptionFns,
);
return UpdatePlaceIndexResponse.fromJson(response);
}