2 2 | #[allow(missing_docs)] // documentation missing in model
|
3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct GetDataAccessInput {
|
6 6 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
7 7 | pub account_id: ::std::option::Option<::std::string::String>,
|
8 8 | /// <p>The S3 URI path of the data to which you are requesting temporary access credentials. If the requesting account has an access grant for this data, S3 Access Grants vends temporary access credentials in the response.</p>
|
9 9 | pub target: ::std::option::Option<::std::string::String>,
|
10 10 | /// <p>The type of permission granted to your S3 data, which can be set to one of the following values:</p>
|
11 11 | /// <ul>
|
12 12 | /// <li>
|
13 13 | /// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
|
14 14 | /// <li>
|
15 15 | /// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
|
16 16 | /// <li>
|
17 17 | /// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
|
18 18 | /// </ul>
|
19 19 | pub permission: ::std::option::Option<crate::types::Permission>,
|
20 20 | /// <p>The session duration, in seconds, of the temporary access credential that S3 Access Grants vends to the grantee or client application. The default value is 1 hour, but the grantee can specify a range from 900 seconds (15 minutes) up to 43200 seconds (12 hours). If the grantee requests a value higher than this maximum, the operation fails.</p>
|
21 21 | pub duration_seconds: ::std::option::Option<i32>,
|
22 22 | /// <p>The scope of the temporary access credential that S3 Access Grants vends to the grantee or client application.</p>
|
23 23 | /// <ul>
|
24 24 | /// <li>
|
25 25 | /// <p><code>Default</code> – The scope of the returned temporary access token is the scope of the grant that is closest to the target scope.</p></li>
|
26 26 | /// <li>
|
27 27 | /// <p><code>Minimal</code> – The scope of the returned temporary access token is the same as the requested target scope as long as the requested scope is the same as or a subset of the grant scope.</p></li>
|
28 28 | /// </ul>
|
29 29 | pub privilege: ::std::option::Option<crate::types::Privilege>,
|
30 30 | /// <p>The type of <code>Target</code>. The only possible value is <code>Object</code>. Pass this value if the target data that you would like to access is a path to an object. Do not pass this value if the target data is a bucket or a bucket and a prefix.</p>
|
31 31 | pub target_type: ::std::option::Option<crate::types::S3PrefixType>,
|
32 + | /// <p>The context to identify the job or query associated with the credential request. This information will be displayed in CloudTrail log in your account.</p>
|
33 + | pub audit_context: ::std::option::Option<::std::string::String>,
|
32 34 | }
|
33 35 | impl GetDataAccessInput {
|
34 36 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
35 37 | pub fn account_id(&self) -> ::std::option::Option<&str> {
|
36 38 | self.account_id.as_deref()
|
37 39 | }
|
38 40 | /// <p>The S3 URI path of the data to which you are requesting temporary access credentials. If the requesting account has an access grant for this data, S3 Access Grants vends temporary access credentials in the response.</p>
|
39 41 | pub fn target(&self) -> ::std::option::Option<&str> {
|
40 42 | self.target.as_deref()
|
41 43 | }
|
42 44 | /// <p>The type of permission granted to your S3 data, which can be set to one of the following values:</p>
|
43 45 | /// <ul>
|
44 46 | /// <li>
|
45 47 | /// <p><code>READ</code> – Grant read-only access to the S3 data.</p></li>
|
46 48 | /// <li>
|
47 49 | /// <p><code>WRITE</code> – Grant write-only access to the S3 data.</p></li>
|
48 50 | /// <li>
|
49 51 | /// <p><code>READWRITE</code> – Grant both read and write access to the S3 data.</p></li>
|
50 52 | /// </ul>
|
51 53 | pub fn permission(&self) -> ::std::option::Option<&crate::types::Permission> {
|
52 54 | self.permission.as_ref()
|
53 55 | }
|
54 56 | /// <p>The session duration, in seconds, of the temporary access credential that S3 Access Grants vends to the grantee or client application. The default value is 1 hour, but the grantee can specify a range from 900 seconds (15 minutes) up to 43200 seconds (12 hours). If the grantee requests a value higher than this maximum, the operation fails.</p>
|
55 57 | pub fn duration_seconds(&self) -> ::std::option::Option<i32> {
|
56 58 | self.duration_seconds
|
57 59 | }
|
58 60 | /// <p>The scope of the temporary access credential that S3 Access Grants vends to the grantee or client application.</p>
|
59 61 | /// <ul>
|
60 62 | /// <li>
|
61 63 | /// <p><code>Default</code> – The scope of the returned temporary access token is the scope of the grant that is closest to the target scope.</p></li>
|
62 64 | /// <li>
|
63 65 | /// <p><code>Minimal</code> – The scope of the returned temporary access token is the same as the requested target scope as long as the requested scope is the same as or a subset of the grant scope.</p></li>
|
64 66 | /// </ul>
|
65 67 | pub fn privilege(&self) -> ::std::option::Option<&crate::types::Privilege> {
|
66 68 | self.privilege.as_ref()
|
67 69 | }
|
68 70 | /// <p>The type of <code>Target</code>. The only possible value is <code>Object</code>. Pass this value if the target data that you would like to access is a path to an object. Do not pass this value if the target data is a bucket or a bucket and a prefix.</p>
|
69 71 | pub fn target_type(&self) -> ::std::option::Option<&crate::types::S3PrefixType> {
|
70 72 | self.target_type.as_ref()
|
71 73 | }
|
74 + | /// <p>The context to identify the job or query associated with the credential request. This information will be displayed in CloudTrail log in your account.</p>
|
75 + | pub fn audit_context(&self) -> ::std::option::Option<&str> {
|
76 + | self.audit_context.as_deref()
|
77 + | }
|
72 78 | }
|
73 79 | impl GetDataAccessInput {
|
74 80 | /// Creates a new builder-style object to manufacture [`GetDataAccessInput`](crate::operation::get_data_access::GetDataAccessInput).
|
75 81 | pub fn builder() -> crate::operation::get_data_access::builders::GetDataAccessInputBuilder {
|
76 82 | crate::operation::get_data_access::builders::GetDataAccessInputBuilder::default()
|
77 83 | }
|
78 84 | }
|
79 85 |
|
80 86 | /// A builder for [`GetDataAccessInput`](crate::operation::get_data_access::GetDataAccessInput).
|
81 87 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
82 88 | #[non_exhaustive]
|
83 89 | pub struct GetDataAccessInputBuilder {
|
84 90 | pub(crate) account_id: ::std::option::Option<::std::string::String>,
|
85 91 | pub(crate) target: ::std::option::Option<::std::string::String>,
|
86 92 | pub(crate) permission: ::std::option::Option<crate::types::Permission>,
|
87 93 | pub(crate) duration_seconds: ::std::option::Option<i32>,
|
88 94 | pub(crate) privilege: ::std::option::Option<crate::types::Privilege>,
|
89 95 | pub(crate) target_type: ::std::option::Option<crate::types::S3PrefixType>,
|
96 + | pub(crate) audit_context: ::std::option::Option<::std::string::String>,
|
90 97 | }
|
91 98 | impl GetDataAccessInputBuilder {
|
92 99 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
93 100 | /// This field is required.
|
94 101 | pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
95 102 | self.account_id = ::std::option::Option::Some(input.into());
|
96 103 | self
|
97 104 | }
|
98 105 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
99 106 | pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
100 107 | self.account_id = input;
|
101 108 | self
|
102 109 | }
|
103 110 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
104 111 | pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
|
105 112 | &self.account_id
|
106 113 | }
|
107 114 | /// <p>The S3 URI path of the data to which you are requesting temporary access credentials. If the requesting account has an access grant for this data, S3 Access Grants vends temporary access credentials in the response.</p>
|
108 115 | /// This field is required.
|
109 116 | pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
110 117 | self.target = ::std::option::Option::Some(input.into());
|
111 118 | self
|
112 119 | }
|
113 120 | /// <p>The S3 URI path of the data to which you are requesting temporary access credentials. If the requesting account has an access grant for this data, S3 Access Grants vends temporary access credentials in the response.</p>
|
114 121 | pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
115 122 | self.target = input;
|
116 123 | self
|
117 124 | }
|
118 125 | /// <p>The S3 URI path of the data to which you are requesting temporary access credentials. If the requesting account has an access grant for this data, S3 Access Grants vends temporary access credentials in the response.</p>
|
119 126 | pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
|
211 218 | }
|
212 219 | /// <p>The type of <code>Target</code>. The only possible value is <code>Object</code>. Pass this value if the target data that you would like to access is a path to an object. Do not pass this value if the target data is a bucket or a bucket and a prefix.</p>
|
213 220 | pub fn set_target_type(mut self, input: ::std::option::Option<crate::types::S3PrefixType>) -> Self {
|
214 221 | self.target_type = input;
|
215 222 | self
|
216 223 | }
|
217 224 | /// <p>The type of <code>Target</code>. The only possible value is <code>Object</code>. Pass this value if the target data that you would like to access is a path to an object. Do not pass this value if the target data is a bucket or a bucket and a prefix.</p>
|
218 225 | pub fn get_target_type(&self) -> &::std::option::Option<crate::types::S3PrefixType> {
|
219 226 | &self.target_type
|
220 227 | }
|
228 + | /// <p>The context to identify the job or query associated with the credential request. This information will be displayed in CloudTrail log in your account.</p>
|
229 + | pub fn audit_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
230 + | self.audit_context = ::std::option::Option::Some(input.into());
|
231 + | self
|
232 + | }
|
233 + | /// <p>The context to identify the job or query associated with the credential request. This information will be displayed in CloudTrail log in your account.</p>
|
234 + | pub fn set_audit_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
235 + | self.audit_context = input;
|
236 + | self
|
237 + | }
|
238 + | /// <p>The context to identify the job or query associated with the credential request. This information will be displayed in CloudTrail log in your account.</p>
|
239 + | pub fn get_audit_context(&self) -> &::std::option::Option<::std::string::String> {
|
240 + | &self.audit_context
|
241 + | }
|
221 242 | /// Consumes the builder and constructs a [`GetDataAccessInput`](crate::operation::get_data_access::GetDataAccessInput).
|
222 243 | pub fn build(
|
223 244 | self,
|
224 245 | ) -> ::std::result::Result<crate::operation::get_data_access::GetDataAccessInput, ::aws_smithy_types::error::operation::BuildError> {
|
225 246 | ::std::result::Result::Ok(crate::operation::get_data_access::GetDataAccessInput {
|
226 247 | account_id: self.account_id,
|
227 248 | target: self.target,
|
228 249 | permission: self.permission,
|
229 250 | duration_seconds: self.duration_seconds,
|
230 251 | privilege: self.privilege,
|
231 252 | target_type: self.target_type,
|
253 + | audit_context: self.audit_context,
|
232 254 | })
|
233 255 | }
|
234 256 | }
|