aws_sdk_s3/operation/list_buckets/_list_buckets_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 ListBucketsInput {
6 /// <p>Maximum number of buckets to be returned in response. When the number is more than the count of buckets that are owned by an Amazon Web Services account, return all the buckets in response.</p>
7 pub max_buckets: ::std::option::Option<i32>,
8 /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
9 /// <p>Length Constraints: Minimum length of 0. Maximum length of 1024.</p>
10 /// <p>Required: No.</p><note>
11 /// <p>If you specify the <code>bucket-region</code>, <code>prefix</code>, or <code>continuation-token</code> query parameters without using <code>max-buckets</code> to set the maximum number of buckets returned in the response, Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.</p>
12 /// </note>
13 pub continuation_token: ::std::option::Option<::std::string::String>,
14 /// <p>Limits the response to bucket names that begin with the specified bucket name prefix.</p>
15 pub prefix: ::std::option::Option<::std::string::String>,
16 /// <p>Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services Region must be expressed according to the Amazon Web Services Region code, such as <code>us-west-2</code> for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>.</p><note>
17 /// <p>Requests made to a Regional endpoint that is different from the <code>bucket-region</code> parameter are not supported. For example, if you want to limit the response to your buckets in Region <code>us-west-2</code>, the request must be made to an endpoint in Region <code>us-west-2</code>.</p>
18 /// </note>
19 pub bucket_region: ::std::option::Option<::std::string::String>,
20}
21impl ListBucketsInput {
22 /// <p>Maximum number of buckets to be returned in response. When the number is more than the count of buckets that are owned by an Amazon Web Services account, return all the buckets in response.</p>
23 pub fn max_buckets(&self) -> ::std::option::Option<i32> {
24 self.max_buckets
25 }
26 /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
27 /// <p>Length Constraints: Minimum length of 0. Maximum length of 1024.</p>
28 /// <p>Required: No.</p><note>
29 /// <p>If you specify the <code>bucket-region</code>, <code>prefix</code>, or <code>continuation-token</code> query parameters without using <code>max-buckets</code> to set the maximum number of buckets returned in the response, Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.</p>
30 /// </note>
31 pub fn continuation_token(&self) -> ::std::option::Option<&str> {
32 self.continuation_token.as_deref()
33 }
34 /// <p>Limits the response to bucket names that begin with the specified bucket name prefix.</p>
35 pub fn prefix(&self) -> ::std::option::Option<&str> {
36 self.prefix.as_deref()
37 }
38 /// <p>Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services Region must be expressed according to the Amazon Web Services Region code, such as <code>us-west-2</code> for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>.</p><note>
39 /// <p>Requests made to a Regional endpoint that is different from the <code>bucket-region</code> parameter are not supported. For example, if you want to limit the response to your buckets in Region <code>us-west-2</code>, the request must be made to an endpoint in Region <code>us-west-2</code>.</p>
40 /// </note>
41 pub fn bucket_region(&self) -> ::std::option::Option<&str> {
42 self.bucket_region.as_deref()
43 }
44}
45impl ListBucketsInput {
46 /// Creates a new builder-style object to manufacture [`ListBucketsInput`](crate::operation::list_buckets::ListBucketsInput).
47 pub fn builder() -> crate::operation::list_buckets::builders::ListBucketsInputBuilder {
48 crate::operation::list_buckets::builders::ListBucketsInputBuilder::default()
49 }
50}
51
52/// A builder for [`ListBucketsInput`](crate::operation::list_buckets::ListBucketsInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct ListBucketsInputBuilder {
56 pub(crate) max_buckets: ::std::option::Option<i32>,
57 pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
58 pub(crate) prefix: ::std::option::Option<::std::string::String>,
59 pub(crate) bucket_region: ::std::option::Option<::std::string::String>,
60}
61impl ListBucketsInputBuilder {
62 /// <p>Maximum number of buckets to be returned in response. When the number is more than the count of buckets that are owned by an Amazon Web Services account, return all the buckets in response.</p>
63 pub fn max_buckets(mut self, input: i32) -> Self {
64 self.max_buckets = ::std::option::Option::Some(input);
65 self
66 }
67 /// <p>Maximum number of buckets to be returned in response. When the number is more than the count of buckets that are owned by an Amazon Web Services account, return all the buckets in response.</p>
68 pub fn set_max_buckets(mut self, input: ::std::option::Option<i32>) -> Self {
69 self.max_buckets = input;
70 self
71 }
72 /// <p>Maximum number of buckets to be returned in response. When the number is more than the count of buckets that are owned by an Amazon Web Services account, return all the buckets in response.</p>
73 pub fn get_max_buckets(&self) -> &::std::option::Option<i32> {
74 &self.max_buckets
75 }
76 /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
77 /// <p>Length Constraints: Minimum length of 0. Maximum length of 1024.</p>
78 /// <p>Required: No.</p><note>
79 /// <p>If you specify the <code>bucket-region</code>, <code>prefix</code>, or <code>continuation-token</code> query parameters without using <code>max-buckets</code> to set the maximum number of buckets returned in the response, Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.</p>
80 /// </note>
81 pub fn continuation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.continuation_token = ::std::option::Option::Some(input.into());
83 self
84 }
85 /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
86 /// <p>Length Constraints: Minimum length of 0. Maximum length of 1024.</p>
87 /// <p>Required: No.</p><note>
88 /// <p>If you specify the <code>bucket-region</code>, <code>prefix</code>, or <code>continuation-token</code> query parameters without using <code>max-buckets</code> to set the maximum number of buckets returned in the response, Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.</p>
89 /// </note>
90 pub fn set_continuation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.continuation_token = input;
92 self
93 }
94 /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
95 /// <p>Length Constraints: Minimum length of 0. Maximum length of 1024.</p>
96 /// <p>Required: No.</p><note>
97 /// <p>If you specify the <code>bucket-region</code>, <code>prefix</code>, or <code>continuation-token</code> query parameters without using <code>max-buckets</code> to set the maximum number of buckets returned in the response, Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.</p>
98 /// </note>
99 pub fn get_continuation_token(&self) -> &::std::option::Option<::std::string::String> {
100 &self.continuation_token
101 }
102 /// <p>Limits the response to bucket names that begin with the specified bucket name prefix.</p>
103 pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104 self.prefix = ::std::option::Option::Some(input.into());
105 self
106 }
107 /// <p>Limits the response to bucket names that begin with the specified bucket name prefix.</p>
108 pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.prefix = input;
110 self
111 }
112 /// <p>Limits the response to bucket names that begin with the specified bucket name prefix.</p>
113 pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
114 &self.prefix
115 }
116 /// <p>Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services Region must be expressed according to the Amazon Web Services Region code, such as <code>us-west-2</code> for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>.</p><note>
117 /// <p>Requests made to a Regional endpoint that is different from the <code>bucket-region</code> parameter are not supported. For example, if you want to limit the response to your buckets in Region <code>us-west-2</code>, the request must be made to an endpoint in Region <code>us-west-2</code>.</p>
118 /// </note>
119 pub fn bucket_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.bucket_region = ::std::option::Option::Some(input.into());
121 self
122 }
123 /// <p>Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services Region must be expressed according to the Amazon Web Services Region code, such as <code>us-west-2</code> for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>.</p><note>
124 /// <p>Requests made to a Regional endpoint that is different from the <code>bucket-region</code> parameter are not supported. For example, if you want to limit the response to your buckets in Region <code>us-west-2</code>, the request must be made to an endpoint in Region <code>us-west-2</code>.</p>
125 /// </note>
126 pub fn set_bucket_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.bucket_region = input;
128 self
129 }
130 /// <p>Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services Region must be expressed according to the Amazon Web Services Region code, such as <code>us-west-2</code> for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>.</p><note>
131 /// <p>Requests made to a Regional endpoint that is different from the <code>bucket-region</code> parameter are not supported. For example, if you want to limit the response to your buckets in Region <code>us-west-2</code>, the request must be made to an endpoint in Region <code>us-west-2</code>.</p>
132 /// </note>
133 pub fn get_bucket_region(&self) -> &::std::option::Option<::std::string::String> {
134 &self.bucket_region
135 }
136 /// Consumes the builder and constructs a [`ListBucketsInput`](crate::operation::list_buckets::ListBucketsInput).
137 pub fn build(self) -> ::std::result::Result<crate::operation::list_buckets::ListBucketsInput, ::aws_smithy_types::error::operation::BuildError> {
138 ::std::result::Result::Ok(crate::operation::list_buckets::ListBucketsInput {
139 max_buckets: self.max_buckets,
140 continuation_token: self.continuation_token,
141 prefix: self.prefix,
142 bucket_region: self.bucket_region,
143 })
144 }
145}