listSecurityProfiles method
Lists the Device Defender security profiles you've created. You can filter security profiles by dimension or custom metric.
May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceNotFoundException.
Parameter dimensionName
:
A filter to limit results to the security profiles that use the defined
dimension. Cannot be used with metricName
Parameter maxResults
:
The maximum number of results to return at one time.
Parameter metricName
:
The name of the custom metric. Cannot be used with
dimensionName
.
Parameter nextToken
:
The token for the next set of results.
Implementation
Future<ListSecurityProfilesResponse> listSecurityProfiles({
String? dimensionName,
int? maxResults,
String? metricName,
String? nextToken,
}) async {
_s.validateStringLength(
'dimensionName',
dimensionName,
1,
128,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
_s.validateStringLength(
'metricName',
metricName,
1,
128,
);
final $query = <String, List<String>>{
if (dimensionName != null) 'dimensionName': [dimensionName],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (metricName != null) 'metricName': [metricName],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/security-profiles',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListSecurityProfilesResponse.fromJson(response);
}