deleteLayerVersion method
Deletes a version of an AWS Lambda layer. Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of the version remains in Lambda until no functions refer to it.
May throw ServiceException. May throw TooManyRequestsException.
Parameter layerName
:
The name or Amazon Resource Name (ARN) of the layer.
Parameter versionNumber
:
The version number.
Implementation
Future<void> deleteLayerVersion({
required String layerName,
required int versionNumber,
}) async {
ArgumentError.checkNotNull(layerName, 'layerName');
_s.validateStringLength(
'layerName',
layerName,
1,
140,
isRequired: true,
);
ArgumentError.checkNotNull(versionNumber, 'versionNumber');
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/2018-10-31/layers/${Uri.encodeComponent(layerName)}/versions/${Uri.encodeComponent(versionNumber.toString())}',
exceptionFnMap: _exceptionFns,
);
}