getVariables method

Future<GetVariablesResult> getVariables({
  1. int? maxResults,
  2. String? name,
  3. String? nextToken,
})

Gets all of the variables or the specific variable. This is a paginated API. Providing null maxSizePerPage results in retrieving maximum of 100 records per page. If you provide maxSizePerPage the value must be between 50 and 100. To get the next page result, a provide a pagination token from GetVariablesResult as part of your request. Null pagination token fetches the records from the beginning.

May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.

Parameter maxResults : The max size per page determined for the get variable request.

Parameter name : The name of the variable.

Parameter nextToken : The next page token of the get variable request.

Implementation

Future<GetVariablesResult> getVariables({
  int? maxResults,
  String? name,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    50,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.GetVariables'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'maxResults': maxResults,
      if (name != null) 'name': name,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetVariablesResult.fromJson(jsonResponse.body);
}