aws_sdk_s3control/operation/delete_bucket_replication/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_bucket_replication::_delete_bucket_replication_output::DeleteBucketReplicationOutputBuilder;
3
4pub use crate::operation::delete_bucket_replication::_delete_bucket_replication_input::DeleteBucketReplicationInputBuilder;
5
6impl crate::operation::delete_bucket_replication::builders::DeleteBucketReplicationInputBuilder {
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_bucket_replication::DeleteBucketReplicationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::delete_bucket_replication::DeleteBucketReplicationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.delete_bucket_replication();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DeleteBucketReplication`.
24///
25/// <note>
26/// <p>This operation deletes an Amazon S3 on Outposts bucket's replication configuration. To delete an S3 bucket's replication configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html">DeleteBucketReplication</a> in the <i>Amazon S3 API Reference</i>.</p>
27/// </note>
28/// <p>Deletes the replication configuration from the specified S3 on Outposts bucket.</p>
29/// <p>To use this operation, you must have permissions to perform the <code>s3-outposts:PutReplicationConfiguration</code> action. The Outposts bucket owner has this permission by default and can grant it to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3OutpostsIAM.html">Setting up IAM with S3 on Outposts</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3OutpostsBucketPolicy.html">Managing access to S3 on Outposts buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
30/// <p>It can take a while to propagate <code>PUT</code> or <code>DELETE</code> requests for a replication configuration to all S3 on Outposts systems. Therefore, the replication configuration that's returned by a <code>GET</code> request soon after a <code>PUT</code> or <code>DELETE</code> request might return a more recent result than what's on the Outpost. If an Outpost is offline, the delay in updating the replication configuration on that Outpost can be significant.</p>
31/// </note>
32/// <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucketReplication.html#API_control_DeleteBucketReplication_Examples">Examples</a> section.</p>
33/// <p>For information about S3 replication on Outposts configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3OutpostsReplication.html">Replicating objects for S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
34/// <p>The following operations are related to <code>DeleteBucketReplication</code>:</p>
35/// <ul>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutBucketReplication.html">PutBucketReplication</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketReplication.html">GetBucketReplication</a></p></li>
40/// </ul>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct DeleteBucketReplicationFluentBuilder {
43 handle: ::std::sync::Arc<crate::client::Handle>,
44 inner: crate::operation::delete_bucket_replication::builders::DeleteBucketReplicationInputBuilder,
45 config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48 crate::client::customize::internal::CustomizableSend<
49 crate::operation::delete_bucket_replication::DeleteBucketReplicationOutput,
50 crate::operation::delete_bucket_replication::DeleteBucketReplicationError,
51 > for DeleteBucketReplicationFluentBuilder
52{
53 fn send(
54 self,
55 config_override: crate::config::Builder,
56 ) -> crate::client::customize::internal::BoxFuture<
57 crate::client::customize::internal::SendResult<
58 crate::operation::delete_bucket_replication::DeleteBucketReplicationOutput,
59 crate::operation::delete_bucket_replication::DeleteBucketReplicationError,
60 >,
61 > {
62 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63 }
64}
65impl DeleteBucketReplicationFluentBuilder {
66 /// Creates a new `DeleteBucketReplicationFluentBuilder`.
67 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68 Self {
69 handle,
70 inner: ::std::default::Default::default(),
71 config_override: ::std::option::Option::None,
72 }
73 }
74 /// Access the DeleteBucketReplication as a reference.
75 pub fn as_input(&self) -> &crate::operation::delete_bucket_replication::builders::DeleteBucketReplicationInputBuilder {
76 &self.inner
77 }
78 /// Sends the request and returns the response.
79 ///
80 /// If an error occurs, an `SdkError` will be returned with additional details that
81 /// can be matched against.
82 ///
83 /// By default, any retryable failures will be retried twice. Retry behavior
84 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85 /// set when configuring the client.
86 pub async fn send(
87 self,
88 ) -> ::std::result::Result<
89 crate::operation::delete_bucket_replication::DeleteBucketReplicationOutput,
90 ::aws_smithy_runtime_api::client::result::SdkError<
91 crate::operation::delete_bucket_replication::DeleteBucketReplicationError,
92 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93 >,
94 > {
95 let input = self
96 .inner
97 .build()
98 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99 let runtime_plugins = crate::operation::delete_bucket_replication::DeleteBucketReplication::operation_runtime_plugins(
100 self.handle.runtime_plugins.clone(),
101 &self.handle.conf,
102 self.config_override,
103 );
104 crate::operation::delete_bucket_replication::DeleteBucketReplication::orchestrate(&runtime_plugins, input).await
105 }
106
107 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
108 pub fn customize(
109 self,
110 ) -> crate::client::customize::CustomizableOperation<
111 crate::operation::delete_bucket_replication::DeleteBucketReplicationOutput,
112 crate::operation::delete_bucket_replication::DeleteBucketReplicationError,
113 Self,
114 > {
115 crate::client::customize::CustomizableOperation::new(self)
116 }
117 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
118 self.set_config_override(::std::option::Option::Some(config_override.into()));
119 self
120 }
121
122 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
123 self.config_override = config_override;
124 self
125 }
126 /// <p>The Amazon Web Services account ID of the Outposts bucket to delete the replication configuration for.</p>
127 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.account_id(input.into());
129 self
130 }
131 /// <p>The Amazon Web Services account ID of the Outposts bucket to delete the replication configuration for.</p>
132 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_account_id(input);
134 self
135 }
136 /// <p>The Amazon Web Services account ID of the Outposts bucket to delete the replication configuration for.</p>
137 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_account_id()
139 }
140 /// <p>Specifies the S3 on Outposts bucket to delete the replication configuration for.</p>
141 /// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
142 /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
143 /// :
144 /// <account-id>
145 /// :outpost/
146 /// <outpost-id>
147 /// /bucket/
148 /// <my-bucket-name></my-bucket-name>
149 /// </outpost-id>
150 /// </account-id>
151 /// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
152 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.inner = self.inner.bucket(input.into());
154 self
155 }
156 /// <p>Specifies the S3 on Outposts bucket to delete the replication configuration for.</p>
157 /// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
158 /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
159 /// :
160 /// <account-id>
161 /// :outpost/
162 /// <outpost-id>
163 /// /bucket/
164 /// <my-bucket-name></my-bucket-name>
165 /// </outpost-id>
166 /// </account-id>
167 /// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
168 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.inner = self.inner.set_bucket(input);
170 self
171 }
172 /// <p>Specifies the S3 on Outposts bucket to delete the replication configuration for.</p>
173 /// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
174 /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
175 /// :
176 /// <account-id>
177 /// :outpost/
178 /// <outpost-id>
179 /// /bucket/
180 /// <my-bucket-name></my-bucket-name>
181 /// </outpost-id>
182 /// </account-id>
183 /// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
184 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
185 self.inner.get_bucket()
186 }
187}