deleteFleetMetric method
Deletes the specified fleet metric. Returns successfully with no error if the deletion is successful or you specify a fleet metric that doesn't exist.
Requires permission to access the DeleteFleetMetric action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw VersionConflictException.
Parameter metricName :
The name of the fleet metric to delete.
Parameter expectedVersion :
The expected version of the fleet metric to delete.
Implementation
Future<void> deleteFleetMetric({
required String metricName,
int? expectedVersion,
}) async {
final $query = <String, List<String>>{
if (expectedVersion != null)
'expectedVersion': [expectedVersion.toString()],
};
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/fleet-metric/${Uri.encodeComponent(metricName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}