describeMaintenanceWindowSchedule method

Future<DescribeMaintenanceWindowScheduleResult> describeMaintenanceWindowSchedule({
  1. List<PatchOrchestratorFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
  4. MaintenanceWindowResourceType? resourceType,
  5. List<Target>? targets,
  6. String? windowId,
})

Retrieves information about upcoming executions of a maintenance window.

May throw InternalServerError. May throw DoesNotExistException.

Parameter filters : Filters used to limit the range of results. For example, you can limit maintenance window executions to only those scheduled before or after a certain date and time.

Parameter maxResults : The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Parameter nextToken : The token for the next set of items to return. (You received this token from a previous call.)

Parameter resourceType : The type of resource you want to retrieve information about. For example, "INSTANCE".

Parameter targets : The instance ID or key/value pair to retrieve information about.

Parameter windowId : The ID of the maintenance window to retrieve information about.

Implementation

Future<DescribeMaintenanceWindowScheduleResult>
    describeMaintenanceWindowSchedule({
  List<PatchOrchestratorFilter>? filters,
  int? maxResults,
  String? nextToken,
  MaintenanceWindowResourceType? resourceType,
  List<Target>? targets,
  String? windowId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1152921504606846976,
  );
  _s.validateStringLength(
    'windowId',
    windowId,
    20,
    20,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.DescribeMaintenanceWindowSchedule'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (resourceType != null) 'ResourceType': resourceType.toValue(),
      if (targets != null) 'Targets': targets,
      if (windowId != null) 'WindowId': windowId,
    },
  );

  return DescribeMaintenanceWindowScheduleResult.fromJson(jsonResponse.body);
}