Skip to main content

aws_sdk_s3control/operation/delete_access_point_policy_for_object_lambda/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_access_point_policy_for_object_lambda::_delete_access_point_policy_for_object_lambda_input::DeleteAccessPointPolicyForObjectLambdaInputBuilder;
3
4pub use crate::operation::delete_access_point_policy_for_object_lambda::_delete_access_point_policy_for_object_lambda_output::DeleteAccessPointPolicyForObjectLambdaOutputBuilder;
5
6impl crate::operation::delete_access_point_policy_for_object_lambda::builders::DeleteAccessPointPolicyForObjectLambdaInputBuilder {
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_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_access_point_policy_for_object_lambda();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteAccessPointPolicyForObjectLambda`.
24///
25/// <note>
26/// <p>This operation is not supported by directory buckets.</p>
27/// </note>
28/// <p>Removes the resource policy for an Object Lambda Access Point.</p>
29/// <p>The following actions are related to <code>DeleteAccessPointPolicyForObjectLambda</code>:</p>
30/// <ul>
31/// <li>
32/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPointPolicyForObjectLambda.html">GetAccessPointPolicyForObjectLambda</a></p></li>
33/// <li>
34/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutAccessPointPolicyForObjectLambda.html">PutAccessPointPolicyForObjectLambda</a></p></li>
35/// </ul>
36#[derive(::std::clone::Clone, ::std::fmt::Debug)]
37pub struct DeleteAccessPointPolicyForObjectLambdaFluentBuilder {
38    handle: ::std::sync::Arc<crate::client::Handle>,
39    inner: crate::operation::delete_access_point_policy_for_object_lambda::builders::DeleteAccessPointPolicyForObjectLambdaInputBuilder,
40    config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43    crate::client::customize::internal::CustomizableSend<
44        crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaOutput,
45        crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaError,
46    > for DeleteAccessPointPolicyForObjectLambdaFluentBuilder
47{
48    fn send(
49        self,
50        config_override: crate::config::Builder,
51    ) -> crate::client::customize::internal::BoxFuture<
52        crate::client::customize::internal::SendResult<
53            crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaOutput,
54            crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaError,
55        >,
56    > {
57        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58    }
59}
60impl DeleteAccessPointPolicyForObjectLambdaFluentBuilder {
61    /// Creates a new `DeleteAccessPointPolicyForObjectLambdaFluentBuilder`.
62    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63        Self {
64            handle,
65            inner: ::std::default::Default::default(),
66            config_override: ::std::option::Option::None,
67        }
68    }
69    /// Access the DeleteAccessPointPolicyForObjectLambda as a reference.
70    pub fn as_input(
71        &self,
72    ) -> &crate::operation::delete_access_point_policy_for_object_lambda::builders::DeleteAccessPointPolicyForObjectLambdaInputBuilder {
73        &self.inner
74    }
75    /// Sends the request and returns the response.
76    ///
77    /// If an error occurs, an `SdkError` will be returned with additional details that
78    /// can be matched against.
79    ///
80    /// By default, any retryable failures will be retried twice. Retry behavior
81    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
82    /// set when configuring the client.
83    pub async fn send(
84        self,
85    ) -> ::std::result::Result<
86        crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaOutput,
87        ::aws_smithy_runtime_api::client::result::SdkError<
88            crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaError,
89            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
90        >,
91    > {
92        let input = self
93            .inner
94            .build()
95            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
96        let runtime_plugins =
97            crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambda::operation_runtime_plugins(
98                self.handle.runtime_plugins.clone(),
99                &self.handle.conf,
100                self.config_override,
101            );
102        crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambda::orchestrate(&runtime_plugins, input)
103            .await
104    }
105
106    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107    pub fn customize(
108        self,
109    ) -> crate::client::customize::CustomizableOperation<
110        crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaOutput,
111        crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaError,
112        Self,
113    > {
114        crate::client::customize::CustomizableOperation::new(self)
115    }
116    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117        self.set_config_override(::std::option::Option::Some(config_override.into()));
118        self
119    }
120
121    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122        self.config_override = config_override;
123        self
124    }
125    /// <p>The account ID for the account that owns the specified Object Lambda Access Point.</p>
126    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.account_id(input.into());
128        self
129    }
130    /// <p>The account ID for the account that owns the specified Object Lambda Access Point.</p>
131    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_account_id(input);
133        self
134    }
135    /// <p>The account ID for the account that owns the specified Object Lambda Access Point.</p>
136    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_account_id()
138    }
139    /// <p>The name of the Object Lambda Access Point you want to delete the policy for.</p>
140    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.name(input.into());
142        self
143    }
144    /// <p>The name of the Object Lambda Access Point you want to delete the policy for.</p>
145    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_name(input);
147        self
148    }
149    /// <p>The name of the Object Lambda Access Point you want to delete the policy for.</p>
150    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_name()
152    }
153}