aws_sdk_s3/operation/get_object_acl/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_object_acl::_get_object_acl_output::GetObjectAclOutputBuilder;
3
4pub use crate::operation::get_object_acl::_get_object_acl_input::GetObjectAclInputBuilder;
5
6impl crate::operation::get_object_acl::builders::GetObjectAclInputBuilder {
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::get_object_acl::GetObjectAclOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_object_acl::GetObjectAclError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_object_acl();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetObjectAcl`.
24///
25/// <important>
26/// <p>End of support notice: Beginning November 21, 2025, Amazon S3 will stop returning <code>DisplayName</code>. Update your applications to use canonical IDs (unique identifier for Amazon Web Services accounts), Amazon Web Services account ID (12 digit identifier) or IAM ARNs (full resource naming) as a direct replacement of <code>DisplayName</code>.</p>
27/// <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region, Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
28/// </important> <note>
29/// <p>This operation is not supported for directory buckets.</p>
30/// </note>
31/// <p>Returns the access control list (ACL) of an object. To use this operation, you must have <code>s3:GetObjectAcl</code> permissions or <code>READ_ACP</code> access to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping">Mapping of ACL permissions and access policy permissions</a> in the <i>Amazon S3 User Guide</i></p>
32/// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
33/// <p>By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.</p><note>
34/// <p>If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests to read ACLs are still supported and return the <code>bucket-owner-full-control</code> ACL with the owner being the account that created the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling object ownership and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p>
35/// </note>
36/// <p>The following operations are related to <code>GetObjectAcl</code>:</p>
37/// <ul>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
40/// <li>
41/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html">GetObjectAttributes</a></p></li>
42/// <li>
43/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a></p></li>
44/// <li>
45/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
46/// </ul><important>
47/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
48/// </important>
49#[derive(::std::clone::Clone, ::std::fmt::Debug)]
50pub struct GetObjectAclFluentBuilder {
51 handle: ::std::sync::Arc<crate::client::Handle>,
52 inner: crate::operation::get_object_acl::builders::GetObjectAclInputBuilder,
53 config_override: ::std::option::Option<crate::config::Builder>,
54}
55impl
56 crate::client::customize::internal::CustomizableSend<
57 crate::operation::get_object_acl::GetObjectAclOutput,
58 crate::operation::get_object_acl::GetObjectAclError,
59 > for GetObjectAclFluentBuilder
60{
61 fn send(
62 self,
63 config_override: crate::config::Builder,
64 ) -> crate::client::customize::internal::BoxFuture<
65 crate::client::customize::internal::SendResult<
66 crate::operation::get_object_acl::GetObjectAclOutput,
67 crate::operation::get_object_acl::GetObjectAclError,
68 >,
69 > {
70 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
71 }
72}
73impl GetObjectAclFluentBuilder {
74 /// Creates a new `GetObjectAclFluentBuilder`.
75 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
76 Self {
77 handle,
78 inner: ::std::default::Default::default(),
79 config_override: ::std::option::Option::None,
80 }
81 }
82 /// Access the GetObjectAcl as a reference.
83 pub fn as_input(&self) -> &crate::operation::get_object_acl::builders::GetObjectAclInputBuilder {
84 &self.inner
85 }
86 /// Sends the request and returns the response.
87 ///
88 /// If an error occurs, an `SdkError` will be returned with additional details that
89 /// can be matched against.
90 ///
91 /// By default, any retryable failures will be retried twice. Retry behavior
92 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
93 /// set when configuring the client.
94 pub async fn send(
95 self,
96 ) -> ::std::result::Result<
97 crate::operation::get_object_acl::GetObjectAclOutput,
98 ::aws_smithy_runtime_api::client::result::SdkError<
99 crate::operation::get_object_acl::GetObjectAclError,
100 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
101 >,
102 > {
103 let input = self
104 .inner
105 .build()
106 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
107 let runtime_plugins = crate::operation::get_object_acl::GetObjectAcl::operation_runtime_plugins(
108 self.handle.runtime_plugins.clone(),
109 &self.handle.conf,
110 self.config_override,
111 );
112 crate::operation::get_object_acl::GetObjectAcl::orchestrate(&runtime_plugins, input).await
113 }
114
115 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
116 pub fn customize(
117 self,
118 ) -> crate::client::customize::CustomizableOperation<
119 crate::operation::get_object_acl::GetObjectAclOutput,
120 crate::operation::get_object_acl::GetObjectAclError,
121 Self,
122 > {
123 crate::client::customize::CustomizableOperation::new(self)
124 }
125 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
126 self.set_config_override(::std::option::Option::Some(config_override.into()));
127 self
128 }
129
130 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
131 self.config_override = config_override;
132 self
133 }
134 /// <p>The bucket name that contains the object for which to get the ACL information.</p>
135 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
136 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.inner = self.inner.bucket(input.into());
138 self
139 }
140 /// <p>The bucket name that contains the object for which to get the ACL information.</p>
141 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
142 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.inner = self.inner.set_bucket(input);
144 self
145 }
146 /// <p>The bucket name that contains the object for which to get the ACL information.</p>
147 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
148 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
149 self.inner.get_bucket()
150 }
151 /// <p>The key of the object for which to get the ACL information.</p>
152 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.inner = self.inner.key(input.into());
154 self
155 }
156 /// <p>The key of the object for which to get the ACL information.</p>
157 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158 self.inner = self.inner.set_key(input);
159 self
160 }
161 /// <p>The key of the object for which to get the ACL information.</p>
162 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
163 self.inner.get_key()
164 }
165 /// <p>Version ID used to reference a specific version of the object.</p><note>
166 /// <p>This functionality is not supported for directory buckets.</p>
167 /// </note>
168 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169 self.inner = self.inner.version_id(input.into());
170 self
171 }
172 /// <p>Version ID used to reference a specific version of the object.</p><note>
173 /// <p>This functionality is not supported for directory buckets.</p>
174 /// </note>
175 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176 self.inner = self.inner.set_version_id(input);
177 self
178 }
179 /// <p>Version ID used to reference a specific version of the object.</p><note>
180 /// <p>This functionality is not supported for directory buckets.</p>
181 /// </note>
182 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
183 self.inner.get_version_id()
184 }
185 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
186 /// <p>This functionality is not supported for directory buckets.</p>
187 /// </note>
188 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
189 self.inner = self.inner.request_payer(input);
190 self
191 }
192 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
193 /// <p>This functionality is not supported for directory buckets.</p>
194 /// </note>
195 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
196 self.inner = self.inner.set_request_payer(input);
197 self
198 }
199 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
200 /// <p>This functionality is not supported for directory buckets.</p>
201 /// </note>
202 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
203 self.inner.get_request_payer()
204 }
205 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
206 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.inner = self.inner.expected_bucket_owner(input.into());
208 self
209 }
210 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
211 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.inner = self.inner.set_expected_bucket_owner(input);
213 self
214 }
215 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
216 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
217 self.inner.get_expected_bucket_owner()
218 }
219}