aws_sdk_launchwizard/operation/create_deployment/_create_deployment_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)]
5pub struct CreateDeploymentInput {
6 /// <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
7 pub workload_name: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the deployment pattern supported by a given workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter.</p>
9 pub deployment_pattern_name: ::std::option::Option<::std::string::String>,
10 /// <p>The name of the deployment.</p>
11 pub name: ::std::option::Option<::std::string::String>,
12 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
13 pub specifications: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
15 pub dry_run: ::std::option::Option<bool>,
16 /// <p>The tags to add to the deployment.</p>
17 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18}
19impl CreateDeploymentInput {
20 /// <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
21 pub fn workload_name(&self) -> ::std::option::Option<&str> {
22 self.workload_name.as_deref()
23 }
24 /// <p>The name of the deployment pattern supported by a given workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter.</p>
25 pub fn deployment_pattern_name(&self) -> ::std::option::Option<&str> {
26 self.deployment_pattern_name.as_deref()
27 }
28 /// <p>The name of the deployment.</p>
29 pub fn name(&self) -> ::std::option::Option<&str> {
30 self.name.as_deref()
31 }
32 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
33 pub fn specifications(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
34 self.specifications.as_ref()
35 }
36 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
37 pub fn dry_run(&self) -> ::std::option::Option<bool> {
38 self.dry_run
39 }
40 /// <p>The tags to add to the deployment.</p>
41 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
42 self.tags.as_ref()
43 }
44}
45impl ::std::fmt::Debug for CreateDeploymentInput {
46 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47 let mut formatter = f.debug_struct("CreateDeploymentInput");
48 formatter.field("workload_name", &self.workload_name);
49 formatter.field("deployment_pattern_name", &self.deployment_pattern_name);
50 formatter.field("name", &self.name);
51 formatter.field("specifications", &"*** Sensitive Data Redacted ***");
52 formatter.field("dry_run", &self.dry_run);
53 formatter.field("tags", &self.tags);
54 formatter.finish()
55 }
56}
57impl CreateDeploymentInput {
58 /// Creates a new builder-style object to manufacture [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
59 pub fn builder() -> crate::operation::create_deployment::builders::CreateDeploymentInputBuilder {
60 crate::operation::create_deployment::builders::CreateDeploymentInputBuilder::default()
61 }
62}
63
64/// A builder for [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct CreateDeploymentInputBuilder {
68 pub(crate) workload_name: ::std::option::Option<::std::string::String>,
69 pub(crate) deployment_pattern_name: ::std::option::Option<::std::string::String>,
70 pub(crate) name: ::std::option::Option<::std::string::String>,
71 pub(crate) specifications: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
72 pub(crate) dry_run: ::std::option::Option<bool>,
73 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
74}
75impl CreateDeploymentInputBuilder {
76 /// <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
77 /// This field is required.
78 pub fn workload_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.workload_name = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
83 pub fn set_workload_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.workload_name = input;
85 self
86 }
87 /// <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
88 pub fn get_workload_name(&self) -> &::std::option::Option<::std::string::String> {
89 &self.workload_name
90 }
91 /// <p>The name of the deployment pattern supported by a given workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter.</p>
92 /// This field is required.
93 pub fn deployment_pattern_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.deployment_pattern_name = ::std::option::Option::Some(input.into());
95 self
96 }
97 /// <p>The name of the deployment pattern supported by a given workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter.</p>
98 pub fn set_deployment_pattern_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.deployment_pattern_name = input;
100 self
101 }
102 /// <p>The name of the deployment pattern supported by a given workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter.</p>
103 pub fn get_deployment_pattern_name(&self) -> &::std::option::Option<::std::string::String> {
104 &self.deployment_pattern_name
105 }
106 /// <p>The name of the deployment.</p>
107 /// This field is required.
108 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.name = ::std::option::Option::Some(input.into());
110 self
111 }
112 /// <p>The name of the deployment.</p>
113 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.name = input;
115 self
116 }
117 /// <p>The name of the deployment.</p>
118 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
119 &self.name
120 }
121 /// Adds a key-value pair to `specifications`.
122 ///
123 /// To override the contents of this collection use [`set_specifications`](Self::set_specifications).
124 ///
125 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
126 pub fn specifications(
127 mut self,
128 k: impl ::std::convert::Into<::std::string::String>,
129 v: impl ::std::convert::Into<::std::string::String>,
130 ) -> Self {
131 let mut hash_map = self.specifications.unwrap_or_default();
132 hash_map.insert(k.into(), v.into());
133 self.specifications = ::std::option::Option::Some(hash_map);
134 self
135 }
136 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
137 pub fn set_specifications(
138 mut self,
139 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
140 ) -> Self {
141 self.specifications = input;
142 self
143 }
144 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
145 pub fn get_specifications(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
146 &self.specifications
147 }
148 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
149 pub fn dry_run(mut self, input: bool) -> Self {
150 self.dry_run = ::std::option::Option::Some(input);
151 self
152 }
153 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
154 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
155 self.dry_run = input;
156 self
157 }
158 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
159 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
160 &self.dry_run
161 }
162 /// Adds a key-value pair to `tags`.
163 ///
164 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
165 ///
166 /// <p>The tags to add to the deployment.</p>
167 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
168 let mut hash_map = self.tags.unwrap_or_default();
169 hash_map.insert(k.into(), v.into());
170 self.tags = ::std::option::Option::Some(hash_map);
171 self
172 }
173 /// <p>The tags to add to the deployment.</p>
174 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
175 self.tags = input;
176 self
177 }
178 /// <p>The tags to add to the deployment.</p>
179 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
180 &self.tags
181 }
182 /// Consumes the builder and constructs a [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
183 pub fn build(
184 self,
185 ) -> ::std::result::Result<crate::operation::create_deployment::CreateDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
186 ::std::result::Result::Ok(crate::operation::create_deployment::CreateDeploymentInput {
187 workload_name: self.workload_name,
188 deployment_pattern_name: self.deployment_pattern_name,
189 name: self.name,
190 specifications: self.specifications,
191 dry_run: self.dry_run,
192 tags: self.tags,
193 })
194 }
195}
196impl ::std::fmt::Debug for CreateDeploymentInputBuilder {
197 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
198 let mut formatter = f.debug_struct("CreateDeploymentInputBuilder");
199 formatter.field("workload_name", &self.workload_name);
200 formatter.field("deployment_pattern_name", &self.deployment_pattern_name);
201 formatter.field("name", &self.name);
202 formatter.field("specifications", &"*** Sensitive Data Redacted ***");
203 formatter.field("dry_run", &self.dry_run);
204 formatter.field("tags", &self.tags);
205 formatter.finish()
206 }
207}