aws_sdk_datazone/operation/put_environment_blueprint_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_environment_blueprint_configuration::_put_environment_blueprint_configuration_output::PutEnvironmentBlueprintConfigurationOutputBuilder;
3
4pub use crate::operation::put_environment_blueprint_configuration::_put_environment_blueprint_configuration_input::PutEnvironmentBlueprintConfigurationInputBuilder;
5
6impl crate::operation::put_environment_blueprint_configuration::builders::PutEnvironmentBlueprintConfigurationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.put_environment_blueprint_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `PutEnvironmentBlueprintConfiguration`.
24///
25/// <p>Writes the configuration for the specified environment blueprint in Amazon DataZone.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct PutEnvironmentBlueprintConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::put_environment_blueprint_configuration::builders::PutEnvironmentBlueprintConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationOutput,
35        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationError,
36    > for PutEnvironmentBlueprintConfigurationFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationOutput,
44            crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl PutEnvironmentBlueprintConfigurationFluentBuilder {
51    /// Creates a new `PutEnvironmentBlueprintConfigurationFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the PutEnvironmentBlueprintConfiguration as a reference.
60    pub fn as_input(&self) -> &crate::operation::put_environment_blueprint_configuration::builders::PutEnvironmentBlueprintConfigurationInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins =
85            crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfiguration::operation_runtime_plugins(
86                self.handle.runtime_plugins.clone(),
87                &self.handle.conf,
88                self.config_override,
89            );
90        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfiguration::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationOutput,
98        crate::operation::put_environment_blueprint_configuration::PutEnvironmentBlueprintConfigurationError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The identifier of the Amazon DataZone domain.</p>
113    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.domain_identifier(input.into());
115        self
116    }
117    /// <p>The identifier of the Amazon DataZone domain.</p>
118    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_domain_identifier(input);
120        self
121    }
122    /// <p>The identifier of the Amazon DataZone domain.</p>
123    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_domain_identifier()
125    }
126    /// <p>The identifier of the environment blueprint.</p>
127    pub fn environment_blueprint_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.environment_blueprint_identifier(input.into());
129        self
130    }
131    /// <p>The identifier of the environment blueprint.</p>
132    pub fn set_environment_blueprint_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_environment_blueprint_identifier(input);
134        self
135    }
136    /// <p>The identifier of the environment blueprint.</p>
137    pub fn get_environment_blueprint_identifier(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_environment_blueprint_identifier()
139    }
140    /// <p>The ARN of the provisioning role.</p>
141    pub fn provisioning_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.inner = self.inner.provisioning_role_arn(input.into());
143        self
144    }
145    /// <p>The ARN of the provisioning role.</p>
146    pub fn set_provisioning_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.inner = self.inner.set_provisioning_role_arn(input);
148        self
149    }
150    /// <p>The ARN of the provisioning role.</p>
151    pub fn get_provisioning_role_arn(&self) -> &::std::option::Option<::std::string::String> {
152        self.inner.get_provisioning_role_arn()
153    }
154    /// <p>The ARN of the manage access role.</p>
155    pub fn manage_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.inner = self.inner.manage_access_role_arn(input.into());
157        self
158    }
159    /// <p>The ARN of the manage access role.</p>
160    pub fn set_manage_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.inner = self.inner.set_manage_access_role_arn(input);
162        self
163    }
164    /// <p>The ARN of the manage access role.</p>
165    pub fn get_manage_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
166        self.inner.get_manage_access_role_arn()
167    }
168    /// <p>The environment role permissions boundary.</p>
169    pub fn environment_role_permission_boundary(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.inner = self.inner.environment_role_permission_boundary(input.into());
171        self
172    }
173    /// <p>The environment role permissions boundary.</p>
174    pub fn set_environment_role_permission_boundary(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175        self.inner = self.inner.set_environment_role_permission_boundary(input);
176        self
177    }
178    /// <p>The environment role permissions boundary.</p>
179    pub fn get_environment_role_permission_boundary(&self) -> &::std::option::Option<::std::string::String> {
180        self.inner.get_environment_role_permission_boundary()
181    }
182    ///
183    /// Appends an item to `enabledRegions`.
184    ///
185    /// To override the contents of this collection use [`set_enabled_regions`](Self::set_enabled_regions).
186    ///
187    /// <p>Specifies the enabled Amazon Web Services Regions.</p>
188    pub fn enabled_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.inner = self.inner.enabled_regions(input.into());
190        self
191    }
192    /// <p>Specifies the enabled Amazon Web Services Regions.</p>
193    pub fn set_enabled_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
194        self.inner = self.inner.set_enabled_regions(input);
195        self
196    }
197    /// <p>Specifies the enabled Amazon Web Services Regions.</p>
198    pub fn get_enabled_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
199        self.inner.get_enabled_regions()
200    }
201    ///
202    /// Adds a key-value pair to `regionalParameters`.
203    ///
204    /// To override the contents of this collection use [`set_regional_parameters`](Self::set_regional_parameters).
205    ///
206    /// <p>The regional parameters in the environment blueprint.</p>
207    pub fn regional_parameters(
208        mut self,
209        k: impl ::std::convert::Into<::std::string::String>,
210        v: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
211    ) -> Self {
212        self.inner = self.inner.regional_parameters(k.into(), v);
213        self
214    }
215    /// <p>The regional parameters in the environment blueprint.</p>
216    pub fn set_regional_parameters(
217        mut self,
218        input: ::std::option::Option<
219            ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
220        >,
221    ) -> Self {
222        self.inner = self.inner.set_regional_parameters(input);
223        self
224    }
225    /// <p>The regional parameters in the environment blueprint.</p>
226    pub fn get_regional_parameters(
227        &self,
228    ) -> &::std::option::Option<
229        ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
230    > {
231        self.inner.get_regional_parameters()
232    }
233    ///
234    /// Adds a key-value pair to `globalParameters`.
235    ///
236    /// To override the contents of this collection use [`set_global_parameters`](Self::set_global_parameters).
237    ///
238    /// <p>Region-agnostic environment blueprint parameters.</p>
239    pub fn global_parameters(
240        mut self,
241        k: impl ::std::convert::Into<::std::string::String>,
242        v: impl ::std::convert::Into<::std::string::String>,
243    ) -> Self {
244        self.inner = self.inner.global_parameters(k.into(), v.into());
245        self
246    }
247    /// <p>Region-agnostic environment blueprint parameters.</p>
248    pub fn set_global_parameters(
249        mut self,
250        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
251    ) -> Self {
252        self.inner = self.inner.set_global_parameters(input);
253        self
254    }
255    /// <p>Region-agnostic environment blueprint parameters.</p>
256    pub fn get_global_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
257        self.inner.get_global_parameters()
258    }
259    ///
260    /// Appends an item to `provisioningConfigurations`.
261    ///
262    /// To override the contents of this collection use [`set_provisioning_configurations`](Self::set_provisioning_configurations).
263    ///
264    /// <p>The provisioning configuration of a blueprint.</p>
265    pub fn provisioning_configurations(mut self, input: crate::types::ProvisioningConfiguration) -> Self {
266        self.inner = self.inner.provisioning_configurations(input);
267        self
268    }
269    /// <p>The provisioning configuration of a blueprint.</p>
270    pub fn set_provisioning_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProvisioningConfiguration>>) -> Self {
271        self.inner = self.inner.set_provisioning_configurations(input);
272        self
273    }
274    /// <p>The provisioning configuration of a blueprint.</p>
275    pub fn get_provisioning_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProvisioningConfiguration>> {
276        self.inner.get_provisioning_configurations()
277    }
278}