getDeployablePatchSnapshotForInstance method
Retrieves the current snapshot for the patch baseline the managed node
uses. This API is primarily used by the AWS-RunPatchBaseline
Systems Manager document (SSM document).
May throw InternalServerError.
May throw UnsupportedFeatureRequiredException.
May throw UnsupportedOperatingSystem.
Parameter instanceId :
The ID of the managed node for which the appropriate patch snapshot should
be retrieved.
Parameter snapshotId :
The snapshot ID provided by the user when running
AWS-RunPatchBaseline.
Parameter baselineOverride :
Defines the basic information about a patch baseline override.
Parameter useS3DualStackEndpoint :
Specifies whether to use S3 dualstack endpoints for the patch snapshot
download URL. Set to true to receive a presigned URL that
supports both IPv4 and IPv6 connectivity. Set to false to use
standard IPv4-only endpoints. Default is false. This
parameter is required for managed nodes in IPv6-only environments.
Implementation
Future<GetDeployablePatchSnapshotForInstanceResult>
getDeployablePatchSnapshotForInstance({
required String instanceId,
required String snapshotId,
BaselineOverride? baselineOverride,
bool? useS3DualStackEndpoint,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.GetDeployablePatchSnapshotForInstance'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'InstanceId': instanceId,
'SnapshotId': snapshotId,
if (baselineOverride != null) 'BaselineOverride': baselineOverride,
if (useS3DualStackEndpoint != null)
'UseS3DualStackEndpoint': useS3DualStackEndpoint,
},
);
return GetDeployablePatchSnapshotForInstanceResult.fromJson(
jsonResponse.body);
}