Skip to main content

security_profiles

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

Overview

Namesecurity_profiles
TypeResource
Idaws.iot.security_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
additional_metrics_to_retainarrayPlease use DescribeSecurityProfileResponse$additionalMetricsToRetainV2 instead. A 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.
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.
alert_targetsobjectWhere the alerts are sent. (Alerts are always sent to the console.)
behaviorsarraySpecifies the behaviors that, when violated by a device (thing), cause an alert.
creation_datestring (date-time)The time the security profile was created.
last_modified_datestring (date-time)The time the security profile was last modified.
metrics_export_configobjectSet configurations for metrics export.
security_profile_arnstringThe ARN of the security profile.
security_profile_descriptionstringA description of the security profile (associated with the security profile when it was created or updated). (pattern: <code>[\p{Graph}\x20]*</code>)
security_profile_namestringThe name of the security profile. (pattern: <code>[a-zA-Z0-9:_-]+</code>)
versioninteger (int64)The version of the security profile. A new version is generated whenever the security profile is updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_security_profileselectsecurity_profile_name, regionGets information about a Device Defender security profile. Requires permission to access the DescribeSecurityProfile action.
list_security_profilesselectregionnextToken, maxResults, dimensionName, metricNameLists the Device Defender security profiles you've created. You can filter security profiles by dimension or custom metric. Requires permission to access the ListSecurityProfiles action. dimensionName and metricName cannot be used in the same request.
create_security_profileinsertsecurity_profile_name, regionCreates a Device Defender security profile. Requires permission to access the CreateSecurityProfile action.
attach_security_profileupdatesecurity_profile_name, securityProfileTargetArn, regionAssociates a Device Defender security profile with a thing group or this account. Each thing group or account can have up to five security profiles associated with it. Requires permission to access the AttachSecurityProfile action.
update_security_profileupdatesecurity_profile_name, regionexpectedVersionUpdates a Device Defender security profile. Requires permission to access the UpdateSecurityProfile action.
delete_security_profiledeletesecurity_profile_name, regionexpectedVersionDeletes a Device Defender security profile. Requires permission to access the DeleteSecurityProfile action.
detach_security_profileexecsecurity_profile_name, securityProfileTargetArn, regionDisassociates a Device Defender security profile from a thing group or from this account. Requires permission to access the DetachSecurityProfile action.
validate_security_profile_behaviorsexecregion, behaviorsValidates a Device Defender security profile behaviors specification. Requires permission to access the ValidateSecurityProfileBehaviors 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
regionstringAWS region (default: us-east-1)
securityProfileTargetArnstringThe ARN of the thing group from which the security profile is detached.
security_profile_namestringThe security profile that is detached.
dimensionNamestringA filter to limit results to the security profiles that use the defined dimension. Cannot be used with metricName
expectedVersioninteger (int64)The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a VersionConflictException is thrown.
maxResultsintegerThe maximum number of results to return at one time.
metricNamestringThe name of the custom metric. Cannot be used with dimensionName.
nextTokenstringThe token for the next set of results.

SELECT examples

Gets information about a Device Defender security profile. Requires permission to access the DescribeSecurityProfile action.

SELECT
additional_metrics_to_retain,
additional_metrics_to_retain_v2,
alert_targets,
behaviors,
creation_date,
last_modified_date,
metrics_export_config,
security_profile_arn,
security_profile_description,
security_profile_name,
version
FROM aws.iot.security_profiles
WHERE security_profile_name = '{{ security_profile_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a Device Defender security profile. Requires permission to access the CreateSecurityProfile action.

INSERT INTO aws.iot.security_profiles (
securityProfileDescription,
behaviors,
alertTargets,
additionalMetricsToRetain,
additionalMetricsToRetainV2,
tags,
metricsExportConfig,
security_profile_name,
region
)
SELECT
'{{ securityProfileDescription }}',
'{{ behaviors }}',
'{{ alertTargets }}',
'{{ additionalMetricsToRetain }}',
'{{ additionalMetricsToRetainV2 }}',
'{{ tags }}',
'{{ metricsExportConfig }}',
'{{ security_profile_name }}',
'{{ region }}'
RETURNING
security_profile_arn,
security_profile_name
;

UPDATE examples

Associates a Device Defender security profile with a thing group or this account. Each thing group or account can have up to five security profiles associated with it. Requires permission to access the AttachSecurityProfile action.

UPDATE aws.iot.security_profiles
SET
-- No updatable properties
WHERE
security_profile_name = '{{ security_profile_name }}' --required
AND securityProfileTargetArn = '{{ securityProfileTargetArn }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a Device Defender security profile. Requires permission to access the DeleteSecurityProfile action.

DELETE FROM aws.iot.security_profiles
WHERE security_profile_name = '{{ security_profile_name }}' --required
AND region = '{{ region }}' --required
AND expectedVersion = '{{ expectedVersion }}'
;

Lifecycle Methods

Disassociates a Device Defender security profile from a thing group or from this account. Requires permission to access the DetachSecurityProfile action.

EXEC aws.iot.security_profiles.detach_security_profile
@security_profile_name='{{ security_profile_name }}' --required,
@securityProfileTargetArn='{{ securityProfileTargetArn }}' --required,
@region='{{ region }}' --required
;