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
// 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 GetAccessGrantOutput {
/// <p>The date and time when you created the access grant.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
pub access_grant_id: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the access grant.</p>
pub access_grant_arn: ::std::option::Option<::std::string::String>,
/// <p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon Web Services IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>
pub grantee: ::std::option::Option<crate::types::Grantee>,
/// <p>The type of permission that was granted in the access grant. Can be one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
/// <li>
/// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
/// <li>
/// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
/// </ul>
pub permission: ::std::option::Option<crate::types::Permission>,
/// <p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
pub access_grants_location_id: ::std::option::Option<::std::string::String>,
/// <p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.</p>
pub access_grants_location_configuration: ::std::option::Option<crate::types::AccessGrantsLocationConfiguration>,
/// <p>The S3 path of the data to which you are granting access. It is the result of appending the <code>Subprefix</code> to the location scope.</p>
pub grant_scope: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.</p>
pub application_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetAccessGrantOutput {
/// <p>The date and time when you created the access grant.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
pub fn access_grant_id(&self) -> ::std::option::Option<&str> {
self.access_grant_id.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the access grant.</p>
pub fn access_grant_arn(&self) -> ::std::option::Option<&str> {
self.access_grant_arn.as_deref()
}
/// <p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon Web Services IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>
pub fn grantee(&self) -> ::std::option::Option<&crate::types::Grantee> {
self.grantee.as_ref()
}
/// <p>The type of permission that was granted in the access grant. Can be one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
/// <li>
/// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
/// <li>
/// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
/// </ul>
pub fn permission(&self) -> ::std::option::Option<&crate::types::Permission> {
self.permission.as_ref()
}
/// <p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
pub fn access_grants_location_id(&self) -> ::std::option::Option<&str> {
self.access_grants_location_id.as_deref()
}
/// <p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.</p>
pub fn access_grants_location_configuration(&self) -> ::std::option::Option<&crate::types::AccessGrantsLocationConfiguration> {
self.access_grants_location_configuration.as_ref()
}
/// <p>The S3 path of the data to which you are granting access. It is the result of appending the <code>Subprefix</code> to the location scope.</p>
pub fn grant_scope(&self) -> ::std::option::Option<&str> {
self.grant_scope.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.</p>
pub fn application_arn(&self) -> ::std::option::Option<&str> {
self.application_arn.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetAccessGrantOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetAccessGrantOutput {
/// Creates a new builder-style object to manufacture [`GetAccessGrantOutput`](crate::operation::get_access_grant::GetAccessGrantOutput).
pub fn builder() -> crate::operation::get_access_grant::builders::GetAccessGrantOutputBuilder {
crate::operation::get_access_grant::builders::GetAccessGrantOutputBuilder::default()
}
}
/// A builder for [`GetAccessGrantOutput`](crate::operation::get_access_grant::GetAccessGrantOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAccessGrantOutputBuilder {
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) access_grant_id: ::std::option::Option<::std::string::String>,
pub(crate) access_grant_arn: ::std::option::Option<::std::string::String>,
pub(crate) grantee: ::std::option::Option<crate::types::Grantee>,
pub(crate) permission: ::std::option::Option<crate::types::Permission>,
pub(crate) access_grants_location_id: ::std::option::Option<::std::string::String>,
pub(crate) access_grants_location_configuration: ::std::option::Option<crate::types::AccessGrantsLocationConfiguration>,
pub(crate) grant_scope: ::std::option::Option<::std::string::String>,
pub(crate) application_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetAccessGrantOutputBuilder {
/// <p>The date and time when you created the access grant.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when you created the access grant.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The date and time when you created the access grant.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
pub fn access_grant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.access_grant_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
pub fn set_access_grant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.access_grant_id = input;
self
}
/// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
pub fn get_access_grant_id(&self) -> &::std::option::Option<::std::string::String> {
&self.access_grant_id
}
/// <p>The Amazon Resource Name (ARN) of the access grant.</p>
pub fn access_grant_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.access_grant_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the access grant.</p>
pub fn set_access_grant_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.access_grant_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the access grant.</p>
pub fn get_access_grant_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.access_grant_arn
}
/// <p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon Web Services IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>
pub fn grantee(mut self, input: crate::types::Grantee) -> Self {
self.grantee = ::std::option::Option::Some(input);
self
}
/// <p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon Web Services IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>
pub fn set_grantee(mut self, input: ::std::option::Option<crate::types::Grantee>) -> Self {
self.grantee = input;
self
}
/// <p>The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added a corporate directory to Amazon Web Services IAM Identity Center and associated this Identity Center instance with the S3 Access Grants instance, the grantee can also be a corporate directory user or group.</p>
pub fn get_grantee(&self) -> &::std::option::Option<crate::types::Grantee> {
&self.grantee
}
/// <p>The type of permission that was granted in the access grant. Can be one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
/// <li>
/// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
/// <li>
/// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
/// </ul>
pub fn permission(mut self, input: crate::types::Permission) -> Self {
self.permission = ::std::option::Option::Some(input);
self
}
/// <p>The type of permission that was granted in the access grant. Can be one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
/// <li>
/// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
/// <li>
/// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
/// </ul>
pub fn set_permission(mut self, input: ::std::option::Option<crate::types::Permission>) -> Self {
self.permission = input;
self
}
/// <p>The type of permission that was granted in the access grant. Can be one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
/// <li>
/// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
/// <li>
/// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
/// </ul>
pub fn get_permission(&self) -> &::std::option::Option<crate::types::Permission> {
&self.permission
}
/// <p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
pub fn access_grants_location_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.access_grants_location_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
pub fn set_access_grants_location_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.access_grants_location_id = input;
self
}
/// <p>The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
pub fn get_access_grants_location_id(&self) -> &::std::option::Option<::std::string::String> {
&self.access_grants_location_id
}
/// <p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.</p>
pub fn access_grants_location_configuration(mut self, input: crate::types::AccessGrantsLocationConfiguration) -> Self {
self.access_grants_location_configuration = ::std::option::Option::Some(input);
self
}
/// <p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.</p>
pub fn set_access_grants_location_configuration(mut self, input: ::std::option::Option<crate::types::AccessGrantsLocationConfiguration>) -> Self {
self.access_grants_location_configuration = input;
self
}
/// <p>The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.</p>
pub fn get_access_grants_location_configuration(&self) -> &::std::option::Option<crate::types::AccessGrantsLocationConfiguration> {
&self.access_grants_location_configuration
}
/// <p>The S3 path of the data to which you are granting access. It is the result of appending the <code>Subprefix</code> to the location scope.</p>
pub fn grant_scope(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.grant_scope = ::std::option::Option::Some(input.into());
self
}
/// <p>The S3 path of the data to which you are granting access. It is the result of appending the <code>Subprefix</code> to the location scope.</p>
pub fn set_grant_scope(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.grant_scope = input;
self
}
/// <p>The S3 path of the data to which you are granting access. It is the result of appending the <code>Subprefix</code> to the location scope.</p>
pub fn get_grant_scope(&self) -> &::std::option::Option<::std::string::String> {
&self.grant_scope
}
/// <p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.</p>
pub fn application_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.application_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.</p>
pub fn set_application_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.application_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.</p>
pub fn get_application_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.application_arn
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetAccessGrantOutput`](crate::operation::get_access_grant::GetAccessGrantOutput).
pub fn build(self) -> crate::operation::get_access_grant::GetAccessGrantOutput {
crate::operation::get_access_grant::GetAccessGrantOutput {
created_at: self.created_at,
access_grant_id: self.access_grant_id,
access_grant_arn: self.access_grant_arn,
grantee: self.grantee,
permission: self.permission,
access_grants_location_id: self.access_grants_location_id,
access_grants_location_configuration: self.access_grants_location_configuration,
grant_scope: self.grant_scope,
application_arn: self.application_arn,
_request_id: self._request_id,
}
}
}