listSecurityProfilesForTarget method
Lists the Device Defender security profiles attached to a target (thing group).
May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceNotFoundException.
Parameter securityProfileTargetArn
:
The ARN of the target (thing group) whose attached security profiles you
want to get.
Parameter maxResults
:
The maximum number of results to return at one time.
Parameter nextToken
:
The token for the next set of results.
Parameter recursive
:
If true, return child groups too.
Implementation
Future<ListSecurityProfilesForTargetResponse> listSecurityProfilesForTarget({
required String securityProfileTargetArn,
int? maxResults,
String? nextToken,
bool? recursive,
}) async {
ArgumentError.checkNotNull(
securityProfileTargetArn, 'securityProfileTargetArn');
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
'securityProfileTargetArn': [securityProfileTargetArn],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (recursive != null) 'recursive': [recursive.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/security-profiles-for-target',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListSecurityProfilesForTargetResponse.fromJson(response);
}