AWS Systems Manager
API Reference (API Version 2014-11-06)
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

GetDocument

Gets the contents of the specified Systems Manager document.

Request Syntax

{ "DocumentFormat": "string", "DocumentVersion": "string", "Name": "string", "VersionName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DocumentFormat

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

Type: String

Valid Values: YAML | JSON

Required: No

DocumentVersion

The document version for which you want information.

Type: String

Pattern: ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)

Required: No

Name

The name of the Systems Manager document.

Type: String

Pattern: ^[a-zA-Z0-9_\-.:/]{3,128}$

Required: Yes

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.

Type: String

Pattern: ^[a-zA-Z0-9_\-.]{1,128}$

Required: No

Response Syntax

{ "AttachmentsContent": [ { "Hash": "string", "HashType": "string", "Name": "string", "Size": number, "Url": "string" } ], "Content": "string", "DocumentFormat": "string", "DocumentType": "string", "DocumentVersion": "string", "Name": "string", "Status": "string", "StatusInformation": "string", "VersionName": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AttachmentsContent

A description of the document attachments, including names, locations, sizes, etc.

Type: Array of AttachmentContent objects

Content

The contents of the Systems Manager document.

Type: String

Length Constraints: Minimum length of 1.

DocumentFormat

The document format, either JSON or YAML.

Type: String

Valid Values: YAML | JSON

DocumentType

The document type.

Type: String

Valid Values: Command | Policy | Automation | Session | Package

DocumentVersion

The document version.

Type: String

Pattern: ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)

Name

The name of the Systems Manager document.

Type: String

Pattern: ^[a-zA-Z0-9_\-.:/]{3,128}$

Status

The status of the Systems Manager document, such as Creating, Active, Updating, Failed, and Deleting.

Type: String

Valid Values: Creating | Active | Updating | Deleting | Failed

StatusInformation

A message returned by AWS Systems Manager that explains the Status value. For example, a Failed status might be explained by the StatusInformation message, "The specified S3 bucket does not exist. Verify that the URL of the S3 bucket is correct."

Type: String

VersionName

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.

Type: String

Pattern: ^[a-zA-Z0-9_\-.]{1,128}$

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

InvalidDocument

The specified document does not exist.

HTTP Status Code: 400

InvalidDocumentVersion

The document version is not valid or does not exist.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: