selectAggregateResourceConfig method
Accepts a structured query language (SQL) SELECT command and an aggregator to query configuration state of AWS resources across multiple accounts and regions, performs the corresponding search, and returns resource configurations matching the properties.
For more information about query components, see the Query Components section in the AWS Config Developer Guide.
May throw InvalidExpressionException. May throw NoSuchConfigurationAggregatorException. May throw InvalidLimitException. May throw InvalidNextTokenException.
Parameter configurationAggregatorName
:
The name of the configuration aggregator.
Parameter expression
:
The SQL query SELECT command.
Parameter limit
:
The maximum number of query results returned on each page.
Parameter maxResults
:
The maximum number of query results returned on each page. AWS Config also
allows the Limit request parameter.
Parameter nextToken
:
The nextToken string returned in a previous request that you use to
request the next page of results in a paginated response.
Implementation
Future<SelectAggregateResourceConfigResponse> selectAggregateResourceConfig({
required String configurationAggregatorName,
required String expression,
int? limit,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(
configurationAggregatorName, 'configurationAggregatorName');
_s.validateStringLength(
'configurationAggregatorName',
configurationAggregatorName,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(expression, 'expression');
_s.validateStringLength(
'expression',
expression,
1,
4096,
isRequired: true,
);
_s.validateNumRange(
'limit',
limit,
0,
100,
);
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StarlingDoveService.SelectAggregateResourceConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ConfigurationAggregatorName': configurationAggregatorName,
'Expression': expression,
if (limit != null) 'Limit': limit,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return SelectAggregateResourceConfigResponse.fromJson(jsonResponse.body);
}