Skip to main content

mitigation_actions

Creates, updates, deletes, gets or lists a mitigation_actions resource.

Overview

Namemitigation_actions
TypeResource
Idaws.iot.mitigation_actions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
action_arnstringThe ARN that identifies this migration action.
action_idstringA unique identifier for this action.
action_namestringThe friendly name that uniquely identifies the mitigation action. (pattern: <code>[a-zA-Z0-9_-]+</code>)
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).
action_typestringThe type of mitigation action. (UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS)
creation_datestring (date-time)The date and time when the mitigation action was added to your Amazon Web Services accounts.
last_modified_datestring (date-time)The date and time when the mitigation action was last changed.
role_arnstringThe ARN of the IAM role used to apply this action.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_mitigation_actionselectaction_name, regionGets information about a mitigation action. Requires permission to access the DescribeMitigationAction action.
list_mitigation_actionsselectregionactionType, maxResults, nextTokenGets a list of all mitigation actions that match the specified filter criteria. Requires permission to access the ListMitigationActions action.
create_mitigation_actioninsertaction_name, region, roleArn, actionParamsDefines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of change. Requires permission to access the CreateMitigationAction action.
update_mitigation_actionupdateaction_name, regionUpdates the definition for the specified mitigation action. Requires permission to access the UpdateMitigationAction action.
delete_mitigation_actiondeleteaction_name, regionDeletes a defined mitigation action from your Amazon Web Services accounts. Requires permission to access the DeleteMitigationAction 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.

NameDatatypeDescription
action_namestringThe name of the mitigation action that you want to delete.
regionstringAWS region (default: us-east-1)
actionTypestringSpecify a value to limit the result to mitigation actions with a specific action type.
maxResultsintegerThe maximum number of results to return at one time. The default is 25.
nextTokenstringThe token for the next set of results.

SELECT examples

Gets information about a mitigation action. Requires permission to access the DescribeMitigationAction action.

SELECT
action_arn,
action_id,
action_name,
action_params,
action_type,
creation_date,
last_modified_date,
role_arn
FROM aws.iot.mitigation_actions
WHERE action_name = '{{ action_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of change. Requires permission to access the CreateMitigationAction action.

INSERT INTO aws.iot.mitigation_actions (
roleArn,
actionParams,
tags,
action_name,
region
)
SELECT
'{{ roleArn }}' /* required */,
'{{ actionParams }}' /* required */,
'{{ tags }}',
'{{ action_name }}',
'{{ region }}'
RETURNING
action_arn,
action_id
;

UPDATE examples

Updates the definition for the specified mitigation action. Requires permission to access the UpdateMitigationAction action.

UPDATE aws.iot.mitigation_actions
SET
roleArn = '{{ roleArn }}',
actionParams = '{{ actionParams }}'
WHERE
action_name = '{{ action_name }}' --required
AND region = '{{ region }}' --required
RETURNING
action_arn,
action_id;

DELETE examples

Deletes a defined mitigation action from your Amazon Web Services accounts. Requires permission to access the DeleteMitigationAction action.

DELETE FROM aws.iot.mitigation_actions
WHERE action_name = '{{ action_name }}' --required
AND region = '{{ region }}' --required
;