getPatchBaselineForPatchGroup method

Future<GetPatchBaselineForPatchGroupResult> getPatchBaselineForPatchGroup({
  1. required String patchGroup,
  2. OperatingSystem? operatingSystem,
})

Retrieves the patch baseline that should be used for the specified patch group.

May throw InternalServerError.

Parameter patchGroup : The name of the patch group whose patch baseline should be retrieved.

Parameter operatingSystem : Returns the operating system rule specified for patch groups using the patch baseline.

Implementation

Future<GetPatchBaselineForPatchGroupResult> getPatchBaselineForPatchGroup({
  required String patchGroup,
  OperatingSystem? operatingSystem,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.GetPatchBaselineForPatchGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'PatchGroup': patchGroup,
      if (operatingSystem != null) 'OperatingSystem': operatingSystem.value,
    },
  );

  return GetPatchBaselineForPatchGroupResult.fromJson(jsonResponse.body);
}