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

For more information, see AWS::IoT::MitigationAction.

Methods

NameResourceAccessible byRequired Params
create_resourcemitigation_actionsINSERTRoleArn, ActionParams, region
delete_resourcemitigation_actionsDELETEIdentifier, region
update_resourcemitigation_actionsUPDATEIdentifier, PatchDocument, region
list_resourcesmitigation_actions_list_onlySELECTregion
get_resourcemitigation_actionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual mitigation_action.

SELECT
region,
action_name,
role_arn,
tags,
action_params,
mitigation_action_arn,
mitigation_action_id
FROM awscc.iot.mitigation_actions
WHERE
region = 'us-east-1' AND
Identifier = '{{ action_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.iot.mitigation_actions
SET PatchDocument = string('{{ {
"RoleArn": role_arn,
"Tags": tags,
"ActionParams": action_params
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ action_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.iot.mitigation_actions
WHERE
Identifier = '{{ action_name }}' AND
region = 'us-east-1';

Permissions

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

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