aws_sdk_s3/operation/get_bucket_acl/_get_bucket_acl_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetBucketAclInput {
6 /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
7 /// <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>
8 /// <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>
9 pub bucket: ::std::option::Option<::std::string::String>,
10 /// <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>
11 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
12}
13impl GetBucketAclInput {
14 /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
15 /// <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>
16 /// <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>
17 pub fn bucket(&self) -> ::std::option::Option<&str> {
18 self.bucket.as_deref()
19 }
20 /// <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>
21 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
22 self.expected_bucket_owner.as_deref()
23 }
24}
25impl GetBucketAclInput {
26 /// Creates a new builder-style object to manufacture [`GetBucketAclInput`](crate::operation::get_bucket_acl::GetBucketAclInput).
27 pub fn builder() -> crate::operation::get_bucket_acl::builders::GetBucketAclInputBuilder {
28 crate::operation::get_bucket_acl::builders::GetBucketAclInputBuilder::default()
29 }
30}
31
32/// A builder for [`GetBucketAclInput`](crate::operation::get_bucket_acl::GetBucketAclInput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct GetBucketAclInputBuilder {
36 pub(crate) bucket: ::std::option::Option<::std::string::String>,
37 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
38}
39impl GetBucketAclInputBuilder {
40 /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
41 /// <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>
42 /// <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>
43 /// This field is required.
44 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.bucket = ::std::option::Option::Some(input.into());
46 self
47 }
48 /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
49 /// <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>
50 /// <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>
51 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.bucket = input;
53 self
54 }
55 /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
56 /// <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>
57 /// <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>
58 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
59 &self.bucket
60 }
61 /// <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>
62 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
64 self
65 }
66 /// <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>
67 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.expected_bucket_owner = input;
69 self
70 }
71 /// <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>
72 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
73 &self.expected_bucket_owner
74 }
75 /// Consumes the builder and constructs a [`GetBucketAclInput`](crate::operation::get_bucket_acl::GetBucketAclInput).
76 pub fn build(
77 self,
78 ) -> ::std::result::Result<crate::operation::get_bucket_acl::GetBucketAclInput, ::aws_smithy_types::error::operation::BuildError> {
79 ::std::result::Result::Ok(crate::operation::get_bucket_acl::GetBucketAclInput {
80 bucket: self.bucket,
81 expected_bucket_owner: self.expected_bucket_owner,
82 })
83 }
84}