listDomainMaintenances method

Future<ListDomainMaintenancesResponse> listDomainMaintenances({
  1. required String domainName,
  2. MaintenanceType? action,
  3. int? maxResults,
  4. String? nextToken,
  5. MaintenanceStatus? status,
})

A list of maintenance actions for the domain.

May throw BaseException. May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainName : The name of the domain.

Parameter action : The name of the action.

Parameter maxResults : An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results.

Parameter nextToken : If your initial ListDomainMaintenances operation returns a nextToken, include the returned nextToken in subsequent ListDomainMaintenances operations, which returns results in the next page.

Parameter status : The status of the action.

Implementation

Future<ListDomainMaintenancesResponse> listDomainMaintenances({
  required String domainName,
  MaintenanceType? action,
  int? maxResults,
  String? nextToken,
  MaintenanceStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $query = <String, List<String>>{
    if (action != null) 'action': [action.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (status != null) 'status': [status.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/domainMaintenances',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDomainMaintenancesResponse.fromJson(response);
}