v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-141381,185842.7 KB

Gets the contents of the specified Amazon Web Services Systems Manager document (SSM document).

post/#X-Amz-Target=AmazonSSM.GetDocument

Headers

X-Amz-Target'AmazonSSM.GetDocument' required

Request body

Namestring required

The name of the SSM document.

VersionNamestring

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 can't be changed.

DocumentVersionstring

The document version for which you want information.

DocumentFormat'YAML' | 'JSON' | 'TEXT'

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

Response

Success

Namestring

The name of the SSM document.

CreatedDatestring date-time

The date the SSM document was created.

DisplayNamestring

The friendly name of the SSM document. This value can differ for each version of the document. If you want to update this value, see <a>UpdateDocument</a>.

VersionNamestring

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 can't be changed.

DocumentVersionstring

The document version.

Status'Creating' | 'Active' | 'Updating' | 'Deleting' | 'Failed'

The status of the SSM document, such as <code>Creating</code>, <code>Active</code>, <code>Updating</code>, <code>Failed</code>, and <code>Deleting</code>.

StatusInformationstring

A message returned by Amazon Web Services Systems Manager that explains the <code>Status</code> value. For example, a <code>Failed</code> status might be explained by the <code>StatusInformation</code> message, "The specified S3 bucket doesn't exist. Verify that the URL of the S3 bucket is correct."

Contentstring

The contents of the SSM document.

DocumentType'Command' | 'Policy' | 'Automation' | 'Session' | 'Package' | 'ApplicationConfiguration' | 'ApplicationConfigurationSchema' | 'DeploymentStrategy' | 'ChangeCalendar' | 'Automation.ChangeTemplate' | 'ProblemAnalysis' | 'ProblemAnalysisTemplate' | 'CloudFormation' | 'ConformancePackTemplate' | 'QuickSetup'

The document type.

DocumentFormat'YAML' | 'JSON' | 'TEXT'

The document format, either JSON or YAML.

ReviewStatus'APPROVED' | 'NOT_REVIEWED' | 'PENDING' | 'REJECTED'
<p>The current review status of a new custom Systems Manager document (SSM document) created by a member of your organization, or of the latest version of an existing SSM document.</p> <p>Only one version of an SSM document can be in the APPROVED state at a time. When a new version is approved, the status of the previous version changes to REJECTED.</p> <p>Only one version of an SSM document can be in review, or PENDING, at a time.</p>