describeInstancePatches method
Retrieves information about the patches on the specified managed node and their state relative to the patch baseline being used for the node.
May throw InternalServerError.
May throw InvalidFilter.
May throw InvalidInstanceId.
May throw InvalidNextToken.
Parameter instanceId :
The ID of the managed node whose patch state information should be
retrieved.
Parameter filters :
Each element in the array is a structure containing a key-value pair.
Supported keys for DescribeInstancePatchesinclude the
following:
-
ClassificationSample values:
Security|SecurityUpdates -
KBIdSample values:
KB4480056|java-1.7.0-openjdk.x86_64 -
SeveritySample values:
Important|Medium|Low -
StateSample values:
Installed|InstalledOther|InstalledPendingRebootFor lists of all
Statevalues, see Patch compliance state values in the Amazon Web Services Systems Manager User Guide.
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 {
_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);
}