updateDocumentDefaultVersion method
Set the default version of a document.
May throw InternalServerError. May throw InvalidDocument. May throw InvalidDocumentVersion. May throw InvalidDocumentSchemaVersion.
Parameter documentVersion
:
The version of a custom document that you want to set as the default
version.
Parameter name
:
The name of a custom document that you want to set as the default version.
Implementation
Future<UpdateDocumentDefaultVersionResult> updateDocumentDefaultVersion({
required String documentVersion,
required String name,
}) async {
ArgumentError.checkNotNull(documentVersion, 'documentVersion');
ArgumentError.checkNotNull(name, 'name');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.UpdateDocumentDefaultVersion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DocumentVersion': documentVersion,
'Name': name,
},
);
return UpdateDocumentDefaultVersionResult.fromJson(jsonResponse.body);
}