updateFunctionEventInvokeConfig method
Updates the configuration for asynchronous invocation for a function, version, or alias.
To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
May throw InvalidParameterValueException.
May throw ResourceConflictException.
May throw ResourceNotFoundException.
May throw ServiceException.
May throw TooManyRequestsException.
Parameter functionName :
The name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name -
my-function(name-only),my-function:v1(with alias). -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN -
123456789012:function:my-function.
Parameter destinationConfig :
A destination for events after they have been sent to a function for
processing.
Destinations
- Function - The Amazon Resource Name (ARN) of a Lambda function.
- Queue - The ARN of a standard SQS queue.
- Bucket - The ARN of an Amazon S3 bucket.
- Topic - The ARN of a standard SNS topic.
- Event Bus - The ARN of an Amazon EventBridge event bus.
Parameter maximumEventAgeInSeconds :
The maximum age of a request that Lambda sends to a function for
processing.
Parameter maximumRetryAttempts :
The maximum number of times to retry when the function returns an error.
Parameter qualifier :
A version number or alias name.
Implementation
Future<FunctionEventInvokeConfig> updateFunctionEventInvokeConfig({
required String functionName,
DestinationConfig? destinationConfig,
int? maximumEventAgeInSeconds,
int? maximumRetryAttempts,
String? qualifier,
}) async {
_s.validateNumRange(
'maximumEventAgeInSeconds',
maximumEventAgeInSeconds,
60,
21600,
);
_s.validateNumRange(
'maximumRetryAttempts',
maximumRetryAttempts,
0,
2,
);
final $query = <String, List<String>>{
if (qualifier != null) 'Qualifier': [qualifier],
};
final $payload = <String, dynamic>{
if (destinationConfig != null) 'DestinationConfig': destinationConfig,
if (maximumEventAgeInSeconds != null)
'MaximumEventAgeInSeconds': maximumEventAgeInSeconds,
if (maximumRetryAttempts != null)
'MaximumRetryAttempts': maximumRetryAttempts,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/2019-09-25/functions/${Uri.encodeComponent(functionName)}/event-invoke-config',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return FunctionEventInvokeConfig.fromJson(response);
}