Skip to main content

security_profiles

Creates, updates, deletes or gets a security_profile resource or lists security_profiles in a region

Overview

Namesecurity_profiles
TypeResource
DescriptionA security profile defines a set of expected behaviors for devices in your account.
Idaws.iot.security_profiles

Fields

NameDatatypeDescription
security_profile_namestringA unique identifier for the security profile.
security_profile_descriptionstringA description of the security profile.
behaviorsarraySpecifies the behaviors that, when violated by a device (thing), cause an alert.
alert_targetsobjectSpecifies the destinations to which alerts are sent.
additional_metrics_to_retain_v2arrayA list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.
metrics_export_configobjectA structure containing the mqtt topic for metrics export.
tagsarrayMetadata that can be used to manage the security profile.
target_arnsarrayA set of target ARNs that the security profile is attached to.
security_profile_arnstringThe ARN (Amazon resource name) of the created security profile.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all security_profiles in a region.

SELECT
region,
security_profile_name,
security_profile_description,
behaviors,
alert_targets,
additional_metrics_to_retain_v2,
metrics_export_config,
tags,
target_arns,
security_profile_arn
FROM aws.iot.security_profiles
WHERE region = 'us-east-1';

Gets all properties from an individual security_profile.

SELECT
region,
security_profile_name,
security_profile_description,
behaviors,
alert_targets,
additional_metrics_to_retain_v2,
metrics_export_config,
tags,
target_arns,
security_profile_arn
FROM aws.iot.security_profiles
WHERE region = 'us-east-1' AND data__Identifier = '<SecurityProfileName>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

iot:CreateSecurityProfile,
iot:AttachSecurityProfile,
iot:DescribeSecurityProfile,
iot:TagResource,
iam:PassRole

Read

iot:DescribeSecurityProfile,
iot:ListTagsForResource,
iot:ListTargetsForSecurityProfile

Update

iot:UpdateSecurityProfile,
iot:ListTargetsForSecurityProfile,
iot:AttachSecurityProfile,
iot:DetachSecurityProfile,
iot:ListTagsForResource,
iot:UntagResource,
iot:TagResource,
iam:PassRole

Delete

iot:DescribeSecurityProfile,
iot:DeleteSecurityProfile

List

iot:ListSecurityProfiles