describeDocument method
Describes the specified Amazon Web Services Systems Manager document (SSM document).
May throw InternalServerError.
May throw InvalidDocument.
May throw InvalidDocumentVersion.
Parameter name :
The name of the SSM 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, 12.6. This value is unique across all versions
of a document, and can't be changed.
Implementation
Future<DescribeDocumentResult> describeDocument({
required String name,
String? documentVersion,
String? versionName,
}) async {
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);
}