describePatchProperties method

Future<DescribePatchPropertiesResult> describePatchProperties({
  1. required OperatingSystem operatingSystem,
  2. required PatchProperty property,
  3. int? maxResults,
  4. String? nextToken,
  5. PatchSet? patchSet,
})

Lists the properties of available patches organized by product, product family, classification, severity, and other properties of available patches. You can use the reported properties in the filters you specify in requests for actions such as CreatePatchBaseline, UpdatePatchBaseline, DescribeAvailablePatches, and DescribePatchBaselines.

The following section lists the properties that can be used in filters for each major operating system type:

AMAZON_LINUX
Valid properties: PRODUCT, CLASSIFICATION, SEVERITY
AMAZON_LINUX_2
Valid properties: PRODUCT, CLASSIFICATION, SEVERITY
CENTOS
Valid properties: PRODUCT, CLASSIFICATION, SEVERITY
DEBIAN
Valid properties: PRODUCT, PRIORITY
MACOS
Valid properties: PRODUCT, CLASSIFICATION
ORACLE_LINUX
Valid properties: PRODUCT, CLASSIFICATION, SEVERITY
REDHAT_ENTERPRISE_LINUX
Valid properties: PRODUCT, CLASSIFICATION, SEVERITY
SUSE
Valid properties: PRODUCT, CLASSIFICATION, SEVERITY
UBUNTU
Valid properties: PRODUCT, PRIORITY
WINDOWS
Valid properties: PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, MSRC_SEVERITY

May throw InternalServerError.

Parameter operatingSystem : The operating system type for which to list patches.

Parameter property : The patch property for which you want to view patch details.

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.)

Parameter patchSet : Indicates whether to list patches for the Windows operating system or for Microsoft applications. Not applicable for the Linux or macOS operating systems.

Implementation

Future<DescribePatchPropertiesResult> describePatchProperties({
  required OperatingSystem operatingSystem,
  required PatchProperty property,
  int? maxResults,
  String? nextToken,
  PatchSet? patchSet,
}) async {
  ArgumentError.checkNotNull(operatingSystem, 'operatingSystem');
  ArgumentError.checkNotNull(property, 'property');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.DescribePatchProperties'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'OperatingSystem': operatingSystem.toValue(),
      'Property': property.toValue(),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (patchSet != null) 'PatchSet': patchSet.toValue(),
    },
  );

  return DescribePatchPropertiesResult.fromJson(jsonResponse.body);
}