deleteAlias method

Future<void> deleteAlias({
  1. required String functionName,
  2. required String name,
})

Deletes a Lambda function alias.

May throw ServiceException. May throw InvalidParameterValueException. May throw ResourceConflictException. May throw TooManyRequestsException.

Parameter functionName : The name of the Lambda function.

Name formats

  • Function name - MyFunction.
  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  • Partial ARN - 123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

Parameter name : The name of the alias.

Implementation

Future<void> deleteAlias({
  required String functionName,
  required String name,
}) async {
  ArgumentError.checkNotNull(functionName, 'functionName');
  _s.validateStringLength(
    'functionName',
    functionName,
    1,
    140,
    isRequired: true,
  );
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    128,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/2015-03-31/functions/${Uri.encodeComponent(functionName)}/aliases/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
}