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/// <note>
26/// <p>This operation is not supported for directory buckets.</p>
27/// </note>
28/// <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>
29/// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
30/// <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>
31/// <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>
32/// </note>
33/// <p>The following operations are related to <code>GetObjectAcl</code>:</p>
34/// <ul>
35/// <li>
36/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
37/// <li>
38/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html">GetObjectAttributes</a></p></li>
39/// <li>
40/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a></p></li>
41/// <li>
42/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
43/// </ul><important>
44/// <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>
45/// </important>
46#[derive(::std::clone::Clone, ::std::fmt::Debug)]
47pub struct GetObjectAclFluentBuilder {
48 handle: ::std::sync::Arc<crate::client::Handle>,
49 inner: crate::operation::get_object_acl::builders::GetObjectAclInputBuilder,
50 config_override: ::std::option::Option<crate::config::Builder>,
51}
52impl
53 crate::client::customize::internal::CustomizableSend<
54 crate::operation::get_object_acl::GetObjectAclOutput,
55 crate::operation::get_object_acl::GetObjectAclError,
56 > for GetObjectAclFluentBuilder
57{
58 fn send(
59 self,
60 config_override: crate::config::Builder,
61 ) -> crate::client::customize::internal::BoxFuture<
62 crate::client::customize::internal::SendResult<
63 crate::operation::get_object_acl::GetObjectAclOutput,
64 crate::operation::get_object_acl::GetObjectAclError,
65 >,
66 > {
67 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
68 }
69}
70impl GetObjectAclFluentBuilder {
71 /// Creates a new `GetObjectAclFluentBuilder`.
72 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
73 Self {
74 handle,
75 inner: ::std::default::Default::default(),
76 config_override: ::std::option::Option::None,
77 }
78 }
79 /// Access the GetObjectAcl as a reference.
80 pub fn as_input(&self) -> &crate::operation::get_object_acl::builders::GetObjectAclInputBuilder {
81 &self.inner
82 }
83 /// Sends the request and returns the response.
84 ///
85 /// If an error occurs, an `SdkError` will be returned with additional details that
86 /// can be matched against.
87 ///
88 /// By default, any retryable failures will be retried twice. Retry behavior
89 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
90 /// set when configuring the client.
91 pub async fn send(
92 self,
93 ) -> ::std::result::Result<
94 crate::operation::get_object_acl::GetObjectAclOutput,
95 ::aws_smithy_runtime_api::client::result::SdkError<
96 crate::operation::get_object_acl::GetObjectAclError,
97 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
98 >,
99 > {
100 let input = self
101 .inner
102 .build()
103 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
104 let runtime_plugins = crate::operation::get_object_acl::GetObjectAcl::operation_runtime_plugins(
105 self.handle.runtime_plugins.clone(),
106 &self.handle.conf,
107 self.config_override,
108 );
109 crate::operation::get_object_acl::GetObjectAcl::orchestrate(&runtime_plugins, input).await
110 }
111
112 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
113 pub fn customize(
114 self,
115 ) -> crate::client::customize::CustomizableOperation<
116 crate::operation::get_object_acl::GetObjectAclOutput,
117 crate::operation::get_object_acl::GetObjectAclError,
118 Self,
119 > {
120 crate::client::customize::CustomizableOperation::new(self)
121 }
122 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
123 self.set_config_override(::std::option::Option::Some(config_override.into()));
124 self
125 }
126
127 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
128 self.config_override = config_override;
129 self
130 }
131 /// <p>The bucket name that contains the object for which to get the ACL information.</p>
132 /// <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>
133 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.bucket(input.into());
135 self
136 }
137 /// <p>The bucket name that contains the object for which to get the ACL information.</p>
138 /// <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>
139 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_bucket(input);
141 self
142 }
143 /// <p>The bucket name that contains the object for which to get the ACL information.</p>
144 /// <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>
145 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_bucket()
147 }
148 /// <p>The key of the object for which to get the ACL information.</p>
149 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.key(input.into());
151 self
152 }
153 /// <p>The key of the object for which to get the ACL information.</p>
154 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.inner = self.inner.set_key(input);
156 self
157 }
158 /// <p>The key of the object for which to get the ACL information.</p>
159 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
160 self.inner.get_key()
161 }
162 /// <p>Version ID used to reference a specific version of the object.</p><note>
163 /// <p>This functionality is not supported for directory buckets.</p>
164 /// </note>
165 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.inner = self.inner.version_id(input.into());
167 self
168 }
169 /// <p>Version ID used to reference a specific version of the object.</p><note>
170 /// <p>This functionality is not supported for directory buckets.</p>
171 /// </note>
172 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.inner = self.inner.set_version_id(input);
174 self
175 }
176 /// <p>Version ID used to reference a specific version of the object.</p><note>
177 /// <p>This functionality is not supported for directory buckets.</p>
178 /// </note>
179 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
180 self.inner.get_version_id()
181 }
182 /// <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>
183 /// <p>This functionality is not supported for directory buckets.</p>
184 /// </note>
185 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
186 self.inner = self.inner.request_payer(input);
187 self
188 }
189 /// <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>
190 /// <p>This functionality is not supported for directory buckets.</p>
191 /// </note>
192 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
193 self.inner = self.inner.set_request_payer(input);
194 self
195 }
196 /// <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>
197 /// <p>This functionality is not supported for directory buckets.</p>
198 /// </note>
199 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
200 self.inner.get_request_payer()
201 }
202 /// <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>
203 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.inner = self.inner.expected_bucket_owner(input.into());
205 self
206 }
207 /// <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>
208 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.inner = self.inner.set_expected_bucket_owner(input);
210 self
211 }
212 /// <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>
213 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
214 self.inner.get_expected_bucket_owner()
215 }
216}