createActionTarget method

Future<CreateActionTargetResponse> createActionTarget({
  1. required String description,
  2. required String id,
  3. required String name,
})

Creates a custom action target in Security Hub.

You can use custom actions on findings and insights in Security Hub to trigger target actions in Amazon CloudWatch Events.

May throw InternalException. May throw InvalidInputException. May throw InvalidAccessException. May throw LimitExceededException. May throw ResourceConflictException.

Parameter description : The description for the custom action target.

Parameter id : The ID for the custom action target.

Parameter name : The name of the custom action target.

Implementation

Future<CreateActionTargetResponse> createActionTarget({
  required String description,
  required String id,
  required String name,
}) async {
  ArgumentError.checkNotNull(description, 'description');
  ArgumentError.checkNotNull(id, 'id');
  ArgumentError.checkNotNull(name, 'name');
  final $payload = <String, dynamic>{
    'Description': description,
    'Id': id,
    'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/actionTargets',
    exceptionFnMap: _exceptionFns,
  );
  return CreateActionTargetResponse.fromJson(response);
}