1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | pub use crate::operation::put_bucket_abac::_put_bucket_abac_input::PutBucketAbacInputBuilder;
|
3 + |
|
4 + | pub use crate::operation::put_bucket_abac::_put_bucket_abac_output::PutBucketAbacOutputBuilder;
|
5 + |
|
6 + | impl crate::operation::put_bucket_abac::builders::PutBucketAbacInputBuilder {
|
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_bucket_abac::PutBucketAbacOutput,
|
13 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
14 + | crate::operation::put_bucket_abac::PutBucketAbacError,
|
15 + | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
16 + | >,
|
17 + | > {
|
18 + | let mut fluent_builder = client.put_bucket_abac();
|
19 + | fluent_builder.inner = self;
|
20 + | fluent_builder.send().await
|
21 + | }
|
22 + | }
|
23 + | /// Fluent builder constructing a request to `PutBucketAbac`.
|
24 + | ///
|
25 + | /// <p>Sets the attribute-based access control (ABAC) property of the general purpose bucket. You must have <code>s3:PutBucketABAC</code> permission to perform this action. When you enable ABAC, you can use tags for access control on your buckets. Additionally, when ABAC is enabled, you must use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_TagResource.html">TagResource</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_UntagResource.html">UntagResource</a> actions to manage tags on your buckets. You can nolonger use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html">PutBucketTagging</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html">DeleteBucketTagging</a> actions to tag your bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging-enable-abac.html">Enabling ABAC in general purpose buckets</a>.</p>
|
26 + | #[derive(::std::clone::Clone, ::std::fmt::Debug)]
|
27 + | pub struct PutBucketAbacFluentBuilder {
|
28 + | handle: ::std::sync::Arc<crate::client::Handle>,
|
29 + | inner: crate::operation::put_bucket_abac::builders::PutBucketAbacInputBuilder,
|
30 + | config_override: ::std::option::Option<crate::config::Builder>,
|
31 + | }
|
32 + | impl
|
33 + | crate::client::customize::internal::CustomizableSend<
|
34 + | crate::operation::put_bucket_abac::PutBucketAbacOutput,
|
35 + | crate::operation::put_bucket_abac::PutBucketAbacError,
|
36 + | > for PutBucketAbacFluentBuilder
|
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_bucket_abac::PutBucketAbacOutput,
|
44 + | crate::operation::put_bucket_abac::PutBucketAbacError,
|
45 + | >,
|
46 + | > {
|
47 + | ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
|
48 + | }
|
49 + | }
|
50 + | impl PutBucketAbacFluentBuilder {
|
51 + | /// Creates a new `PutBucketAbacFluentBuilder`.
|
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 PutBucketAbac as a reference.
|
60 + | pub fn as_input(&self) -> &crate::operation::put_bucket_abac::builders::PutBucketAbacInputBuilder {
|
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_bucket_abac::PutBucketAbacOutput,
|
75 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
76 + | crate::operation::put_bucket_abac::PutBucketAbacError,
|
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 = crate::operation::put_bucket_abac::PutBucketAbac::operation_runtime_plugins(
|
85 + | self.handle.runtime_plugins.clone(),
|
86 + | &self.handle.conf,
|
87 + | self.config_override,
|
88 + | );
|
89 + | crate::operation::put_bucket_abac::PutBucketAbac::orchestrate(&runtime_plugins, input).await
|
90 + | }
|
91 + |
|
92 + | /// Consumes this builder, creating a customizable operation that can be modified before being sent.
|
93 + | pub fn customize(
|
94 + | self,
|
95 + | ) -> crate::client::customize::CustomizableOperation<
|
96 + | crate::operation::put_bucket_abac::PutBucketAbacOutput,
|
97 + | crate::operation::put_bucket_abac::PutBucketAbacError,
|
98 + | Self,
|
99 + | > {
|
100 + | crate::client::customize::CustomizableOperation::new(self)
|
101 + | }
|
102 + | pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
|
103 + | self.set_config_override(::std::option::Option::Some(config_override.into()));
|
104 + | self
|
105 + | }
|
106 + |
|
107 + | pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
|
108 + | self.config_override = config_override;
|
109 + | self
|
110 + | }
|
111 + | /// <p>The name of the general purpose bucket.</p>
|
112 + | pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
113 + | self.inner = self.inner.bucket(input.into());
|
114 + | self
|
115 + | }
|
116 + | /// <p>The name of the general purpose bucket.</p>
|
117 + | pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
118 + | self.inner = self.inner.set_bucket(input);
|
119 + | self
|
120 + | }
|
121 + | /// <p>The name of the general purpose bucket.</p>
|
122 + | pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
|
123 + | self.inner.get_bucket()
|
124 + | }
|
125 + | /// <p>The MD5 hash of the <code>PutBucketAbac</code> request body.</p>
|
126 + | /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
|
127 + | pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
128 + | self.inner = self.inner.content_md5(input.into());
|
129 + | self
|
130 + | }
|
131 + | /// <p>The MD5 hash of the <code>PutBucketAbac</code> request body.</p>
|
132 + | /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
|
133 + | pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
134 + | self.inner = self.inner.set_content_md5(input);
|
135 + | self
|
136 + | }
|
137 + | /// <p>The MD5 hash of the <code>PutBucketAbac</code> request body.</p>
|
138 + | /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
|
139 + | pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
|
140 + | self.inner.get_content_md5()
|
141 + | }
|
142 + | /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
|
143 + | pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
|
144 + | self.inner = self.inner.checksum_algorithm(input);
|
145 + | self
|
146 + | }
|
147 + | /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
|
148 + | pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
|
149 + | self.inner = self.inner.set_checksum_algorithm(input);
|
150 + | self
|
151 + | }
|
152 + | /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
|
153 + | pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
|
154 + | self.inner.get_checksum_algorithm()
|
155 + | }
|
156 + | /// <p>The Amazon Web Services account ID of the general purpose bucket's owner.</p>
|
157 + | pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
158 + | self.inner = self.inner.expected_bucket_owner(input.into());
|
159 + | self
|
160 + | }
|
161 + | /// <p>The Amazon Web Services account ID of the general purpose bucket's owner.</p>
|
162 + | pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
163 + | self.inner = self.inner.set_expected_bucket_owner(input);
|
164 + | self
|
165 + | }
|
166 + | /// <p>The Amazon Web Services account ID of the general purpose bucket's owner.</p>
|
167 + | pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
|
168 + | self.inner.get_expected_bucket_owner()
|
169 + | }
|
170 + | /// <p>The ABAC status of the general purpose bucket. When ABAC is enabled for the general purpose bucket, you can use tags to manage access to the general purpose buckets as well as for cost tracking purposes. When ABAC is disabled for the general purpose buckets, you can only use tags for cost tracking purposes. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging.html">Using tags with S3 general purpose buckets</a>.</p>
|
171 + | pub fn abac_status(mut self, input: crate::types::AbacStatus) -> Self {
|
172 + | self.inner = self.inner.abac_status(input);
|
173 + | self
|
174 + | }
|
175 + | /// <p>The ABAC status of the general purpose bucket. When ABAC is enabled for the general purpose bucket, you can use tags to manage access to the general purpose buckets as well as for cost tracking purposes. When ABAC is disabled for the general purpose buckets, you can only use tags for cost tracking purposes. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging.html">Using tags with S3 general purpose buckets</a>.</p>
|
176 + | pub fn set_abac_status(mut self, input: ::std::option::Option<crate::types::AbacStatus>) -> Self {
|
177 + | self.inner = self.inner.set_abac_status(input);
|
178 + | self
|
179 + | }
|
180 + | /// <p>The ABAC status of the general purpose bucket. When ABAC is enabled for the general purpose bucket, you can use tags to manage access to the general purpose buckets as well as for cost tracking purposes. When ABAC is disabled for the general purpose buckets, you can only use tags for cost tracking purposes. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging.html">Using tags with S3 general purpose buckets</a>.</p>
|
181 + | pub fn get_abac_status(&self) -> &::std::option::Option<crate::types::AbacStatus> {
|
182 + | self.inner.get_abac_status()
|
183 + | }
|
184 + | }
|