registerDefaultPatchBaseline method

Future<RegisterDefaultPatchBaselineResult> registerDefaultPatchBaseline({
  1. required String baselineId,
})

Defines the default patch baseline for the relevant operating system.

To reset the AWS predefined patch baseline as the default, specify the full patch baseline ARN as the baseline ID value. For example, for CentOS, specify arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0574b43a65ea646ed instead of pb-0574b43a65ea646ed.

May throw InvalidResourceId. May throw DoesNotExistException. May throw InternalServerError.

Parameter baselineId : The ID of the patch baseline that should be the default patch baseline.

Implementation

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

  return RegisterDefaultPatchBaselineResult.fromJson(jsonResponse.body);
}