getLayerVersion method
Returns information about a version of an AWS Lambda layer, with a link to download the layer archive that's valid for 10 minutes.
May throw ServiceException. May throw InvalidParameterValueException. May throw TooManyRequestsException. May throw ResourceNotFoundException.
Parameter layerName
:
The name or Amazon Resource Name (ARN) of the layer.
Parameter versionNumber
:
The version number.
Implementation
Future<GetLayerVersionResponse> getLayerVersion({
required String layerName,
required int versionNumber,
}) async {
ArgumentError.checkNotNull(layerName, 'layerName');
_s.validateStringLength(
'layerName',
layerName,
1,
140,
isRequired: true,
);
ArgumentError.checkNotNull(versionNumber, 'versionNumber');
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/2018-10-31/layers/${Uri.encodeComponent(layerName)}/versions/${Uri.encodeComponent(versionNumber.toString())}',
exceptionFnMap: _exceptionFns,
);
return GetLayerVersionResponse.fromJson(response);
}