Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

GetDocument

Gets the contents of the specified Systems Manager document.

Request Syntax

{ "DocumentFormat": "string", "DocumentVersion": "string", "Name": "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

Response Syntax

{ "Content": "string", "DocumentFormat": "string", "DocumentType": "string", "DocumentVersion": "string", "Name": "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.

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

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}$

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: 400

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: