// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`GetBucketPolicy`](crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`bucket(impl Into<String>)`](crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder::bucket) / [`set_bucket(Option<String>)`](crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder::set_bucket): <p>The bucket name for which to get the bucket policy.</p>
/// - [`expected_bucket_owner(impl Into<String>)`](crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder::expected_bucket_owner) / [`set_expected_bucket_owner(Option<String>)`](crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder::set_expected_bucket_owner): <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
/// - On success, responds with [`GetBucketPolicyOutput`](crate::operation::get_bucket_policy::GetBucketPolicyOutput) with field(s):
/// - [`policy(Option<String>)`](crate::operation::get_bucket_policy::GetBucketPolicyOutput::policy): <p>The bucket policy as a JSON document.</p>
/// - On failure, responds with [`SdkError<GetBucketPolicyError>`](crate::operation::get_bucket_policy::GetBucketPolicyError)
pub fn get_bucket_policy(
&self,
) -> crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder {
crate::operation::get_bucket_policy::builders::GetBucketPolicyFluentBuilder::new(
self.handle.clone(),
)
}
}