action_targets
Creates, updates, deletes, gets or lists an action_targets resource.
Overview
| Name | action_targets |
| Type | Resource |
| Id | aws.securityhub.action_targets |
Fields
The following fields are returned by SELECT queries:
- describe_action_targets
| Name | Datatype | Description |
|---|---|---|
action_target_arn | string | The ARN for the target action. (pattern: <code>.\S.</code>) |
description | string | The description of the target action. (pattern: <code>.\S.</code>) |
name | string | The name of the action target. (pattern: <code>.\S.</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_action_targets | select | region | Returns a list of the custom action targets in Security Hub CSPM in your account. | |
create_action_target | insert | region, Id | 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. | |
update_action_target | update | action_target_arn, region | Updates the name and description of a custom action target in Security Hub CSPM. | |
delete_action_target | delete | action_target_arn, region | Deletes a custom action target from Security Hub CSPM. Deleting a custom action target does not affect any findings or insights that were already sent to Amazon CloudWatch Events using the custom action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
action_target_arn | string | The Amazon Resource Name (ARN) of the custom action target to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_action_targets
Returns a list of the custom action targets in Security Hub CSPM in your account.
SELECT
action_target_arn,
description,
name
FROM aws.securityhub.action_targets
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_action_target
- Manifest
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.
INSERT INTO aws.securityhub.action_targets (
Name,
Description,
Id,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Id }}' /* required */,
'{{ region }}'
RETURNING
action_target_arn
;
# Description fields are for documentation purposes
- name: action_targets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the action_targets resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: Id
value: "{{ Id }}"
UPDATE examples
- update_action_target
Updates the name and description of a custom action target in Security Hub CSPM.
UPDATE aws.securityhub.action_targets
SET
Name = '{{ Name }}',
Description = '{{ Description }}'
WHERE
action_target_arn = '{{ action_target_arn }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_action_target
Deletes a custom action target from Security Hub CSPM. Deleting a custom action target does not affect any findings or insights that were already sent to Amazon CloudWatch Events using the custom action.
DELETE FROM aws.securityhub.action_targets
WHERE action_target_arn = '{{ action_target_arn }}' --required
AND region = '{{ region }}' --required
;