Skip to main content

mitigation_actions

Creates, updates, deletes or gets a mitigation_action resource or lists mitigation_actions in a region

Overview

Namemitigation_actions
TypeResource
DescriptionMitigation actions can be used to take actions to mitigate issues that were found in an Audit finding or Detect violation.
Idaws.iot.mitigation_actions

Fields

NameDatatypeDescription
action_namestringA unique identifier for the mitigation action.
role_arnstring
tagsarrayAn array of key-value pairs to apply to this resource.
action_paramsobjectThe set of parameters for this mitigation action. You can specify only one type of parameter (in other words, you can apply only one action for each defined mitigation action).
mitigation_action_arnstring
mitigation_action_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTRoleArn, ActionParams, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all mitigation_actions in a region.

SELECT
region,
action_name,
role_arn,
tags,
action_params,
mitigation_action_arn,
mitigation_action_id
FROM aws.iot.mitigation_actions
WHERE region = 'us-east-1';

Gets all properties from an individual mitigation_action.

SELECT
region,
action_name,
role_arn,
tags,
action_params,
mitigation_action_arn,
mitigation_action_id
FROM aws.iot.mitigation_actions
WHERE region = 'us-east-1' AND data__Identifier = '<ActionName>';

INSERT example

Use the following StackQL query and manifest file to create a new mitigation_action resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iot.mitigation_actions (
RoleArn,
ActionParams,
region
)
SELECT
'{{ RoleArn }}',
'{{ ActionParams }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iot.mitigation_actions
WHERE data__Identifier = '<ActionName>'
AND region = 'us-east-1';

Permissions

To operate on the mitigation_actions resource, the following permissions are required:

Create

iot:CreateMitigationAction,
iot:DescribeMitigationAction,
iot:TagResource,
iam:PassRole

Read

iot:DescribeMitigationAction,
iot:ListTagsForResource

Update

iot:UpdateMitigationAction,
iot:ListTagsForResource,
iot:UntagResource,
iot:TagResource,
iam:PassRole

Delete

iot:DescribeMitigationAction,
iot:DeleteMitigationAction

List

iot:ListMitigationActions