aws_sdk_kendra/operation/create_index/_create_index_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 CreateIndexInput {
6 /// <p>A name for the index.</p>
7 pub name: ::std::option::Option<::std::string::String>,
8 /// <p>The Amazon Kendra edition to use for the index. Choose <code>DEVELOPER_EDITION</code> for indexes intended for development, testing, or proof of concept. Use <code>ENTERPRISE_EDITION</code> for production. Use <code>GEN_AI_ENTERPRISE_EDITION</code> for creating generative AI applications. Once you set the edition for an index, it can't be changed.</p>
9 /// <p>The <code>Edition</code> parameter is optional. If you don't supply a value, the default is <code>ENTERPRISE_EDITION</code>.</p>
10 /// <p>For more information on quota limits for Gen AI Enterprise Edition, Enterprise Edition, and Developer Edition indices, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/quotas.html">Quotas</a>.</p>
11 pub edition: ::std::option::Option<crate::types::IndexEdition>,
12 /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access your Amazon CloudWatch logs and metrics. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM access roles for Amazon Kendra</a>.</p>
13 pub role_arn: ::std::option::Option<::std::string::String>,
14 /// <p>The identifier of the KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.</p>
15 pub server_side_encryption_configuration: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>,
16 /// <p>A description for the index.</p>
17 pub description: ::std::option::Option<::std::string::String>,
18 /// <p>A token that you provide to identify the request to create an index. Multiple calls to the <code>CreateIndex</code> API with the same client token will create only one index.</p>
19 pub client_token: ::std::option::Option<::std::string::String>,
20 /// <p>A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
21 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
22 /// <p>The user token configuration.</p><important>
23 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>UserTokenConfigurations</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
24 /// </important>
25 pub user_token_configurations: ::std::option::Option<::std::vec::Vec<crate::types::UserTokenConfiguration>>,
26 /// <p>The user context policy.</p><important>
27 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use <code>ATTRIBUTE_FILTER</code> to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>USER_TOKEN</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
28 /// </important>
29 /// <dl>
30 /// <dt>
31 /// ATTRIBUTE_FILTER
32 /// </dt>
33 /// <dd>
34 /// <p>All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or you can provide user and group information in <code>UserContext</code>.</p>
35 /// </dd>
36 /// <dt>
37 /// USER_TOKEN
38 /// </dt>
39 /// <dd>
40 /// <p>Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.</p>
41 /// </dd>
42 /// </dl>
43 pub user_context_policy: ::std::option::Option<crate::types::UserContextPolicy>,
44 /// <p>Gets users and groups from IAM Identity Center identity source. To configure this, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html">UserGroupResolutionConfiguration</a>. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.</p><important>
45 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, <code>UserGroupResolutionConfiguration</code> isn't supported.</p>
46 /// </important>
47 pub user_group_resolution_configuration: ::std::option::Option<crate::types::UserGroupResolutionConfiguration>,
48}
49impl CreateIndexInput {
50 /// <p>A name for the index.</p>
51 pub fn name(&self) -> ::std::option::Option<&str> {
52 self.name.as_deref()
53 }
54 /// <p>The Amazon Kendra edition to use for the index. Choose <code>DEVELOPER_EDITION</code> for indexes intended for development, testing, or proof of concept. Use <code>ENTERPRISE_EDITION</code> for production. Use <code>GEN_AI_ENTERPRISE_EDITION</code> for creating generative AI applications. Once you set the edition for an index, it can't be changed.</p>
55 /// <p>The <code>Edition</code> parameter is optional. If you don't supply a value, the default is <code>ENTERPRISE_EDITION</code>.</p>
56 /// <p>For more information on quota limits for Gen AI Enterprise Edition, Enterprise Edition, and Developer Edition indices, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/quotas.html">Quotas</a>.</p>
57 pub fn edition(&self) -> ::std::option::Option<&crate::types::IndexEdition> {
58 self.edition.as_ref()
59 }
60 /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access your Amazon CloudWatch logs and metrics. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM access roles for Amazon Kendra</a>.</p>
61 pub fn role_arn(&self) -> ::std::option::Option<&str> {
62 self.role_arn.as_deref()
63 }
64 /// <p>The identifier of the KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.</p>
65 pub fn server_side_encryption_configuration(&self) -> ::std::option::Option<&crate::types::ServerSideEncryptionConfiguration> {
66 self.server_side_encryption_configuration.as_ref()
67 }
68 /// <p>A description for the index.</p>
69 pub fn description(&self) -> ::std::option::Option<&str> {
70 self.description.as_deref()
71 }
72 /// <p>A token that you provide to identify the request to create an index. Multiple calls to the <code>CreateIndex</code> API with the same client token will create only one index.</p>
73 pub fn client_token(&self) -> ::std::option::Option<&str> {
74 self.client_token.as_deref()
75 }
76 /// <p>A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
77 ///
78 /// 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()`.
79 pub fn tags(&self) -> &[crate::types::Tag] {
80 self.tags.as_deref().unwrap_or_default()
81 }
82 /// <p>The user token configuration.</p><important>
83 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>UserTokenConfigurations</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
84 /// </important>
85 ///
86 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_token_configurations.is_none()`.
87 pub fn user_token_configurations(&self) -> &[crate::types::UserTokenConfiguration] {
88 self.user_token_configurations.as_deref().unwrap_or_default()
89 }
90 /// <p>The user context policy.</p><important>
91 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use <code>ATTRIBUTE_FILTER</code> to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>USER_TOKEN</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
92 /// </important>
93 /// <dl>
94 /// <dt>
95 /// ATTRIBUTE_FILTER
96 /// </dt>
97 /// <dd>
98 /// <p>All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or you can provide user and group information in <code>UserContext</code>.</p>
99 /// </dd>
100 /// <dt>
101 /// USER_TOKEN
102 /// </dt>
103 /// <dd>
104 /// <p>Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.</p>
105 /// </dd>
106 /// </dl>
107 pub fn user_context_policy(&self) -> ::std::option::Option<&crate::types::UserContextPolicy> {
108 self.user_context_policy.as_ref()
109 }
110 /// <p>Gets users and groups from IAM Identity Center identity source. To configure this, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html">UserGroupResolutionConfiguration</a>. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.</p><important>
111 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, <code>UserGroupResolutionConfiguration</code> isn't supported.</p>
112 /// </important>
113 pub fn user_group_resolution_configuration(&self) -> ::std::option::Option<&crate::types::UserGroupResolutionConfiguration> {
114 self.user_group_resolution_configuration.as_ref()
115 }
116}
117impl CreateIndexInput {
118 /// Creates a new builder-style object to manufacture [`CreateIndexInput`](crate::operation::create_index::CreateIndexInput).
119 pub fn builder() -> crate::operation::create_index::builders::CreateIndexInputBuilder {
120 crate::operation::create_index::builders::CreateIndexInputBuilder::default()
121 }
122}
123
124/// A builder for [`CreateIndexInput`](crate::operation::create_index::CreateIndexInput).
125#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
126#[non_exhaustive]
127pub struct CreateIndexInputBuilder {
128 pub(crate) name: ::std::option::Option<::std::string::String>,
129 pub(crate) edition: ::std::option::Option<crate::types::IndexEdition>,
130 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
131 pub(crate) server_side_encryption_configuration: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>,
132 pub(crate) description: ::std::option::Option<::std::string::String>,
133 pub(crate) client_token: ::std::option::Option<::std::string::String>,
134 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
135 pub(crate) user_token_configurations: ::std::option::Option<::std::vec::Vec<crate::types::UserTokenConfiguration>>,
136 pub(crate) user_context_policy: ::std::option::Option<crate::types::UserContextPolicy>,
137 pub(crate) user_group_resolution_configuration: ::std::option::Option<crate::types::UserGroupResolutionConfiguration>,
138}
139impl CreateIndexInputBuilder {
140 /// <p>A name for the index.</p>
141 /// This field is required.
142 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.name = ::std::option::Option::Some(input.into());
144 self
145 }
146 /// <p>A name for the index.</p>
147 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.name = input;
149 self
150 }
151 /// <p>A name for the index.</p>
152 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153 &self.name
154 }
155 /// <p>The Amazon Kendra edition to use for the index. Choose <code>DEVELOPER_EDITION</code> for indexes intended for development, testing, or proof of concept. Use <code>ENTERPRISE_EDITION</code> for production. Use <code>GEN_AI_ENTERPRISE_EDITION</code> for creating generative AI applications. Once you set the edition for an index, it can't be changed.</p>
156 /// <p>The <code>Edition</code> parameter is optional. If you don't supply a value, the default is <code>ENTERPRISE_EDITION</code>.</p>
157 /// <p>For more information on quota limits for Gen AI Enterprise Edition, Enterprise Edition, and Developer Edition indices, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/quotas.html">Quotas</a>.</p>
158 pub fn edition(mut self, input: crate::types::IndexEdition) -> Self {
159 self.edition = ::std::option::Option::Some(input);
160 self
161 }
162 /// <p>The Amazon Kendra edition to use for the index. Choose <code>DEVELOPER_EDITION</code> for indexes intended for development, testing, or proof of concept. Use <code>ENTERPRISE_EDITION</code> for production. Use <code>GEN_AI_ENTERPRISE_EDITION</code> for creating generative AI applications. Once you set the edition for an index, it can't be changed.</p>
163 /// <p>The <code>Edition</code> parameter is optional. If you don't supply a value, the default is <code>ENTERPRISE_EDITION</code>.</p>
164 /// <p>For more information on quota limits for Gen AI Enterprise Edition, Enterprise Edition, and Developer Edition indices, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/quotas.html">Quotas</a>.</p>
165 pub fn set_edition(mut self, input: ::std::option::Option<crate::types::IndexEdition>) -> Self {
166 self.edition = input;
167 self
168 }
169 /// <p>The Amazon Kendra edition to use for the index. Choose <code>DEVELOPER_EDITION</code> for indexes intended for development, testing, or proof of concept. Use <code>ENTERPRISE_EDITION</code> for production. Use <code>GEN_AI_ENTERPRISE_EDITION</code> for creating generative AI applications. Once you set the edition for an index, it can't be changed.</p>
170 /// <p>The <code>Edition</code> parameter is optional. If you don't supply a value, the default is <code>ENTERPRISE_EDITION</code>.</p>
171 /// <p>For more information on quota limits for Gen AI Enterprise Edition, Enterprise Edition, and Developer Edition indices, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/quotas.html">Quotas</a>.</p>
172 pub fn get_edition(&self) -> &::std::option::Option<crate::types::IndexEdition> {
173 &self.edition
174 }
175 /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access your Amazon CloudWatch logs and metrics. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM access roles for Amazon Kendra</a>.</p>
176 /// This field is required.
177 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178 self.role_arn = ::std::option::Option::Some(input.into());
179 self
180 }
181 /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access your Amazon CloudWatch logs and metrics. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM access roles for Amazon Kendra</a>.</p>
182 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.role_arn = input;
184 self
185 }
186 /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access your Amazon CloudWatch logs and metrics. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM access roles for Amazon Kendra</a>.</p>
187 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
188 &self.role_arn
189 }
190 /// <p>The identifier of the KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.</p>
191 pub fn server_side_encryption_configuration(mut self, input: crate::types::ServerSideEncryptionConfiguration) -> Self {
192 self.server_side_encryption_configuration = ::std::option::Option::Some(input);
193 self
194 }
195 /// <p>The identifier of the KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.</p>
196 pub fn set_server_side_encryption_configuration(mut self, input: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>) -> Self {
197 self.server_side_encryption_configuration = input;
198 self
199 }
200 /// <p>The identifier of the KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.</p>
201 pub fn get_server_side_encryption_configuration(&self) -> &::std::option::Option<crate::types::ServerSideEncryptionConfiguration> {
202 &self.server_side_encryption_configuration
203 }
204 /// <p>A description for the index.</p>
205 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206 self.description = ::std::option::Option::Some(input.into());
207 self
208 }
209 /// <p>A description for the index.</p>
210 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211 self.description = input;
212 self
213 }
214 /// <p>A description for the index.</p>
215 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
216 &self.description
217 }
218 /// <p>A token that you provide to identify the request to create an index. Multiple calls to the <code>CreateIndex</code> API with the same client token will create only one index.</p>
219 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220 self.client_token = ::std::option::Option::Some(input.into());
221 self
222 }
223 /// <p>A token that you provide to identify the request to create an index. Multiple calls to the <code>CreateIndex</code> API with the same client token will create only one index.</p>
224 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
225 self.client_token = input;
226 self
227 }
228 /// <p>A token that you provide to identify the request to create an index. Multiple calls to the <code>CreateIndex</code> API with the same client token will create only one index.</p>
229 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
230 &self.client_token
231 }
232 /// Appends an item to `tags`.
233 ///
234 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
235 ///
236 /// <p>A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
237 pub fn tags(mut self, input: crate::types::Tag) -> Self {
238 let mut v = self.tags.unwrap_or_default();
239 v.push(input);
240 self.tags = ::std::option::Option::Some(v);
241 self
242 }
243 /// <p>A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
244 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
245 self.tags = input;
246 self
247 }
248 /// <p>A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
249 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
250 &self.tags
251 }
252 /// Appends an item to `user_token_configurations`.
253 ///
254 /// To override the contents of this collection use [`set_user_token_configurations`](Self::set_user_token_configurations).
255 ///
256 /// <p>The user token configuration.</p><important>
257 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>UserTokenConfigurations</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
258 /// </important>
259 pub fn user_token_configurations(mut self, input: crate::types::UserTokenConfiguration) -> Self {
260 let mut v = self.user_token_configurations.unwrap_or_default();
261 v.push(input);
262 self.user_token_configurations = ::std::option::Option::Some(v);
263 self
264 }
265 /// <p>The user token configuration.</p><important>
266 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>UserTokenConfigurations</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
267 /// </important>
268 pub fn set_user_token_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserTokenConfiguration>>) -> Self {
269 self.user_token_configurations = input;
270 self
271 }
272 /// <p>The user token configuration.</p><important>
273 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>UserTokenConfigurations</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
274 /// </important>
275 pub fn get_user_token_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserTokenConfiguration>> {
276 &self.user_token_configurations
277 }
278 /// <p>The user context policy.</p><important>
279 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use <code>ATTRIBUTE_FILTER</code> to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>USER_TOKEN</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
280 /// </important>
281 /// <dl>
282 /// <dt>
283 /// ATTRIBUTE_FILTER
284 /// </dt>
285 /// <dd>
286 /// <p>All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or you can provide user and group information in <code>UserContext</code>.</p>
287 /// </dd>
288 /// <dt>
289 /// USER_TOKEN
290 /// </dt>
291 /// <dd>
292 /// <p>Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.</p>
293 /// </dd>
294 /// </dl>
295 pub fn user_context_policy(mut self, input: crate::types::UserContextPolicy) -> Self {
296 self.user_context_policy = ::std::option::Option::Some(input);
297 self
298 }
299 /// <p>The user context policy.</p><important>
300 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use <code>ATTRIBUTE_FILTER</code> to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>USER_TOKEN</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
301 /// </important>
302 /// <dl>
303 /// <dt>
304 /// ATTRIBUTE_FILTER
305 /// </dt>
306 /// <dd>
307 /// <p>All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or you can provide user and group information in <code>UserContext</code>.</p>
308 /// </dd>
309 /// <dt>
310 /// USER_TOKEN
311 /// </dt>
312 /// <dd>
313 /// <p>Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.</p>
314 /// </dd>
315 /// </dl>
316 pub fn set_user_context_policy(mut self, input: ::std::option::Option<crate::types::UserContextPolicy>) -> Self {
317 self.user_context_policy = input;
318 self
319 }
320 /// <p>The user context policy.</p><important>
321 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use <code>ATTRIBUTE_FILTER</code> to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>USER_TOKEN</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
322 /// </important>
323 /// <dl>
324 /// <dt>
325 /// ATTRIBUTE_FILTER
326 /// </dt>
327 /// <dd>
328 /// <p>All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or you can provide user and group information in <code>UserContext</code>.</p>
329 /// </dd>
330 /// <dt>
331 /// USER_TOKEN
332 /// </dt>
333 /// <dd>
334 /// <p>Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.</p>
335 /// </dd>
336 /// </dl>
337 pub fn get_user_context_policy(&self) -> &::std::option::Option<crate::types::UserContextPolicy> {
338 &self.user_context_policy
339 }
340 /// <p>Gets users and groups from IAM Identity Center identity source. To configure this, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html">UserGroupResolutionConfiguration</a>. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.</p><important>
341 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, <code>UserGroupResolutionConfiguration</code> isn't supported.</p>
342 /// </important>
343 pub fn user_group_resolution_configuration(mut self, input: crate::types::UserGroupResolutionConfiguration) -> Self {
344 self.user_group_resolution_configuration = ::std::option::Option::Some(input);
345 self
346 }
347 /// <p>Gets users and groups from IAM Identity Center identity source. To configure this, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html">UserGroupResolutionConfiguration</a>. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.</p><important>
348 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, <code>UserGroupResolutionConfiguration</code> isn't supported.</p>
349 /// </important>
350 pub fn set_user_group_resolution_configuration(mut self, input: ::std::option::Option<crate::types::UserGroupResolutionConfiguration>) -> Self {
351 self.user_group_resolution_configuration = input;
352 self
353 }
354 /// <p>Gets users and groups from IAM Identity Center identity source. To configure this, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html">UserGroupResolutionConfiguration</a>. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.</p><important>
355 /// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, <code>UserGroupResolutionConfiguration</code> isn't supported.</p>
356 /// </important>
357 pub fn get_user_group_resolution_configuration(&self) -> &::std::option::Option<crate::types::UserGroupResolutionConfiguration> {
358 &self.user_group_resolution_configuration
359 }
360 /// Consumes the builder and constructs a [`CreateIndexInput`](crate::operation::create_index::CreateIndexInput).
361 pub fn build(self) -> ::std::result::Result<crate::operation::create_index::CreateIndexInput, ::aws_smithy_types::error::operation::BuildError> {
362 ::std::result::Result::Ok(crate::operation::create_index::CreateIndexInput {
363 name: self.name,
364 edition: self.edition,
365 role_arn: self.role_arn,
366 server_side_encryption_configuration: self.server_side_encryption_configuration,
367 description: self.description,
368 client_token: self.client_token,
369 tags: self.tags,
370 user_token_configurations: self.user_token_configurations,
371 user_context_policy: self.user_context_policy,
372 user_group_resolution_configuration: self.user_group_resolution_configuration,
373 })
374 }
375}