describeMaintenanceWindowTargets method
Future<DescribeMaintenanceWindowTargetsResult>
describeMaintenanceWindowTargets({
- required String windowId,
- List<
MaintenanceWindowFilter> ? filters, - int? maxResults,
- String? nextToken,
Lists the targets registered with the maintenance window.
May throw DoesNotExistException. May throw InternalServerError.
Parameter windowId
:
The ID of the maintenance window whose targets should be retrieved.
Parameter filters
:
Optional filters that can be used to narrow down the scope of the returned
window targets. The supported filter keys are Type, WindowTargetId and
OwnerInformation.
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.)
Implementation
Future<DescribeMaintenanceWindowTargetsResult>
describeMaintenanceWindowTargets({
required String windowId,
List<MaintenanceWindowFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(windowId, 'windowId');
_s.validateStringLength(
'windowId',
windowId,
20,
20,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
10,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.DescribeMaintenanceWindowTargets'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'WindowId': windowId,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeMaintenanceWindowTargetsResult.fromJson(jsonResponse.body);
}