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