UpdateDocumentMetadataCommand

Updates information related to approval reviews for a specific version of a change template in Change Manager.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SSMClient, UpdateDocumentMetadataCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, UpdateDocumentMetadataCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // UpdateDocumentMetadataRequest
  Name: "STRING_VALUE", // required
  DocumentVersion: "STRING_VALUE",
  DocumentReviews: { // DocumentReviews
    Action: "SendForReview" || "UpdateReview" || "Approve" || "Reject", // required
    Comment: [ // DocumentReviewCommentList
      { // DocumentReviewCommentSource
        Type: "Comment",
        Content: "STRING_VALUE",
      },
    ],
  },
};
const command = new UpdateDocumentMetadataCommand(input);
const response = await client.send(command);
// {};

UpdateDocumentMetadataCommand Input

Parameter
Type
Description
DocumentReviews
Required
DocumentReviews | undefined

The change template review details to update.

Name
Required
string | undefined

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

DocumentVersion
string | undefined

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

UpdateDocumentMetadataCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalServerError
server

An error occurred on the server side.

InvalidDocument
client

The specified SSM document doesn't exist.

InvalidDocumentOperation
client

You attempted to delete a document while it is still shared. You must stop sharing the document before you can delete it.

InvalidDocumentVersion
client

The document version isn't valid or doesn't exist.

SSMServiceException
Base exception class for all service exceptions from SSM service.