describeDocument method
Describes the specified Systems Manager document.
May throw InternalServerError. May throw InvalidDocument. May throw InvalidDocumentVersion.
Parameter name
:
The name of the Systems Manager document.
Parameter documentVersion
:
The document version for which you want information. Can be a specific
version or the default version.
Parameter versionName
:
An optional field specifying the version of the artifact associated with
the document. For example, "Release 12, Update 6". This value is unique
across all versions of a document, and cannot be changed.
Implementation
Future<DescribeDocumentResult> describeDocument({
required String name,
String? documentVersion,
String? versionName,
}) async {
ArgumentError.checkNotNull(name, 'name');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.DescribeDocument'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (documentVersion != null) 'DocumentVersion': documentVersion,
if (versionName != null) 'VersionName': versionName,
},
);
return DescribeDocumentResult.fromJson(jsonResponse.body);
}