get_document
(**kwargs)¶Gets the contents of the specified Amazon Web Services Systems Manager document (SSM document).
See also: AWS API Documentation
Request Syntax
response = client.get_document(
Name='string',
VersionName='string',
DocumentVersion='string',
DocumentFormat='YAML'|'JSON'|'TEXT'
)
[REQUIRED]
The name of the SSM document.
dict
Response Syntax
{
'Name': 'string',
'CreatedDate': datetime(2015, 1, 1),
'DisplayName': 'string',
'VersionName': 'string',
'DocumentVersion': 'string',
'Status': 'Creating'|'Active'|'Updating'|'Deleting'|'Failed',
'StatusInformation': 'string',
'Content': 'string',
'DocumentType': 'Command'|'Policy'|'Automation'|'Session'|'Package'|'ApplicationConfiguration'|'ApplicationConfigurationSchema'|'DeploymentStrategy'|'ChangeCalendar'|'Automation.ChangeTemplate'|'ProblemAnalysis'|'ProblemAnalysisTemplate'|'CloudFormation'|'ConformancePackTemplate'|'QuickSetup',
'DocumentFormat': 'YAML'|'JSON'|'TEXT',
'Requires': [
{
'Name': 'string',
'Version': 'string',
'RequireType': 'string',
'VersionName': 'string'
},
],
'AttachmentsContent': [
{
'Name': 'string',
'Size': 123,
'Hash': 'string',
'HashType': 'Sha256',
'Url': 'string'
},
],
'ReviewStatus': 'APPROVED'|'NOT_REVIEWED'|'PENDING'|'REJECTED'
}
Response Structure
(dict) --
Name (string) --
The name of the SSM document.
CreatedDate (datetime) --
The date the SSM document was created.
DisplayName (string) --
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 UpdateDocument.
VersionName (string) --
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.
DocumentVersion (string) --
The document version.
Status (string) --
The status of the SSM document, such as Creating
, Active
, Updating
, Failed
, and Deleting
.
StatusInformation (string) --
A message returned by Amazon Web Services Systems Manager that explains the Status
value. For example, a Failed
status might be explained by the StatusInformation
message, "The specified S3 bucket doesn't exist. Verify that the URL of the S3 bucket is correct."
Content (string) --
The contents of the SSM document.
DocumentType (string) --
The document type.
DocumentFormat (string) --
The document format, either JSON or YAML.
Requires (list) --
A list of SSM documents required by a document. For example, an ApplicationConfiguration
document requires an ApplicationConfigurationSchema
document.
(dict) --
An SSM document required by the current document.
Name (string) --
The name of the required SSM document. The name can be an Amazon Resource Name (ARN).
Version (string) --
The document version required by the current document.
RequireType (string) --
The document type of the required SSM document.
VersionName (string) --
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.
AttachmentsContent (list) --
A description of the document attachments, including names, locations, sizes, and so on.
(dict) --
A structure that includes attributes that describe a document attachment.
Name (string) --
The name of an attachment.
Size (integer) --
The size of an attachment in bytes.
Hash (string) --
The cryptographic hash value of the document content.
HashType (string) --
The hash algorithm used to calculate the hash value.
Url (string) --
The URL location of the attachment content.
ReviewStatus (string) --
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.
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.
Only one version of an SSM document can be in review, or PENDING, at a time.
Exceptions
SSM.Client.exceptions.InternalServerError
SSM.Client.exceptions.InvalidDocument
SSM.Client.exceptions.InvalidDocumentVersion