updateDocumentMetadata method

Future<void> updateDocumentMetadata({
  1. required DocumentReviews documentReviews,
  2. required String name,
  3. String? documentVersion,
})
Updates information related to approval reviews for a specific version of a change template in Change Manager.

May throw InternalServerError. May throw InvalidDocument. May throw InvalidDocumentOperation. May throw InvalidDocumentVersion. May throw TooManyUpdates.

Parameter documentReviews : The change template review details to update.

Parameter name : The name of the change template for which a version's metadata is to be updated.

Parameter documentVersion : The version of a change template in which to update approval metadata.

Implementation

Future<void> updateDocumentMetadata({
  required DocumentReviews documentReviews,
  required String name,
  String? documentVersion,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.UpdateDocumentMetadata'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DocumentReviews': documentReviews,
      'Name': name,
      if (documentVersion != null) 'DocumentVersion': documentVersion,
    },
  );
}