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 CSPM.

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

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

Parameter description : The description for the custom action target.

Parameter id : The ID for the custom action target. Can contain up to 20 alphanumeric characters.

Parameter name : The name of the custom action target. Can contain up to 20 characters.

Implementation

Future<CreateActionTargetResponse> createActionTarget({
  required String description,
  required String id,
  required String name,
}) async {
  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);
}