putFunctionCodeSigningConfig method

Future<PutFunctionCodeSigningConfigResponse> putFunctionCodeSigningConfig({
  1. required String codeSigningConfigArn,
  2. required String functionName,
})

Update the code signing configuration for the function. Changes to the code signing configuration take effect the next time a user tries to deploy a code package to the function.

May throw CodeSigningConfigNotFoundException. May throw InvalidParameterValueException. May throw ResourceConflictException. May throw ResourceNotFoundException. May throw ServiceException. May throw TooManyRequestsException.

Parameter codeSigningConfigArn : The The Amazon Resource Name (ARN) of the code signing configuration.

Parameter functionName : The name or ARN 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.

Implementation

Future<PutFunctionCodeSigningConfigResponse> putFunctionCodeSigningConfig({
  required String codeSigningConfigArn,
  required String functionName,
}) async {
  final $payload = <String, dynamic>{
    'CodeSigningConfigArn': codeSigningConfigArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/2020-06-30/functions/${Uri.encodeComponent(functionName)}/code-signing-config',
    exceptionFnMap: _exceptionFns,
  );
  return PutFunctionCodeSigningConfigResponse.fromJson(response);
}