aws_sdk_ssm/client/
get_document.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetDocument`](crate::operation::get_document::builders::GetDocumentFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::set_name):<br>required: **true**<br><p>The name of the SSM document.</p><br>
7    ///   - [`version_name(impl Into<String>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::version_name) / [`set_version_name(Option<String>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::set_version_name):<br>required: **false**<br><p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document and can't be changed.</p><br>
8    ///   - [`document_version(impl Into<String>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::document_version) / [`set_document_version(Option<String>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::set_document_version):<br>required: **false**<br><p>The document version for which you want information.</p><br>
9    ///   - [`document_format(DocumentFormat)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::document_format) / [`set_document_format(Option<DocumentFormat>)`](crate::operation::get_document::builders::GetDocumentFluentBuilder::set_document_format):<br>required: **false**<br><p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p><br>
10    /// - On success, responds with [`GetDocumentOutput`](crate::operation::get_document::GetDocumentOutput) with field(s):
11    ///   - [`name(Option<String>)`](crate::operation::get_document::GetDocumentOutput::name): <p>The name of the SSM document.</p>
12    ///   - [`created_date(Option<DateTime>)`](crate::operation::get_document::GetDocumentOutput::created_date): <p>The date the SSM document was created.</p>
13    ///   - [`display_name(Option<String>)`](crate::operation::get_document::GetDocumentOutput::display_name): <p>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 <code>UpdateDocument</code>.</p>
14    ///   - [`version_name(Option<String>)`](crate::operation::get_document::GetDocumentOutput::version_name): <p>The version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
15    ///   - [`document_version(Option<String>)`](crate::operation::get_document::GetDocumentOutput::document_version): <p>The document version.</p>
16    ///   - [`status(Option<DocumentStatus>)`](crate::operation::get_document::GetDocumentOutput::status): <p>The status of the SSM document, such as <code>Creating</code>, <code>Active</code>, <code>Updating</code>, <code>Failed</code>, and <code>Deleting</code>.</p>
17    ///   - [`status_information(Option<String>)`](crate::operation::get_document::GetDocumentOutput::status_information): <p>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."</p>
18    ///   - [`content(Option<String>)`](crate::operation::get_document::GetDocumentOutput::content): <p>The contents of the SSM document.</p>
19    ///   - [`document_type(Option<DocumentType>)`](crate::operation::get_document::GetDocumentOutput::document_type): <p>The document type.</p>
20    ///   - [`document_format(Option<DocumentFormat>)`](crate::operation::get_document::GetDocumentOutput::document_format): <p>The document format, either JSON or YAML.</p>
21    ///   - [`requires(Option<Vec::<DocumentRequires>>)`](crate::operation::get_document::GetDocumentOutput::requires): <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
22    ///   - [`attachments_content(Option<Vec::<AttachmentContent>>)`](crate::operation::get_document::GetDocumentOutput::attachments_content): <p>A description of the document attachments, including names, locations, sizes, and so on.</p>
23    ///   - [`review_status(Option<ReviewStatus>)`](crate::operation::get_document::GetDocumentOutput::review_status): <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>
24    /// - On failure, responds with [`SdkError<GetDocumentError>`](crate::operation::get_document::GetDocumentError)
25    pub fn get_document(&self) -> crate::operation::get_document::builders::GetDocumentFluentBuilder {
26        crate::operation::get_document::builders::GetDocumentFluentBuilder::new(self.handle.clone())
27    }
28}