aws_sdk_ssm/operation/create_document/
_create_document_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateDocumentInput {
6    /// <p>The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.</p>
7    /// <p>For examples, see the following topics in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
8    /// <ul>
9    /// <li>
10    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-console">Create an SSM document (console)</a></p></li>
11    /// <li>
12    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-cli">Create an SSM document (command line)</a></p></li>
13    /// <li>
14    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-api">Create an SSM document (API)</a></p></li>
15    /// </ul>
16    pub content: ::std::option::Option<::std::string::String>,
17    /// <p>A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document for validation purposes. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html">What is AppConfig?</a> in the <i>AppConfig User Guide</i>.</p>
18    pub requires: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>,
19    /// <p>A list of key-value pairs that describe attachments to a version of a document.</p>
20    pub attachments: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentsSource>>,
21    /// <p>A name for the SSM document.</p><important>
22    /// <p>You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:</p>
23    /// <ul>
24    /// <li>
25    /// <p><code>aws</code></p></li>
26    /// <li>
27    /// <p><code>amazon</code></p></li>
28    /// <li>
29    /// <p><code>amzn</code></p></li>
30    /// <li>
31    /// <p><code>AWSEC2</code></p></li>
32    /// <li>
33    /// <p><code>AWSConfigRemediation</code></p></li>
34    /// <li>
35    /// <p><code>AWSSupport</code></p></li>
36    /// </ul>
37    /// </important>
38    pub name: ::std::option::Option<::std::string::String>,
39    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the <code>UpdateDocument</code> operation.</p>
40    pub display_name: ::std::option::Option<::std::string::String>,
41    /// <p>An optional field specifying the version of the artifact you are creating with the document. For example, <code>Release12.1</code>. This value is unique across all versions of a document, and can't be changed.</p>
42    pub version_name: ::std::option::Option<::std::string::String>,
43    /// <p>The type of document to create.</p><note>
44    /// <p>The <code>DeploymentStrategy</code> document type is an internal-use-only document type reserved for AppConfig.</p>
45    /// </note>
46    pub document_type: ::std::option::Option<crate::types::DocumentType>,
47    /// <p>Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.</p>
48    pub document_format: ::std::option::Option<crate::types::DocumentFormat>,
49    /// <p>Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: <code>/AWS::EC2::Instance</code>. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
50    pub target_type: ::std::option::Option<::std::string::String>,
51    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:</p>
52    /// <ul>
53    /// <li>
54    /// <p><code>Key=OS,Value=Windows</code></p></li>
55    /// <li>
56    /// <p><code>Key=Environment,Value=Production</code></p></li>
57    /// </ul><note>
58    /// <p>To add tags to an existing SSM document, use the <code>AddTagsToResource</code> operation.</p>
59    /// </note>
60    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
61}
62impl CreateDocumentInput {
63    /// <p>The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.</p>
64    /// <p>For examples, see the following topics in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
65    /// <ul>
66    /// <li>
67    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-console">Create an SSM document (console)</a></p></li>
68    /// <li>
69    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-cli">Create an SSM document (command line)</a></p></li>
70    /// <li>
71    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-api">Create an SSM document (API)</a></p></li>
72    /// </ul>
73    pub fn content(&self) -> ::std::option::Option<&str> {
74        self.content.as_deref()
75    }
76    /// <p>A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document for validation purposes. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html">What is AppConfig?</a> in the <i>AppConfig User Guide</i>.</p>
77    ///
78    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requires.is_none()`.
79    pub fn requires(&self) -> &[crate::types::DocumentRequires] {
80        self.requires.as_deref().unwrap_or_default()
81    }
82    /// <p>A list of key-value pairs that describe attachments to a version of a document.</p>
83    ///
84    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attachments.is_none()`.
85    pub fn attachments(&self) -> &[crate::types::AttachmentsSource] {
86        self.attachments.as_deref().unwrap_or_default()
87    }
88    /// <p>A name for the SSM document.</p><important>
89    /// <p>You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:</p>
90    /// <ul>
91    /// <li>
92    /// <p><code>aws</code></p></li>
93    /// <li>
94    /// <p><code>amazon</code></p></li>
95    /// <li>
96    /// <p><code>amzn</code></p></li>
97    /// <li>
98    /// <p><code>AWSEC2</code></p></li>
99    /// <li>
100    /// <p><code>AWSConfigRemediation</code></p></li>
101    /// <li>
102    /// <p><code>AWSSupport</code></p></li>
103    /// </ul>
104    /// </important>
105    pub fn name(&self) -> ::std::option::Option<&str> {
106        self.name.as_deref()
107    }
108    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the <code>UpdateDocument</code> operation.</p>
109    pub fn display_name(&self) -> ::std::option::Option<&str> {
110        self.display_name.as_deref()
111    }
112    /// <p>An optional field specifying the version of the artifact you are creating with the document. For example, <code>Release12.1</code>. This value is unique across all versions of a document, and can't be changed.</p>
113    pub fn version_name(&self) -> ::std::option::Option<&str> {
114        self.version_name.as_deref()
115    }
116    /// <p>The type of document to create.</p><note>
117    /// <p>The <code>DeploymentStrategy</code> document type is an internal-use-only document type reserved for AppConfig.</p>
118    /// </note>
119    pub fn document_type(&self) -> ::std::option::Option<&crate::types::DocumentType> {
120        self.document_type.as_ref()
121    }
122    /// <p>Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.</p>
123    pub fn document_format(&self) -> ::std::option::Option<&crate::types::DocumentFormat> {
124        self.document_format.as_ref()
125    }
126    /// <p>Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: <code>/AWS::EC2::Instance</code>. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
127    pub fn target_type(&self) -> ::std::option::Option<&str> {
128        self.target_type.as_deref()
129    }
130    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:</p>
131    /// <ul>
132    /// <li>
133    /// <p><code>Key=OS,Value=Windows</code></p></li>
134    /// <li>
135    /// <p><code>Key=Environment,Value=Production</code></p></li>
136    /// </ul><note>
137    /// <p>To add tags to an existing SSM document, use the <code>AddTagsToResource</code> operation.</p>
138    /// </note>
139    ///
140    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
141    pub fn tags(&self) -> &[crate::types::Tag] {
142        self.tags.as_deref().unwrap_or_default()
143    }
144}
145impl CreateDocumentInput {
146    /// Creates a new builder-style object to manufacture [`CreateDocumentInput`](crate::operation::create_document::CreateDocumentInput).
147    pub fn builder() -> crate::operation::create_document::builders::CreateDocumentInputBuilder {
148        crate::operation::create_document::builders::CreateDocumentInputBuilder::default()
149    }
150}
151
152/// A builder for [`CreateDocumentInput`](crate::operation::create_document::CreateDocumentInput).
153#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
154#[non_exhaustive]
155pub struct CreateDocumentInputBuilder {
156    pub(crate) content: ::std::option::Option<::std::string::String>,
157    pub(crate) requires: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>,
158    pub(crate) attachments: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentsSource>>,
159    pub(crate) name: ::std::option::Option<::std::string::String>,
160    pub(crate) display_name: ::std::option::Option<::std::string::String>,
161    pub(crate) version_name: ::std::option::Option<::std::string::String>,
162    pub(crate) document_type: ::std::option::Option<crate::types::DocumentType>,
163    pub(crate) document_format: ::std::option::Option<crate::types::DocumentFormat>,
164    pub(crate) target_type: ::std::option::Option<::std::string::String>,
165    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
166}
167impl CreateDocumentInputBuilder {
168    /// <p>The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.</p>
169    /// <p>For examples, see the following topics in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
170    /// <ul>
171    /// <li>
172    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-console">Create an SSM document (console)</a></p></li>
173    /// <li>
174    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-cli">Create an SSM document (command line)</a></p></li>
175    /// <li>
176    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-api">Create an SSM document (API)</a></p></li>
177    /// </ul>
178    /// This field is required.
179    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.content = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.</p>
184    /// <p>For examples, see the following topics in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
185    /// <ul>
186    /// <li>
187    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-console">Create an SSM document (console)</a></p></li>
188    /// <li>
189    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-cli">Create an SSM document (command line)</a></p></li>
190    /// <li>
191    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-api">Create an SSM document (API)</a></p></li>
192    /// </ul>
193    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.content = input;
195        self
196    }
197    /// <p>The content for the new SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.</p>
198    /// <p>For examples, see the following topics in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
199    /// <ul>
200    /// <li>
201    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-console">Create an SSM document (console)</a></p></li>
202    /// <li>
203    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-cli">Create an SSM document (command line)</a></p></li>
204    /// <li>
205    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-api">Create an SSM document (API)</a></p></li>
206    /// </ul>
207    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
208        &self.content
209    }
210    /// Appends an item to `requires`.
211    ///
212    /// To override the contents of this collection use [`set_requires`](Self::set_requires).
213    ///
214    /// <p>A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document for validation purposes. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html">What is AppConfig?</a> in the <i>AppConfig User Guide</i>.</p>
215    pub fn requires(mut self, input: crate::types::DocumentRequires) -> Self {
216        let mut v = self.requires.unwrap_or_default();
217        v.push(input);
218        self.requires = ::std::option::Option::Some(v);
219        self
220    }
221    /// <p>A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document for validation purposes. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html">What is AppConfig?</a> in the <i>AppConfig User Guide</i>.</p>
222    pub fn set_requires(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>) -> Self {
223        self.requires = input;
224        self
225    }
226    /// <p>A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user creates an AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document for validation purposes. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html">What is AppConfig?</a> in the <i>AppConfig User Guide</i>.</p>
227    pub fn get_requires(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>> {
228        &self.requires
229    }
230    /// Appends an item to `attachments`.
231    ///
232    /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
233    ///
234    /// <p>A list of key-value pairs that describe attachments to a version of a document.</p>
235    pub fn attachments(mut self, input: crate::types::AttachmentsSource) -> Self {
236        let mut v = self.attachments.unwrap_or_default();
237        v.push(input);
238        self.attachments = ::std::option::Option::Some(v);
239        self
240    }
241    /// <p>A list of key-value pairs that describe attachments to a version of a document.</p>
242    pub fn set_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentsSource>>) -> Self {
243        self.attachments = input;
244        self
245    }
246    /// <p>A list of key-value pairs that describe attachments to a version of a document.</p>
247    pub fn get_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttachmentsSource>> {
248        &self.attachments
249    }
250    /// <p>A name for the SSM document.</p><important>
251    /// <p>You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:</p>
252    /// <ul>
253    /// <li>
254    /// <p><code>aws</code></p></li>
255    /// <li>
256    /// <p><code>amazon</code></p></li>
257    /// <li>
258    /// <p><code>amzn</code></p></li>
259    /// <li>
260    /// <p><code>AWSEC2</code></p></li>
261    /// <li>
262    /// <p><code>AWSConfigRemediation</code></p></li>
263    /// <li>
264    /// <p><code>AWSSupport</code></p></li>
265    /// </ul>
266    /// </important>
267    /// This field is required.
268    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269        self.name = ::std::option::Option::Some(input.into());
270        self
271    }
272    /// <p>A name for the SSM document.</p><important>
273    /// <p>You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:</p>
274    /// <ul>
275    /// <li>
276    /// <p><code>aws</code></p></li>
277    /// <li>
278    /// <p><code>amazon</code></p></li>
279    /// <li>
280    /// <p><code>amzn</code></p></li>
281    /// <li>
282    /// <p><code>AWSEC2</code></p></li>
283    /// <li>
284    /// <p><code>AWSConfigRemediation</code></p></li>
285    /// <li>
286    /// <p><code>AWSSupport</code></p></li>
287    /// </ul>
288    /// </important>
289    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
290        self.name = input;
291        self
292    }
293    /// <p>A name for the SSM document.</p><important>
294    /// <p>You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use as document name prefixes:</p>
295    /// <ul>
296    /// <li>
297    /// <p><code>aws</code></p></li>
298    /// <li>
299    /// <p><code>amazon</code></p></li>
300    /// <li>
301    /// <p><code>amzn</code></p></li>
302    /// <li>
303    /// <p><code>AWSEC2</code></p></li>
304    /// <li>
305    /// <p><code>AWSConfigRemediation</code></p></li>
306    /// <li>
307    /// <p><code>AWSSupport</code></p></li>
308    /// </ul>
309    /// </important>
310    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
311        &self.name
312    }
313    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the <code>UpdateDocument</code> operation.</p>
314    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315        self.display_name = ::std::option::Option::Some(input.into());
316        self
317    }
318    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the <code>UpdateDocument</code> operation.</p>
319    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320        self.display_name = input;
321        self
322    }
323    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. You can update this value at a later time using the <code>UpdateDocument</code> operation.</p>
324    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
325        &self.display_name
326    }
327    /// <p>An optional field specifying the version of the artifact you are creating with the document. For example, <code>Release12.1</code>. This value is unique across all versions of a document, and can't be changed.</p>
328    pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
329        self.version_name = ::std::option::Option::Some(input.into());
330        self
331    }
332    /// <p>An optional field specifying the version of the artifact you are creating with the document. For example, <code>Release12.1</code>. This value is unique across all versions of a document, and can't be changed.</p>
333    pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
334        self.version_name = input;
335        self
336    }
337    /// <p>An optional field specifying the version of the artifact you are creating with the document. For example, <code>Release12.1</code>. This value is unique across all versions of a document, and can't be changed.</p>
338    pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
339        &self.version_name
340    }
341    /// <p>The type of document to create.</p><note>
342    /// <p>The <code>DeploymentStrategy</code> document type is an internal-use-only document type reserved for AppConfig.</p>
343    /// </note>
344    pub fn document_type(mut self, input: crate::types::DocumentType) -> Self {
345        self.document_type = ::std::option::Option::Some(input);
346        self
347    }
348    /// <p>The type of document to create.</p><note>
349    /// <p>The <code>DeploymentStrategy</code> document type is an internal-use-only document type reserved for AppConfig.</p>
350    /// </note>
351    pub fn set_document_type(mut self, input: ::std::option::Option<crate::types::DocumentType>) -> Self {
352        self.document_type = input;
353        self
354    }
355    /// <p>The type of document to create.</p><note>
356    /// <p>The <code>DeploymentStrategy</code> document type is an internal-use-only document type reserved for AppConfig.</p>
357    /// </note>
358    pub fn get_document_type(&self) -> &::std::option::Option<crate::types::DocumentType> {
359        &self.document_type
360    }
361    /// <p>Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.</p>
362    pub fn document_format(mut self, input: crate::types::DocumentFormat) -> Self {
363        self.document_format = ::std::option::Option::Some(input);
364        self
365    }
366    /// <p>Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.</p>
367    pub fn set_document_format(mut self, input: ::std::option::Option<crate::types::DocumentFormat>) -> Self {
368        self.document_format = input;
369        self
370    }
371    /// <p>Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default format.</p>
372    pub fn get_document_format(&self) -> &::std::option::Option<crate::types::DocumentFormat> {
373        &self.document_format
374    }
375    /// <p>Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: <code>/AWS::EC2::Instance</code>. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
376    pub fn target_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
377        self.target_type = ::std::option::Option::Some(input.into());
378        self
379    }
380    /// <p>Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: <code>/AWS::EC2::Instance</code>. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
381    pub fn set_target_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
382        self.target_type = input;
383        self
384    }
385    /// <p>Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: <code>/AWS::EC2::Instance</code>. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
386    pub fn get_target_type(&self) -> &::std::option::Option<::std::string::String> {
387        &self.target_type
388    }
389    /// Appends an item to `tags`.
390    ///
391    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
392    ///
393    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:</p>
394    /// <ul>
395    /// <li>
396    /// <p><code>Key=OS,Value=Windows</code></p></li>
397    /// <li>
398    /// <p><code>Key=Environment,Value=Production</code></p></li>
399    /// </ul><note>
400    /// <p>To add tags to an existing SSM document, use the <code>AddTagsToResource</code> operation.</p>
401    /// </note>
402    pub fn tags(mut self, input: crate::types::Tag) -> Self {
403        let mut v = self.tags.unwrap_or_default();
404        v.push(input);
405        self.tags = ::std::option::Option::Some(v);
406        self
407    }
408    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:</p>
409    /// <ul>
410    /// <li>
411    /// <p><code>Key=OS,Value=Windows</code></p></li>
412    /// <li>
413    /// <p><code>Key=Environment,Value=Production</code></p></li>
414    /// </ul><note>
415    /// <p>To add tags to an existing SSM document, use the <code>AddTagsToResource</code> operation.</p>
416    /// </note>
417    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
418        self.tags = input;
419        self
420    }
421    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of targets or the environment where it will run. In this case, you could specify the following key-value pairs:</p>
422    /// <ul>
423    /// <li>
424    /// <p><code>Key=OS,Value=Windows</code></p></li>
425    /// <li>
426    /// <p><code>Key=Environment,Value=Production</code></p></li>
427    /// </ul><note>
428    /// <p>To add tags to an existing SSM document, use the <code>AddTagsToResource</code> operation.</p>
429    /// </note>
430    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
431        &self.tags
432    }
433    /// Consumes the builder and constructs a [`CreateDocumentInput`](crate::operation::create_document::CreateDocumentInput).
434    pub fn build(
435        self,
436    ) -> ::std::result::Result<crate::operation::create_document::CreateDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
437        ::std::result::Result::Ok(crate::operation::create_document::CreateDocumentInput {
438            content: self.content,
439            requires: self.requires,
440            attachments: self.attachments,
441            name: self.name,
442            display_name: self.display_name,
443            version_name: self.version_name,
444            document_type: self.document_type,
445            document_format: self.document_format,
446            target_type: self.target_type,
447            tags: self.tags,
448        })
449    }
450}