deregisterPatchBaselineForPatchGroup method

Future<DeregisterPatchBaselineForPatchGroupResult> deregisterPatchBaselineForPatchGroup({
  1. required String baselineId,
  2. required String patchGroup,
})

Removes a patch group from a patch baseline.

May throw InvalidResourceId. May throw InternalServerError.

Parameter baselineId : The ID of the patch baseline to deregister the patch group from.

Parameter patchGroup : The name of the patch group that should be deregistered from the patch baseline.

Implementation

Future<DeregisterPatchBaselineForPatchGroupResult>
    deregisterPatchBaselineForPatchGroup({
  required String baselineId,
  required String patchGroup,
}) async {
  ArgumentError.checkNotNull(baselineId, 'baselineId');
  _s.validateStringLength(
    'baselineId',
    baselineId,
    20,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(patchGroup, 'patchGroup');
  _s.validateStringLength(
    'patchGroup',
    patchGroup,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.DeregisterPatchBaselineForPatchGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'BaselineId': baselineId,
      'PatchGroup': patchGroup,
    },
  );

  return DeregisterPatchBaselineForPatchGroupResult.fromJson(
      jsonResponse.body);
}