/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace kendra { namespace Model { /** */ class PutPrincipalMappingRequest : public KendraRequest { public: AWS_KENDRA_API PutPrincipalMappingRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutPrincipalMapping"; } AWS_KENDRA_API Aws::String SerializePayload() const override; AWS_KENDRA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The identifier of the index you want to map users to their groups.

*/ inline const Aws::String& GetIndexId() const{ return m_indexId; } /** *

The identifier of the index you want to map users to their groups.

*/ inline bool IndexIdHasBeenSet() const { return m_indexIdHasBeenSet; } /** *

The identifier of the index you want to map users to their groups.

*/ inline void SetIndexId(const Aws::String& value) { m_indexIdHasBeenSet = true; m_indexId = value; } /** *

The identifier of the index you want to map users to their groups.

*/ inline void SetIndexId(Aws::String&& value) { m_indexIdHasBeenSet = true; m_indexId = std::move(value); } /** *

The identifier of the index you want to map users to their groups.

*/ inline void SetIndexId(const char* value) { m_indexIdHasBeenSet = true; m_indexId.assign(value); } /** *

The identifier of the index you want to map users to their groups.

*/ inline PutPrincipalMappingRequest& WithIndexId(const Aws::String& value) { SetIndexId(value); return *this;} /** *

The identifier of the index you want to map users to their groups.

*/ inline PutPrincipalMappingRequest& WithIndexId(Aws::String&& value) { SetIndexId(std::move(value)); return *this;} /** *

The identifier of the index you want to map users to their groups.

*/ inline PutPrincipalMappingRequest& WithIndexId(const char* value) { SetIndexId(value); return *this;} /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline const Aws::String& GetDataSourceId() const{ return m_dataSourceId; } /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline bool DataSourceIdHasBeenSet() const { return m_dataSourceIdHasBeenSet; } /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline void SetDataSourceId(const Aws::String& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = value; } /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline void SetDataSourceId(Aws::String&& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = std::move(value); } /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline void SetDataSourceId(const char* value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId.assign(value); } /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline PutPrincipalMappingRequest& WithDataSourceId(const Aws::String& value) { SetDataSourceId(value); return *this;} /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline PutPrincipalMappingRequest& WithDataSourceId(Aws::String&& value) { SetDataSourceId(std::move(value)); return *this;} /** *

The identifier of the data source you want to map users to their groups.

*

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.

*/ inline PutPrincipalMappingRequest& WithDataSourceId(const char* value) { SetDataSourceId(value); return *this;} /** *

The identifier of the group you want to map its users to.

*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *

The identifier of the group you want to map its users to.

*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The identifier of the group you want to map its users to.

*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The identifier of the group you want to map its users to.

*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The identifier of the group you want to map its users to.

*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The identifier of the group you want to map its users to.

*/ inline PutPrincipalMappingRequest& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *

The identifier of the group you want to map its users to.

*/ inline PutPrincipalMappingRequest& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *

The identifier of the group you want to map its users to.

*/ inline PutPrincipalMappingRequest& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *

The list that contains your users or sub groups that belong the same * group.

For example, the group "Company" includes the user "CEO" and the * sub groups "Research", "Engineering", and "Sales and Marketing".

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.

*/ inline const GroupMembers& GetGroupMembers() const{ return m_groupMembers; } /** *

The list that contains your users or sub groups that belong the same * group.

For example, the group "Company" includes the user "CEO" and the * sub groups "Research", "Engineering", and "Sales and Marketing".

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.

*/ inline bool GroupMembersHasBeenSet() const { return m_groupMembersHasBeenSet; } /** *

The list that contains your users or sub groups that belong the same * group.

For example, the group "Company" includes the user "CEO" and the * sub groups "Research", "Engineering", and "Sales and Marketing".

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.

*/ inline void SetGroupMembers(const GroupMembers& value) { m_groupMembersHasBeenSet = true; m_groupMembers = value; } /** *

The list that contains your users or sub groups that belong the same * group.

For example, the group "Company" includes the user "CEO" and the * sub groups "Research", "Engineering", and "Sales and Marketing".

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.

*/ inline void SetGroupMembers(GroupMembers&& value) { m_groupMembersHasBeenSet = true; m_groupMembers = std::move(value); } /** *

The list that contains your users or sub groups that belong the same * group.

For example, the group "Company" includes the user "CEO" and the * sub groups "Research", "Engineering", and "Sales and Marketing".

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.

*/ inline PutPrincipalMappingRequest& WithGroupMembers(const GroupMembers& value) { SetGroupMembers(value); return *this;} /** *

The list that contains your users or sub groups that belong the same * group.

For example, the group "Company" includes the user "CEO" and the * sub groups "Research", "Engineering", and "Sales and Marketing".

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.

*/ inline PutPrincipalMappingRequest& WithGroupMembers(GroupMembers&& value) { SetGroupMembers(std::move(value)); return *this;} /** *

The timestamp identifier you specify to ensure Amazon Kendra does not * override the latest PUT 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.

*

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 * PutPrincipalMapping. This ensures your PUT action for * that updated group with the latest members list doesn't get overwritten by * earlier PUT actions for the same group which are yet to be * processed.

The default ordering ID is the current Unix time in * milliseconds that the action was received by Amazon Kendra.

*/ inline long long GetOrderingId() const{ return m_orderingId; } /** *

The timestamp identifier you specify to ensure Amazon Kendra does not * override the latest PUT 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.

*

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 * PutPrincipalMapping. This ensures your PUT action for * that updated group with the latest members list doesn't get overwritten by * earlier PUT actions for the same group which are yet to be * processed.

The default ordering ID is the current Unix time in * milliseconds that the action was received by Amazon Kendra.

*/ inline bool OrderingIdHasBeenSet() const { return m_orderingIdHasBeenSet; } /** *

The timestamp identifier you specify to ensure Amazon Kendra does not * override the latest PUT 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.

*

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 * PutPrincipalMapping. This ensures your PUT action for * that updated group with the latest members list doesn't get overwritten by * earlier PUT actions for the same group which are yet to be * processed.

The default ordering ID is the current Unix time in * milliseconds that the action was received by Amazon Kendra.

*/ inline void SetOrderingId(long long value) { m_orderingIdHasBeenSet = true; m_orderingId = value; } /** *

The timestamp identifier you specify to ensure Amazon Kendra does not * override the latest PUT 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.

*

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 * PutPrincipalMapping. This ensures your PUT action for * that updated group with the latest members list doesn't get overwritten by * earlier PUT actions for the same group which are yet to be * processed.

The default ordering ID is the current Unix time in * milliseconds that the action was received by Amazon Kendra.

*/ inline PutPrincipalMappingRequest& WithOrderingId(long long value) { SetOrderingId(value); return *this;} /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline PutPrincipalMappingRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline PutPrincipalMappingRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of a role that has access to the S3 file that * contains your list of users or sub groups that belong to a group.

For * more information, see IAM * roles for Amazon Kendra.

*/ inline PutPrincipalMappingRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} private: Aws::String m_indexId; bool m_indexIdHasBeenSet = false; Aws::String m_dataSourceId; bool m_dataSourceIdHasBeenSet = false; Aws::String m_groupId; bool m_groupIdHasBeenSet = false; GroupMembers m_groupMembers; bool m_groupMembersHasBeenSet = false; long long m_orderingId; bool m_orderingIdHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws