describeInstancePatches method
Future<DescribeInstancePatchesResult>
describeInstancePatches({
- required String instanceId,
- List<
PatchOrchestratorFilter> ? filters, - int? maxResults,
- String? nextToken,
Retrieves information about the patches on the specified instance and their state relative to the patch baseline being used for the instance.
May throw InternalServerError. May throw InvalidInstanceId. May throw InvalidFilter. May throw InvalidNextToken.
Parameter instanceId
:
The ID of the instance whose patch state information should be retrieved.
Parameter filters
:
An array of structures. Each entry in the array is a structure containing
a Key, Value combination. Valid values for Key are
Classification
| KBId
| Severity
|
State
.
Parameter maxResults
:
The maximum number of patches to return (per page).
Parameter nextToken
:
The token for the next set of items to return. (You received this token
from a previous call.)
Implementation
Future<DescribeInstancePatchesResult> describeInstancePatches({
required String instanceId,
List<PatchOrchestratorFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(instanceId, 'instanceId');
_s.validateNumRange(
'maxResults',
maxResults,
10,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.DescribeInstancePatches'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'InstanceId': instanceId,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeInstancePatchesResult.fromJson(jsonResponse.body);
}