10 10 | client: &crate::Client,
|
11 11 | ) -> ::std::result::Result<
|
12 12 | crate::operation::get_bucket_location::GetBucketLocationOutput,
|
13 13 | ::aws_smithy_runtime_api::client::result::SdkError<
|
14 14 | crate::operation::get_bucket_location::GetBucketLocationError,
|
15 15 | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
16 16 | >,
|
17 17 | > {
|
18 18 | let mut fluent_builder = client.get_bucket_location();
|
19 19 | fluent_builder.inner = self;
|
20 20 | fluent_builder.send().await
|
21 21 | }
|
22 22 | }
|
23 23 | /// Fluent builder constructing a request to `GetBucketLocation`.
|
24 24 | ///
|
25 25 | /// <note>
|
26 26 | /// <p>This operation is not supported for directory buckets.</p>
|
27 27 | /// </note>
|
28 28 | /// <p>Returns the Region the bucket resides in. You set the bucket's Region using the <code>LocationConstraint</code> request parameter in a <code>CreateBucket</code> request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a>.</p>
|
29 29 | /// <p>When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.</p>
|
30 30 | /// <p>When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code <code>InvalidAccessPointAliasError</code> is returned. For more information about <code>InvalidAccessPointAliasError</code>, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList">List of Error Codes</a>.</p><note>
|
31 31 | /// <p>We recommend that you use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html">HeadBucket</a> to return the Region that a bucket resides in. For backward compatibility, Amazon S3 continues to support GetBucketLocation.</p>
|
32 32 | /// </note>
|
33 33 | /// <p>The following operations are related to <code>GetBucketLocation</code>:</p>
|
34 34 | /// <ul>
|
35 35 | /// <li>
|
36 36 | /// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
|
37 37 | /// <li>
|
38 38 | /// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a></p></li>
|
39 39 | /// </ul>
|
40 + | #[deprecated(
|
41 + | note = "Use HeadBucket operation instead to determine the bucket's region. For more information, see https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html"
|
42 + | )]
|
40 43 | #[derive(::std::clone::Clone, ::std::fmt::Debug)]
|
41 44 | pub struct GetBucketLocationFluentBuilder {
|
42 45 | handle: ::std::sync::Arc<crate::client::Handle>,
|
43 46 | inner: crate::operation::get_bucket_location::builders::GetBucketLocationInputBuilder,
|
44 47 | config_override: ::std::option::Option<crate::config::Builder>,
|
45 48 | }
|
46 49 | impl
|
47 50 | crate::client::customize::internal::CustomizableSend<
|
48 51 | crate::operation::get_bucket_location::GetBucketLocationOutput,
|
49 52 | crate::operation::get_bucket_location::GetBucketLocationError,
|
50 53 | > for GetBucketLocationFluentBuilder
|
51 54 | {
|
52 55 | fn send(
|
53 56 | self,
|
54 57 | config_override: crate::config::Builder,
|
55 58 | ) -> crate::client::customize::internal::BoxFuture<
|
56 59 | crate::client::customize::internal::SendResult<
|
57 60 | crate::operation::get_bucket_location::GetBucketLocationOutput,
|
58 61 | crate::operation::get_bucket_location::GetBucketLocationError,
|
59 62 | >,
|
60 63 | > {
|
61 64 | ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
|
62 65 | }
|
63 66 | }
|
64 67 | impl GetBucketLocationFluentBuilder {
|
65 68 | /// Creates a new `GetBucketLocationFluentBuilder`.
|
66 69 | pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
|
67 70 | Self {
|
68 71 | handle,
|
69 72 | inner: ::std::default::Default::default(),
|