aws_sdk_resiliencehub/operation/delete_app_version_resource/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_app_version_resource::_delete_app_version_resource_output::DeleteAppVersionResourceOutputBuilder;
3
4pub use crate::operation::delete_app_version_resource::_delete_app_version_resource_input::DeleteAppVersionResourceInputBuilder;
5
6impl crate::operation::delete_app_version_resource::builders::DeleteAppVersionResourceInputBuilder {
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::delete_app_version_resource::DeleteAppVersionResourceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_app_version_resource::DeleteAppVersionResourceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_app_version_resource();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteAppVersionResource`.
24///
25/// <p>Deletes a resource from the Resilience Hub application.</p><note>
26/// <ul>
27/// <li>
28/// <p>You can only delete a manually added resource. To exclude non-manually added resources, use the <code>UpdateAppVersionResource</code> API.</p></li>
29/// <li>
30/// <p>This action has no effect outside Resilience Hub.</p></li>
31/// <li>
32/// <p>This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the <code>PublishAppVersion</code> API.</p></li>
33/// </ul>
34/// </note>
35#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct DeleteAppVersionResourceFluentBuilder {
37    handle: ::std::sync::Arc<crate::client::Handle>,
38    inner: crate::operation::delete_app_version_resource::builders::DeleteAppVersionResourceInputBuilder,
39    config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42    crate::client::customize::internal::CustomizableSend<
43        crate::operation::delete_app_version_resource::DeleteAppVersionResourceOutput,
44        crate::operation::delete_app_version_resource::DeleteAppVersionResourceError,
45    > for DeleteAppVersionResourceFluentBuilder
46{
47    fn send(
48        self,
49        config_override: crate::config::Builder,
50    ) -> crate::client::customize::internal::BoxFuture<
51        crate::client::customize::internal::SendResult<
52            crate::operation::delete_app_version_resource::DeleteAppVersionResourceOutput,
53            crate::operation::delete_app_version_resource::DeleteAppVersionResourceError,
54        >,
55    > {
56        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57    }
58}
59impl DeleteAppVersionResourceFluentBuilder {
60    /// Creates a new `DeleteAppVersionResourceFluentBuilder`.
61    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62        Self {
63            handle,
64            inner: ::std::default::Default::default(),
65            config_override: ::std::option::Option::None,
66        }
67    }
68    /// Access the DeleteAppVersionResource as a reference.
69    pub fn as_input(&self) -> &crate::operation::delete_app_version_resource::builders::DeleteAppVersionResourceInputBuilder {
70        &self.inner
71    }
72    /// Sends the request and returns the response.
73    ///
74    /// If an error occurs, an `SdkError` will be returned with additional details that
75    /// can be matched against.
76    ///
77    /// By default, any retryable failures will be retried twice. Retry behavior
78    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
79    /// set when configuring the client.
80    pub async fn send(
81        self,
82    ) -> ::std::result::Result<
83        crate::operation::delete_app_version_resource::DeleteAppVersionResourceOutput,
84        ::aws_smithy_runtime_api::client::result::SdkError<
85            crate::operation::delete_app_version_resource::DeleteAppVersionResourceError,
86            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
87        >,
88    > {
89        let input = self
90            .inner
91            .build()
92            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
93        let runtime_plugins = crate::operation::delete_app_version_resource::DeleteAppVersionResource::operation_runtime_plugins(
94            self.handle.runtime_plugins.clone(),
95            &self.handle.conf,
96            self.config_override,
97        );
98        crate::operation::delete_app_version_resource::DeleteAppVersionResource::orchestrate(&runtime_plugins, input).await
99    }
100
101    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
102    pub fn customize(
103        self,
104    ) -> crate::client::customize::CustomizableOperation<
105        crate::operation::delete_app_version_resource::DeleteAppVersionResourceOutput,
106        crate::operation::delete_app_version_resource::DeleteAppVersionResourceError,
107        Self,
108    > {
109        crate::client::customize::CustomizableOperation::new(self)
110    }
111    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112        self.set_config_override(::std::option::Option::Some(config_override.into()));
113        self
114    }
115
116    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117        self.config_override = config_override;
118        self
119    }
120    /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
121    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.inner = self.inner.app_arn(input.into());
123        self
124    }
125    /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
126    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.inner = self.inner.set_app_arn(input);
128        self
129    }
130    /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
131    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
132        self.inner.get_app_arn()
133    }
134    /// <p>Name of the resource.</p>
135    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.resource_name(input.into());
137        self
138    }
139    /// <p>Name of the resource.</p>
140    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_resource_name(input);
142        self
143    }
144    /// <p>Name of the resource.</p>
145    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_resource_name()
147    }
148    /// <p>Logical identifier of the resource.</p>
149    pub fn logical_resource_id(mut self, input: crate::types::LogicalResourceId) -> Self {
150        self.inner = self.inner.logical_resource_id(input);
151        self
152    }
153    /// <p>Logical identifier of the resource.</p>
154    pub fn set_logical_resource_id(mut self, input: ::std::option::Option<crate::types::LogicalResourceId>) -> Self {
155        self.inner = self.inner.set_logical_resource_id(input);
156        self
157    }
158    /// <p>Logical identifier of the resource.</p>
159    pub fn get_logical_resource_id(&self) -> &::std::option::Option<crate::types::LogicalResourceId> {
160        self.inner.get_logical_resource_id()
161    }
162    /// <p>Physical identifier of the resource.</p>
163    pub fn physical_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.inner = self.inner.physical_resource_id(input.into());
165        self
166    }
167    /// <p>Physical identifier of the resource.</p>
168    pub fn set_physical_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.inner = self.inner.set_physical_resource_id(input);
170        self
171    }
172    /// <p>Physical identifier of the resource.</p>
173    pub fn get_physical_resource_id(&self) -> &::std::option::Option<::std::string::String> {
174        self.inner.get_physical_resource_id()
175    }
176    /// <p>Amazon Web Services region that owns the physical resource.</p>
177    pub fn aws_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.inner = self.inner.aws_region(input.into());
179        self
180    }
181    /// <p>Amazon Web Services region that owns the physical resource.</p>
182    pub fn set_aws_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.inner = self.inner.set_aws_region(input);
184        self
185    }
186    /// <p>Amazon Web Services region that owns the physical resource.</p>
187    pub fn get_aws_region(&self) -> &::std::option::Option<::std::string::String> {
188        self.inner.get_aws_region()
189    }
190    /// <p>Amazon Web Services account that owns the physical resource.</p>
191    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192        self.inner = self.inner.aws_account_id(input.into());
193        self
194    }
195    /// <p>Amazon Web Services account that owns the physical resource.</p>
196    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197        self.inner = self.inner.set_aws_account_id(input);
198        self
199    }
200    /// <p>Amazon Web Services account that owns the physical resource.</p>
201    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
202        self.inner.get_aws_account_id()
203    }
204    /// <p>Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.</p>
205    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.inner = self.inner.client_token(input.into());
207        self
208    }
209    /// <p>Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.</p>
210    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_client_token(input);
212        self
213    }
214    /// <p>Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.</p>
215    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_client_token()
217    }
218}