IoT / Client / list_targets_for_security_profile

list_targets_for_security_profile

IoT.Client.list_targets_for_security_profile(**kwargs)

Note

The IoT Device Defender detect feature will no longer be available to new customers starting August 31, 2026. If you would like to use the detect feature, sign up prior to August 31, 2026. To learn about alternatives to IoT Device Defender detect, see IoT Device Defender detect feature availability change in the IoT Device Defender Developer Guide. There is no change to IoT Device Defender audit availability.

Lists the targets (thing groups) associated with a given Device Defender security profile.

Requires permission to access the ListTargetsForSecurityProfile action.

See also: AWS API Documentation

Request Syntax

response = client.list_targets_for_security_profile(
    securityProfileName='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • securityProfileName (string) –

    [REQUIRED]

    The security profile.

  • nextToken (string) – The token for the next set of results.

  • maxResults (integer) – The maximum number of results to return at one time.

Return type:

dict

Returns:

Response Syntax

{
    'securityProfileTargets': [
        {
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • securityProfileTargets (list) –

      The thing groups to which the security profile is attached.

      • (dict) –

        A target to which an alert is sent when a security profile behavior is violated.

        • arn (string) –

          The ARN of the security profile.

    • nextToken (string) –

      A token that can be used to retrieve the next set of results, or null if there are no additional results.

Exceptions

  • IoT.Client.exceptions.InvalidRequestException

  • IoT.Client.exceptions.ResourceNotFoundException

  • IoT.Client.exceptions.ThrottlingException

  • IoT.Client.exceptions.InternalFailureException