aws_sdk_proton/operation/create_environment/_create_environment_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 CreateEnvironmentInput {
6 /// <p>The name of the environment.</p>
7 pub name: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the environment template. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-templates.html">Environment Templates</a> in the <i>Proton User Guide</i>.</p>
9 pub template_name: ::std::option::Option<::std::string::String>,
10 /// <p>The major version of the environment template.</p>
11 pub template_major_version: ::std::option::Option<::std::string::String>,
12 /// <p>The minor version of the environment template.</p>
13 pub template_minor_version: ::std::option::Option<::std::string::String>,
14 /// <p>A description of the environment that's being created and deployed.</p>
15 pub description: ::std::option::Option<::std::string::String>,
16 /// <p>A YAML formatted string that provides inputs as defined in the environment template bundle schema file. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html">Environments</a> in the <i>Proton User Guide</i>.</p>
17 pub spec: ::std::option::Option<::std::string::String>,
18 /// <p>The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.</p>
19 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
20 pub proton_service_role_arn: ::std::option::Option<::std::string::String>,
21 /// <p>The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an environment account. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html">Environment account connections</a> in the <i>Proton User guide</i>.</p>
22 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
23 pub environment_account_connection_id: ::std::option::Option<::std::string::String>,
24 /// <p>An optional list of metadata items that you can associate with the Proton environment. A tag is a key-value pair.</p>
25 /// <p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/resources.html">Proton resources and tagging</a> in the <i>Proton User Guide</i>.</p>
26 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
27 /// <p>The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. A linked repository is a repository that has been registered with Proton. For more information, see <code>CreateRepository</code>.</p>
28 /// <p>To use self-managed provisioning for the environment, specify this parameter and omit the <code>environmentAccountConnectionId</code> and <code>protonServiceRoleArn</code> parameters.</p>
29 pub provisioning_repository: ::std::option::Option<crate::types::RepositoryBranchInput>,
30 /// <p>The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.</p>
31 /// <p>You must specify <code>componentRoleArn</code> to allow directly defined components to be associated with this environment.</p>
32 /// <p>For more information about components, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html">Proton components</a> in the <i>Proton User Guide</i>.</p>
33 pub component_role_arn: ::std::option::Option<::std::string::String>,
34 /// <p>The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using CodeBuild-based provisioning on your behalf.</p>
35 /// <p>To use CodeBuild-based provisioning for the environment or for any service instance running in the environment, specify either the <code>environmentAccountConnectionId</code> or <code>codebuildRoleArn</code> parameter.</p>
36 pub codebuild_role_arn: ::std::option::Option<::std::string::String>,
37}
38impl CreateEnvironmentInput {
39 /// <p>The name of the environment.</p>
40 pub fn name(&self) -> ::std::option::Option<&str> {
41 self.name.as_deref()
42 }
43 /// <p>The name of the environment template. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-templates.html">Environment Templates</a> in the <i>Proton User Guide</i>.</p>
44 pub fn template_name(&self) -> ::std::option::Option<&str> {
45 self.template_name.as_deref()
46 }
47 /// <p>The major version of the environment template.</p>
48 pub fn template_major_version(&self) -> ::std::option::Option<&str> {
49 self.template_major_version.as_deref()
50 }
51 /// <p>The minor version of the environment template.</p>
52 pub fn template_minor_version(&self) -> ::std::option::Option<&str> {
53 self.template_minor_version.as_deref()
54 }
55 /// <p>A description of the environment that's being created and deployed.</p>
56 pub fn description(&self) -> ::std::option::Option<&str> {
57 self.description.as_deref()
58 }
59 /// <p>A YAML formatted string that provides inputs as defined in the environment template bundle schema file. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html">Environments</a> in the <i>Proton User Guide</i>.</p>
60 pub fn spec(&self) -> ::std::option::Option<&str> {
61 self.spec.as_deref()
62 }
63 /// <p>The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.</p>
64 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
65 pub fn proton_service_role_arn(&self) -> ::std::option::Option<&str> {
66 self.proton_service_role_arn.as_deref()
67 }
68 /// <p>The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an environment account. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html">Environment account connections</a> in the <i>Proton User guide</i>.</p>
69 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
70 pub fn environment_account_connection_id(&self) -> ::std::option::Option<&str> {
71 self.environment_account_connection_id.as_deref()
72 }
73 /// <p>An optional list of metadata items that you can associate with the Proton environment. A tag is a key-value pair.</p>
74 /// <p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/resources.html">Proton resources and tagging</a> in the <i>Proton User Guide</i>.</p>
75 ///
76 /// 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()`.
77 pub fn tags(&self) -> &[crate::types::Tag] {
78 self.tags.as_deref().unwrap_or_default()
79 }
80 /// <p>The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. A linked repository is a repository that has been registered with Proton. For more information, see <code>CreateRepository</code>.</p>
81 /// <p>To use self-managed provisioning for the environment, specify this parameter and omit the <code>environmentAccountConnectionId</code> and <code>protonServiceRoleArn</code> parameters.</p>
82 pub fn provisioning_repository(&self) -> ::std::option::Option<&crate::types::RepositoryBranchInput> {
83 self.provisioning_repository.as_ref()
84 }
85 /// <p>The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.</p>
86 /// <p>You must specify <code>componentRoleArn</code> to allow directly defined components to be associated with this environment.</p>
87 /// <p>For more information about components, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html">Proton components</a> in the <i>Proton User Guide</i>.</p>
88 pub fn component_role_arn(&self) -> ::std::option::Option<&str> {
89 self.component_role_arn.as_deref()
90 }
91 /// <p>The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using CodeBuild-based provisioning on your behalf.</p>
92 /// <p>To use CodeBuild-based provisioning for the environment or for any service instance running in the environment, specify either the <code>environmentAccountConnectionId</code> or <code>codebuildRoleArn</code> parameter.</p>
93 pub fn codebuild_role_arn(&self) -> ::std::option::Option<&str> {
94 self.codebuild_role_arn.as_deref()
95 }
96}
97impl ::std::fmt::Debug for CreateEnvironmentInput {
98 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
99 let mut formatter = f.debug_struct("CreateEnvironmentInput");
100 formatter.field("name", &self.name);
101 formatter.field("template_name", &self.template_name);
102 formatter.field("template_major_version", &self.template_major_version);
103 formatter.field("template_minor_version", &self.template_minor_version);
104 formatter.field("description", &"*** Sensitive Data Redacted ***");
105 formatter.field("spec", &"*** Sensitive Data Redacted ***");
106 formatter.field("proton_service_role_arn", &self.proton_service_role_arn);
107 formatter.field("environment_account_connection_id", &self.environment_account_connection_id);
108 formatter.field("tags", &self.tags);
109 formatter.field("provisioning_repository", &self.provisioning_repository);
110 formatter.field("component_role_arn", &self.component_role_arn);
111 formatter.field("codebuild_role_arn", &self.codebuild_role_arn);
112 formatter.finish()
113 }
114}
115impl CreateEnvironmentInput {
116 /// Creates a new builder-style object to manufacture [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
117 pub fn builder() -> crate::operation::create_environment::builders::CreateEnvironmentInputBuilder {
118 crate::operation::create_environment::builders::CreateEnvironmentInputBuilder::default()
119 }
120}
121
122/// A builder for [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
123#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
124#[non_exhaustive]
125pub struct CreateEnvironmentInputBuilder {
126 pub(crate) name: ::std::option::Option<::std::string::String>,
127 pub(crate) template_name: ::std::option::Option<::std::string::String>,
128 pub(crate) template_major_version: ::std::option::Option<::std::string::String>,
129 pub(crate) template_minor_version: ::std::option::Option<::std::string::String>,
130 pub(crate) description: ::std::option::Option<::std::string::String>,
131 pub(crate) spec: ::std::option::Option<::std::string::String>,
132 pub(crate) proton_service_role_arn: ::std::option::Option<::std::string::String>,
133 pub(crate) environment_account_connection_id: ::std::option::Option<::std::string::String>,
134 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
135 pub(crate) provisioning_repository: ::std::option::Option<crate::types::RepositoryBranchInput>,
136 pub(crate) component_role_arn: ::std::option::Option<::std::string::String>,
137 pub(crate) codebuild_role_arn: ::std::option::Option<::std::string::String>,
138}
139impl CreateEnvironmentInputBuilder {
140 /// <p>The name of the environment.</p>
141 /// This field is required.
142 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.name = ::std::option::Option::Some(input.into());
144 self
145 }
146 /// <p>The name of the environment.</p>
147 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.name = input;
149 self
150 }
151 /// <p>The name of the environment.</p>
152 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153 &self.name
154 }
155 /// <p>The name of the environment template. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-templates.html">Environment Templates</a> in the <i>Proton User Guide</i>.</p>
156 /// This field is required.
157 pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.template_name = ::std::option::Option::Some(input.into());
159 self
160 }
161 /// <p>The name of the environment template. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-templates.html">Environment Templates</a> in the <i>Proton User Guide</i>.</p>
162 pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.template_name = input;
164 self
165 }
166 /// <p>The name of the environment template. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-templates.html">Environment Templates</a> in the <i>Proton User Guide</i>.</p>
167 pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
168 &self.template_name
169 }
170 /// <p>The major version of the environment template.</p>
171 /// This field is required.
172 pub fn template_major_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173 self.template_major_version = ::std::option::Option::Some(input.into());
174 self
175 }
176 /// <p>The major version of the environment template.</p>
177 pub fn set_template_major_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178 self.template_major_version = input;
179 self
180 }
181 /// <p>The major version of the environment template.</p>
182 pub fn get_template_major_version(&self) -> &::std::option::Option<::std::string::String> {
183 &self.template_major_version
184 }
185 /// <p>The minor version of the environment template.</p>
186 pub fn template_minor_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.template_minor_version = ::std::option::Option::Some(input.into());
188 self
189 }
190 /// <p>The minor version of the environment template.</p>
191 pub fn set_template_minor_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192 self.template_minor_version = input;
193 self
194 }
195 /// <p>The minor version of the environment template.</p>
196 pub fn get_template_minor_version(&self) -> &::std::option::Option<::std::string::String> {
197 &self.template_minor_version
198 }
199 /// <p>A description of the environment that's being created and deployed.</p>
200 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201 self.description = ::std::option::Option::Some(input.into());
202 self
203 }
204 /// <p>A description of the environment that's being created and deployed.</p>
205 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206 self.description = input;
207 self
208 }
209 /// <p>A description of the environment that's being created and deployed.</p>
210 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
211 &self.description
212 }
213 /// <p>A YAML formatted string that provides inputs as defined in the environment template bundle schema file. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html">Environments</a> in the <i>Proton User Guide</i>.</p>
214 /// This field is required.
215 pub fn spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.spec = ::std::option::Option::Some(input.into());
217 self
218 }
219 /// <p>A YAML formatted string that provides inputs as defined in the environment template bundle schema file. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html">Environments</a> in the <i>Proton User Guide</i>.</p>
220 pub fn set_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.spec = input;
222 self
223 }
224 /// <p>A YAML formatted string that provides inputs as defined in the environment template bundle schema file. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html">Environments</a> in the <i>Proton User Guide</i>.</p>
225 pub fn get_spec(&self) -> &::std::option::Option<::std::string::String> {
226 &self.spec
227 }
228 /// <p>The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.</p>
229 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
230 pub fn proton_service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.proton_service_role_arn = ::std::option::Option::Some(input.into());
232 self
233 }
234 /// <p>The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.</p>
235 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
236 pub fn set_proton_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.proton_service_role_arn = input;
238 self
239 }
240 /// <p>The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.</p>
241 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
242 pub fn get_proton_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
243 &self.proton_service_role_arn
244 }
245 /// <p>The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an environment account. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html">Environment account connections</a> in the <i>Proton User guide</i>.</p>
246 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
247 pub fn environment_account_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.environment_account_connection_id = ::std::option::Option::Some(input.into());
249 self
250 }
251 /// <p>The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an environment account. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html">Environment account connections</a> in the <i>Proton User guide</i>.</p>
252 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
253 pub fn set_environment_account_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254 self.environment_account_connection_id = input;
255 self
256 }
257 /// <p>The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an environment account. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html">Environment account connections</a> in the <i>Proton User guide</i>.</p>
258 /// <p>To use Amazon Web Services-managed provisioning for the environment, specify either the <code>environmentAccountConnectionId</code> or <code>protonServiceRoleArn</code> parameter and omit the <code>provisioningRepository</code> parameter.</p>
259 pub fn get_environment_account_connection_id(&self) -> &::std::option::Option<::std::string::String> {
260 &self.environment_account_connection_id
261 }
262 /// Appends an item to `tags`.
263 ///
264 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
265 ///
266 /// <p>An optional list of metadata items that you can associate with the Proton environment. A tag is a key-value pair.</p>
267 /// <p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/resources.html">Proton resources and tagging</a> in the <i>Proton User Guide</i>.</p>
268 pub fn tags(mut self, input: crate::types::Tag) -> Self {
269 let mut v = self.tags.unwrap_or_default();
270 v.push(input);
271 self.tags = ::std::option::Option::Some(v);
272 self
273 }
274 /// <p>An optional list of metadata items that you can associate with the Proton environment. A tag is a key-value pair.</p>
275 /// <p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/resources.html">Proton resources and tagging</a> in the <i>Proton User Guide</i>.</p>
276 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
277 self.tags = input;
278 self
279 }
280 /// <p>An optional list of metadata items that you can associate with the Proton environment. A tag is a key-value pair.</p>
281 /// <p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/resources.html">Proton resources and tagging</a> in the <i>Proton User Guide</i>.</p>
282 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
283 &self.tags
284 }
285 /// <p>The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. A linked repository is a repository that has been registered with Proton. For more information, see <code>CreateRepository</code>.</p>
286 /// <p>To use self-managed provisioning for the environment, specify this parameter and omit the <code>environmentAccountConnectionId</code> and <code>protonServiceRoleArn</code> parameters.</p>
287 pub fn provisioning_repository(mut self, input: crate::types::RepositoryBranchInput) -> Self {
288 self.provisioning_repository = ::std::option::Option::Some(input);
289 self
290 }
291 /// <p>The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. A linked repository is a repository that has been registered with Proton. For more information, see <code>CreateRepository</code>.</p>
292 /// <p>To use self-managed provisioning for the environment, specify this parameter and omit the <code>environmentAccountConnectionId</code> and <code>protonServiceRoleArn</code> parameters.</p>
293 pub fn set_provisioning_repository(mut self, input: ::std::option::Option<crate::types::RepositoryBranchInput>) -> Self {
294 self.provisioning_repository = input;
295 self
296 }
297 /// <p>The linked repository that you use to host your rendered infrastructure templates for self-managed provisioning. A linked repository is a repository that has been registered with Proton. For more information, see <code>CreateRepository</code>.</p>
298 /// <p>To use self-managed provisioning for the environment, specify this parameter and omit the <code>environmentAccountConnectionId</code> and <code>protonServiceRoleArn</code> parameters.</p>
299 pub fn get_provisioning_repository(&self) -> &::std::option::Option<crate::types::RepositoryBranchInput> {
300 &self.provisioning_repository
301 }
302 /// <p>The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.</p>
303 /// <p>You must specify <code>componentRoleArn</code> to allow directly defined components to be associated with this environment.</p>
304 /// <p>For more information about components, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html">Proton components</a> in the <i>Proton User Guide</i>.</p>
305 pub fn component_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306 self.component_role_arn = ::std::option::Option::Some(input.into());
307 self
308 }
309 /// <p>The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.</p>
310 /// <p>You must specify <code>componentRoleArn</code> to allow directly defined components to be associated with this environment.</p>
311 /// <p>For more information about components, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html">Proton components</a> in the <i>Proton User Guide</i>.</p>
312 pub fn set_component_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.component_role_arn = input;
314 self
315 }
316 /// <p>The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined components in this environment. It determines the scope of infrastructure that a component can provision.</p>
317 /// <p>You must specify <code>componentRoleArn</code> to allow directly defined components to be associated with this environment.</p>
318 /// <p>For more information about components, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html">Proton components</a> in the <i>Proton User Guide</i>.</p>
319 pub fn get_component_role_arn(&self) -> &::std::option::Option<::std::string::String> {
320 &self.component_role_arn
321 }
322 /// <p>The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using CodeBuild-based provisioning on your behalf.</p>
323 /// <p>To use CodeBuild-based provisioning for the environment or for any service instance running in the environment, specify either the <code>environmentAccountConnectionId</code> or <code>codebuildRoleArn</code> parameter.</p>
324 pub fn codebuild_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
325 self.codebuild_role_arn = ::std::option::Option::Some(input.into());
326 self
327 }
328 /// <p>The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using CodeBuild-based provisioning on your behalf.</p>
329 /// <p>To use CodeBuild-based provisioning for the environment or for any service instance running in the environment, specify either the <code>environmentAccountConnectionId</code> or <code>codebuildRoleArn</code> parameter.</p>
330 pub fn set_codebuild_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331 self.codebuild_role_arn = input;
332 self
333 }
334 /// <p>The Amazon Resource Name (ARN) of the IAM service role that allows Proton to provision infrastructure using CodeBuild-based provisioning on your behalf.</p>
335 /// <p>To use CodeBuild-based provisioning for the environment or for any service instance running in the environment, specify either the <code>environmentAccountConnectionId</code> or <code>codebuildRoleArn</code> parameter.</p>
336 pub fn get_codebuild_role_arn(&self) -> &::std::option::Option<::std::string::String> {
337 &self.codebuild_role_arn
338 }
339 /// Consumes the builder and constructs a [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
340 pub fn build(
341 self,
342 ) -> ::std::result::Result<crate::operation::create_environment::CreateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
343 ::std::result::Result::Ok(crate::operation::create_environment::CreateEnvironmentInput {
344 name: self.name,
345 template_name: self.template_name,
346 template_major_version: self.template_major_version,
347 template_minor_version: self.template_minor_version,
348 description: self.description,
349 spec: self.spec,
350 proton_service_role_arn: self.proton_service_role_arn,
351 environment_account_connection_id: self.environment_account_connection_id,
352 tags: self.tags,
353 provisioning_repository: self.provisioning_repository,
354 component_role_arn: self.component_role_arn,
355 codebuild_role_arn: self.codebuild_role_arn,
356 })
357 }
358}
359impl ::std::fmt::Debug for CreateEnvironmentInputBuilder {
360 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
361 let mut formatter = f.debug_struct("CreateEnvironmentInputBuilder");
362 formatter.field("name", &self.name);
363 formatter.field("template_name", &self.template_name);
364 formatter.field("template_major_version", &self.template_major_version);
365 formatter.field("template_minor_version", &self.template_minor_version);
366 formatter.field("description", &"*** Sensitive Data Redacted ***");
367 formatter.field("spec", &"*** Sensitive Data Redacted ***");
368 formatter.field("proton_service_role_arn", &self.proton_service_role_arn);
369 formatter.field("environment_account_connection_id", &self.environment_account_connection_id);
370 formatter.field("tags", &self.tags);
371 formatter.field("provisioning_repository", &self.provisioning_repository);
372 formatter.field("component_role_arn", &self.component_role_arn);
373 formatter.field("codebuild_role_arn", &self.codebuild_role_arn);
374 formatter.finish()
375 }
376}