removeLayerVersionPermission method
Removes a statement from the permissions policy for a version of an Lambda layer. For more information, see AddLayerVersionPermission.
May throw InvalidParameterValueException.
May throw PreconditionFailedException.
May throw ResourceNotFoundException.
May throw ServiceException.
May throw TooManyRequestsException.
Parameter layerName :
The name or Amazon Resource Name (ARN) of the layer.
Parameter statementId :
The identifier that was specified when the statement was added.
Parameter versionNumber :
The version number.
Parameter revisionId :
Only update the policy if the revision ID matches the ID specified. Use
this option to avoid modifying a policy that has changed since you last
read it.
Implementation
Future<void> removeLayerVersionPermission({
required String layerName,
required String statementId,
required int versionNumber,
String? revisionId,
}) async {
final $query = <String, List<String>>{
if (revisionId != null) 'RevisionId': [revisionId],
};
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/2018-10-31/layers/${Uri.encodeComponent(layerName)}/versions/${Uri.encodeComponent(versionNumber.toString())}/policy/${Uri.encodeComponent(statementId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}