updateActionTarget method
Updates the name and description of a custom action target in Security Hub.
May throw InternalException. May throw InvalidInputException. May throw ResourceNotFoundException. May throw InvalidAccessException. May throw ResourceNotFoundException.
Parameter actionTargetArn
:
The ARN of the custom action target to update.
Parameter description
:
The updated description for the custom action target.
Parameter name
:
The updated name of the custom action target.
Implementation
Future<void> updateActionTarget({
required String actionTargetArn,
String? description,
String? name,
}) async {
ArgumentError.checkNotNull(actionTargetArn, 'actionTargetArn');
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (name != null) 'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/actionTargets/${actionTargetArn.split('/').map(Uri.encodeComponent).join('/')}',
exceptionFnMap: _exceptionFns,
);
}