selectResourceConfig method

Future<SelectResourceConfigResponse> selectResourceConfig({
  1. required String expression,
  2. int? limit,
  3. String? nextToken,
})

Accepts a structured query language (SQL) SELECT command, 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 InvalidLimitException. May throw InvalidNextTokenException.

Parameter expression : The SQL query SELECT command.

Parameter limit : The maximum number of query results returned on each page.

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<SelectResourceConfigResponse> selectResourceConfig({
  required String expression,
  int? limit,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(expression, 'expression');
  _s.validateStringLength(
    'expression',
    expression,
    1,
    4096,
    isRequired: true,
  );
  _s.validateNumRange(
    'limit',
    limit,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.SelectResourceConfig'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Expression': expression,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return SelectResourceConfigResponse.fromJson(jsonResponse.body);
}