updateMitigationAction method
Updates the definition for the specified mitigation action.
Requires permission to access the UpdateMitigationAction action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter actionName :
The friendly name for the mitigation action. You cannot change the name by
using UpdateMitigationAction. Instead, you must delete and
recreate the mitigation action with the new name.
Parameter actionParams :
Defines the type of action and the parameters for that action.
Parameter roleArn :
The ARN of the IAM role that is used to apply the mitigation action.
Implementation
Future<UpdateMitigationActionResponse> updateMitigationAction({
required String actionName,
MitigationActionParams? actionParams,
String? roleArn,
}) async {
final $payload = <String, dynamic>{
if (actionParams != null) 'actionParams': actionParams,
if (roleArn != null) 'roleArn': roleArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/mitigationactions/actions/${Uri.encodeComponent(actionName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateMitigationActionResponse.fromJson(response);
}