registerPatchBaselineForPatchGroup method
Registers a patch baseline for a patch group.
May throw AlreadyExistsException. May throw DoesNotExistException. May throw InvalidResourceId. May throw ResourceLimitExceededException. May throw InternalServerError.
Parameter baselineId
:
The ID of the patch baseline to register the patch group with.
Parameter patchGroup
:
The name of the patch group that should be registered with the patch
baseline.
Implementation
Future<RegisterPatchBaselineForPatchGroupResult>
registerPatchBaselineForPatchGroup({
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.RegisterPatchBaselineForPatchGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BaselineId': baselineId,
'PatchGroup': patchGroup,
},
);
return RegisterPatchBaselineForPatchGroupResult.fromJson(jsonResponse.body);
}