listPlansInRegion method

Future<ListPlansInRegionResponse> listPlansInRegion({
  1. int? maxResults,
  2. String? nextToken,
})

Lists all Region switch plans in your Amazon Web Services account that are available in the current Amazon Web Services Region.

May throw AccessDeniedException.

Parameter maxResults : The number of objects that you want to return with this call.

Parameter nextToken : Specifies that you want to receive the next page of results. Valid only if you received a nextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's nextToken response to request the next page of results.

Implementation

Future<ListPlansInRegionResponse> listPlansInRegion({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'ArcRegionSwitch.ListPlansInRegion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListPlansInRegionResponse.fromJson(jsonResponse.body);
}