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
// 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 PutPrincipalMappingInput {
/// <p>The identifier of the index you want to map users to their groups.</p>
pub index_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the data source you want to map users to their groups.</p>
/// <p>This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.</p>
pub data_source_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the group you want to map its users to.</p>
pub group_id: ::std::option::Option<::std::string::String>,
/// <p>The list that contains your users that belong the same group. This can include sub groups that belong to a group.</p>
/// <p>For example, the group "Company A" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".</p>
/// <p>If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.</p>
pub group_members: ::std::option::Option<crate::types::GroupMembers>,
/// <p>The timestamp identifier you specify to ensure Amazon Kendra doesn't override the latest <code>PUT</code> action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.</p>
/// <p>The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling <code>PutPrincipalMapping</code>. This ensures your <code>PUT</code> action for that updated group with the latest members list doesn't get overwritten by earlier <code>PUT</code> actions for the same group which are yet to be processed.</p>
/// <p>The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.</p>
pub ordering_id: ::std::option::Option<i64>,
/// <p>The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-ds">IAM roles for Amazon Kendra</a>.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
}
impl PutPrincipalMappingInput {
/// <p>The identifier of the index you want to map users to their groups.</p>
pub fn index_id(&self) -> ::std::option::Option<&str> {
self.index_id.as_deref()
}
/// <p>The identifier of the data source you want to map users to their groups.</p>
/// <p>This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.</p>
pub fn data_source_id(&self) -> ::std::option::Option<&str> {
self.data_source_id.as_deref()
}
/// <p>The identifier of the group you want to map its users to.</p>
pub fn group_id(&self) -> ::std::option::Option<&str> {
self.group_id.as_deref()
}
/// <p>The list that contains your users that belong the same group. This can include sub groups that belong to a group.</p>
/// <p>For example, the group "Company A" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".</p>
/// <p>If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.</p>
pub fn group_members(&self) -> ::std::option::Option<&crate::types::GroupMembers> {
self.group_members.as_ref()
}
/// <p>The timestamp identifier you specify to ensure Amazon Kendra doesn't override the latest <code>PUT</code> action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.</p>
/// <p>The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling <code>PutPrincipalMapping</code>. This ensures your <code>PUT</code> action for that updated group with the latest members list doesn't get overwritten by earlier <code>PUT</code> actions for the same group which are yet to be processed.</p>
/// <p>The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.</p>
pub fn ordering_id(&self) -> ::std::option::Option<i64> {
self.ordering_id
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-ds">IAM roles for Amazon Kendra</a>.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
}
impl PutPrincipalMappingInput {
/// Creates a new builder-style object to manufacture [`PutPrincipalMappingInput`](crate::operation::put_principal_mapping::PutPrincipalMappingInput).
pub fn builder() -> crate::operation::put_principal_mapping::builders::PutPrincipalMappingInputBuilder {
crate::operation::put_principal_mapping::builders::PutPrincipalMappingInputBuilder::default()
}
}
/// A builder for [`PutPrincipalMappingInput`](crate::operation::put_principal_mapping::PutPrincipalMappingInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutPrincipalMappingInputBuilder {
pub(crate) index_id: ::std::option::Option<::std::string::String>,
pub(crate) data_source_id: ::std::option::Option<::std::string::String>,
pub(crate) group_id: ::std::option::Option<::std::string::String>,
pub(crate) group_members: ::std::option::Option<crate::types::GroupMembers>,
pub(crate) ordering_id: ::std::option::Option<i64>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
}
impl PutPrincipalMappingInputBuilder {
/// <p>The identifier of the index you want to map users to their groups.</p>
/// This field is required.
pub fn index_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.index_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the index you want to map users to their groups.</p>
pub fn set_index_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.index_id = input;
self
}
/// <p>The identifier of the index you want to map users to their groups.</p>
pub fn get_index_id(&self) -> &::std::option::Option<::std::string::String> {
&self.index_id
}
/// <p>The identifier of the data source you want to map users to their groups.</p>
/// <p>This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.</p>
pub fn data_source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_source_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the data source you want to map users to their groups.</p>
/// <p>This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.</p>
pub fn set_data_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_source_id = input;
self
}
/// <p>The identifier of the data source you want to map users to their groups.</p>
/// <p>This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.</p>
pub fn get_data_source_id(&self) -> &::std::option::Option<::std::string::String> {
&self.data_source_id
}
/// <p>The identifier of the group you want to map its users to.</p>
/// This field is required.
pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.group_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the group you want to map its users to.</p>
pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.group_id = input;
self
}
/// <p>The identifier of the group you want to map its users to.</p>
pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.group_id
}
/// <p>The list that contains your users that belong the same group. This can include sub groups that belong to a group.</p>
/// <p>For example, the group "Company A" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".</p>
/// <p>If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.</p>
/// This field is required.
pub fn group_members(mut self, input: crate::types::GroupMembers) -> Self {
self.group_members = ::std::option::Option::Some(input);
self
}
/// <p>The list that contains your users that belong the same group. This can include sub groups that belong to a group.</p>
/// <p>For example, the group "Company A" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".</p>
/// <p>If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.</p>
pub fn set_group_members(mut self, input: ::std::option::Option<crate::types::GroupMembers>) -> Self {
self.group_members = input;
self
}
/// <p>The list that contains your users that belong the same group. This can include sub groups that belong to a group.</p>
/// <p>For example, the group "Company A" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".</p>
/// <p>If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.</p>
pub fn get_group_members(&self) -> &::std::option::Option<crate::types::GroupMembers> {
&self.group_members
}
/// <p>The timestamp identifier you specify to ensure Amazon Kendra doesn't override the latest <code>PUT</code> action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.</p>
/// <p>The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling <code>PutPrincipalMapping</code>. This ensures your <code>PUT</code> action for that updated group with the latest members list doesn't get overwritten by earlier <code>PUT</code> actions for the same group which are yet to be processed.</p>
/// <p>The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.</p>
pub fn ordering_id(mut self, input: i64) -> Self {
self.ordering_id = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp identifier you specify to ensure Amazon Kendra doesn't override the latest <code>PUT</code> action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.</p>
/// <p>The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling <code>PutPrincipalMapping</code>. This ensures your <code>PUT</code> action for that updated group with the latest members list doesn't get overwritten by earlier <code>PUT</code> actions for the same group which are yet to be processed.</p>
/// <p>The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.</p>
pub fn set_ordering_id(mut self, input: ::std::option::Option<i64>) -> Self {
self.ordering_id = input;
self
}
/// <p>The timestamp identifier you specify to ensure Amazon Kendra doesn't override the latest <code>PUT</code> action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action.</p>
/// <p>The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling <code>PutPrincipalMapping</code>. This ensures your <code>PUT</code> action for that updated group with the latest members list doesn't get overwritten by earlier <code>PUT</code> actions for the same group which are yet to be processed.</p>
/// <p>The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.</p>
pub fn get_ordering_id(&self) -> &::std::option::Option<i64> {
&self.ordering_id
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-ds">IAM roles for Amazon Kendra</a>.</p>
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-ds">IAM roles for Amazon Kendra</a>.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-ds">IAM roles for Amazon Kendra</a>.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Consumes the builder and constructs a [`PutPrincipalMappingInput`](crate::operation::put_principal_mapping::PutPrincipalMappingInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_principal_mapping::PutPrincipalMappingInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_principal_mapping::PutPrincipalMappingInput {
index_id: self.index_id,
data_source_id: self.data_source_id,
group_id: self.group_id,
group_members: self.group_members,
ordering_id: self.ordering_id,
role_arn: self.role_arn,
})
}
}