create_action_target
¶
create_action_target(
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
name: Optional[NonEmptyString] = None,
description: Optional[NonEmptyString] = None,
id: Optional[NonEmptyString] = None,
) -> CreateActionTargetResponse
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.
Parameters:
-
name(Optional[NonEmptyString], default:None) –The name of the custom action target. Can contain up to 20 characters.
-
description(Optional[NonEmptyString], default:None) –The description for the custom action target.
-
id(Optional[NonEmptyString], default:None) –The ID for the custom action target. Can contain up to 20 alphanumeric characters.
Raises:
-
InternalException–Internal server error.
-
InvalidAccessException–The account doesn't have permission to perform this action.
-
InvalidInputException–The request was rejected because you supplied an invalid or out-of-range value for an input parameter.
-
LimitExceededException–The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.
-
ResourceConflictException–The resource specified in the request conflicts with an existing resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a custom action target The following example creates a custom action target in Security Hub. Custom actions on findings and insights automatically trigger actions in Amazon CloudWatch Events.
>>> client.create_action_target(name='Send to remediation', description='Action to send the finding for remediation tracking', id='Remediation')
Source code in docs_src/capo_securityhub/_services/security_hub.py
1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 | |