1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateAccessPointInput {
/// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
pub account_id: ::std::option::Option<::std::string::String>,
/// <p>The name you want to assign to this access point.</p>
/// <p>For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the <code>ZoneID</code> (Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by <code>--xa-s3</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The name of the bucket that you want to associate this access point with.</p>
/// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
/// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
/// :
/// <account-id>
/// :outpost/
/// <outpost-id>
/// /bucket/
/// <my-bucket-name></my-bucket-name>
/// </outpost-id>
/// </account-id>
/// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
pub bucket: ::std::option::Option<::std::string::String>,
/// <p>If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).</p><note>
/// <p>This is required for creating an access point for Amazon S3 on Outposts buckets.</p>
/// </note>
pub vpc_configuration: ::std::option::Option<crate::types::VpcConfiguration>,
/// <p>The <code>PublicAccessBlock</code> configuration that you want to apply to the access point.</p>
pub public_access_block_configuration: ::std::option::Option<crate::types::PublicAccessBlockConfiguration>,
/// <p>The Amazon Web Services account ID associated with the S3 bucket associated with this access point.</p>
/// <p>For same account access point when your bucket and access point belong to the same account owner, the <code>BucketAccountId</code> is not required. For cross-account access point when your bucket and access point are not in the same account, the <code>BucketAccountId</code> is required.</p>
pub bucket_account_id: ::std::option::Option<::std::string::String>,
/// <p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
/// <p>Scope is only supported for access points attached to directory buckets.</p>
/// </note>
pub scope: ::std::option::Option<crate::types::Scope>,
/// <p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using tags for attribute-based access control (ABAC)</a>.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateAccessPointInput {
/// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
/// <p>The name you want to assign to this access point.</p>
/// <p>For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the <code>ZoneID</code> (Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by <code>--xa-s3</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The name of the bucket that you want to associate this access point with.</p>
/// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
/// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
/// :
/// <account-id>
/// :outpost/
/// <outpost-id>
/// /bucket/
/// <my-bucket-name></my-bucket-name>
/// </outpost-id>
/// </account-id>
/// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
pub fn bucket(&self) -> ::std::option::Option<&str> {
self.bucket.as_deref()
}
/// <p>If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).</p><note>
/// <p>This is required for creating an access point for Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn vpc_configuration(&self) -> ::std::option::Option<&crate::types::VpcConfiguration> {
self.vpc_configuration.as_ref()
}
/// <p>The <code>PublicAccessBlock</code> configuration that you want to apply to the access point.</p>
pub fn public_access_block_configuration(&self) -> ::std::option::Option<&crate::types::PublicAccessBlockConfiguration> {
self.public_access_block_configuration.as_ref()
}
/// <p>The Amazon Web Services account ID associated with the S3 bucket associated with this access point.</p>
/// <p>For same account access point when your bucket and access point belong to the same account owner, the <code>BucketAccountId</code> is not required. For cross-account access point when your bucket and access point are not in the same account, the <code>BucketAccountId</code> is required.</p>
pub fn bucket_account_id(&self) -> ::std::option::Option<&str> {
self.bucket_account_id.as_deref()
}
/// <p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
/// <p>Scope is only supported for access points attached to directory buckets.</p>
/// </note>
pub fn scope(&self) -> ::std::option::Option<&crate::types::Scope> {
self.scope.as_ref()
}
/// <p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using tags for attribute-based access control (ABAC)</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
}
impl CreateAccessPointInput {
/// Creates a new builder-style object to manufacture [`CreateAccessPointInput`](crate::operation::create_access_point::CreateAccessPointInput).
pub fn builder() -> crate::operation::create_access_point::builders::CreateAccessPointInputBuilder {
crate::operation::create_access_point::builders::CreateAccessPointInputBuilder::default()
}
}
/// A builder for [`CreateAccessPointInput`](crate::operation::create_access_point::CreateAccessPointInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateAccessPointInputBuilder {
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) bucket: ::std::option::Option<::std::string::String>,
pub(crate) vpc_configuration: ::std::option::Option<crate::types::VpcConfiguration>,
pub(crate) public_access_block_configuration: ::std::option::Option<crate::types::PublicAccessBlockConfiguration>,
pub(crate) bucket_account_id: ::std::option::Option<::std::string::String>,
pub(crate) scope: ::std::option::Option<crate::types::Scope>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateAccessPointInputBuilder {
/// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
/// This field is required.
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
/// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// <p>The name you want to assign to this access point.</p>
/// <p>For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the <code>ZoneID</code> (Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by <code>--xa-s3</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name you want to assign to this access point.</p>
/// <p>For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the <code>ZoneID</code> (Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by <code>--xa-s3</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name you want to assign to this access point.</p>
/// <p>For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the <code>ZoneID</code> (Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by <code>--xa-s3</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The name of the bucket that you want to associate this access point with.</p>
/// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
/// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
/// :
/// <account-id>
/// :outpost/
/// <outpost-id>
/// /bucket/
/// <my-bucket-name></my-bucket-name>
/// </outpost-id>
/// </account-id>
/// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
/// This field is required.
pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bucket = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the bucket that you want to associate this access point with.</p>
/// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
/// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
/// :
/// <account-id>
/// :outpost/
/// <outpost-id>
/// /bucket/
/// <my-bucket-name></my-bucket-name>
/// </outpost-id>
/// </account-id>
/// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bucket = input;
self
}
/// <p>The name of the bucket that you want to associate this access point with.</p>
/// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
/// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
/// :
/// <account-id>
/// :outpost/
/// <outpost-id>
/// /bucket/
/// <my-bucket-name></my-bucket-name>
/// </outpost-id>
/// </account-id>
/// </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
&self.bucket
}
/// <p>If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).</p><note>
/// <p>This is required for creating an access point for Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn vpc_configuration(mut self, input: crate::types::VpcConfiguration) -> Self {
self.vpc_configuration = ::std::option::Option::Some(input);
self
}
/// <p>If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).</p><note>
/// <p>This is required for creating an access point for Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn set_vpc_configuration(mut self, input: ::std::option::Option<crate::types::VpcConfiguration>) -> Self {
self.vpc_configuration = input;
self
}
/// <p>If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).</p><note>
/// <p>This is required for creating an access point for Amazon S3 on Outposts buckets.</p>
/// </note>
pub fn get_vpc_configuration(&self) -> &::std::option::Option<crate::types::VpcConfiguration> {
&self.vpc_configuration
}
/// <p>The <code>PublicAccessBlock</code> configuration that you want to apply to the access point.</p>
pub fn public_access_block_configuration(mut self, input: crate::types::PublicAccessBlockConfiguration) -> Self {
self.public_access_block_configuration = ::std::option::Option::Some(input);
self
}
/// <p>The <code>PublicAccessBlock</code> configuration that you want to apply to the access point.</p>
pub fn set_public_access_block_configuration(mut self, input: ::std::option::Option<crate::types::PublicAccessBlockConfiguration>) -> Self {
self.public_access_block_configuration = input;
self
}
/// <p>The <code>PublicAccessBlock</code> configuration that you want to apply to the access point.</p>
pub fn get_public_access_block_configuration(&self) -> &::std::option::Option<crate::types::PublicAccessBlockConfiguration> {
&self.public_access_block_configuration
}
/// <p>The Amazon Web Services account ID associated with the S3 bucket associated with this access point.</p>
/// <p>For same account access point when your bucket and access point belong to the same account owner, the <code>BucketAccountId</code> is not required. For cross-account access point when your bucket and access point are not in the same account, the <code>BucketAccountId</code> is required.</p>
pub fn bucket_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bucket_account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services account ID associated with the S3 bucket associated with this access point.</p>
/// <p>For same account access point when your bucket and access point belong to the same account owner, the <code>BucketAccountId</code> is not required. For cross-account access point when your bucket and access point are not in the same account, the <code>BucketAccountId</code> is required.</p>
pub fn set_bucket_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bucket_account_id = input;
self
}
/// <p>The Amazon Web Services account ID associated with the S3 bucket associated with this access point.</p>
/// <p>For same account access point when your bucket and access point belong to the same account owner, the <code>BucketAccountId</code> is not required. For cross-account access point when your bucket and access point are not in the same account, the <code>BucketAccountId</code> is required.</p>
pub fn get_bucket_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.bucket_account_id
}
/// <p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
/// <p>Scope is only supported for access points attached to directory buckets.</p>
/// </note>
pub fn scope(mut self, input: crate::types::Scope) -> Self {
self.scope = ::std::option::Option::Some(input);
self
}
/// <p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
/// <p>Scope is only supported for access points attached to directory buckets.</p>
/// </note>
pub fn set_scope(mut self, input: ::std::option::Option<crate::types::Scope>) -> Self {
self.scope = input;
self
}
/// <p>For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-directory-buckets.html">Managing access to shared datasets in directory buckets with access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
/// <p>Scope is only supported for access points attached to directory buckets.</p>
/// </note>
pub fn get_scope(&self) -> &::std::option::Option<crate::types::Scope> {
&self.scope
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using tags for attribute-based access control (ABAC)</a>.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using tags for attribute-based access control (ABAC)</a>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Using tags with Amazon S3</a>. For information about tagging access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac">Using tags for attribute-based access control (ABAC)</a>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// Consumes the builder and constructs a [`CreateAccessPointInput`](crate::operation::create_access_point::CreateAccessPointInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_access_point::CreateAccessPointInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_access_point::CreateAccessPointInput {
account_id: self.account_id,
name: self.name,
bucket: self.bucket,
vpc_configuration: self.vpc_configuration,
public_access_block_configuration: self.public_access_block_configuration,
bucket_account_id: self.bucket_account_id,
scope: self.scope,
tags: self.tags,
})
}
}