/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace kendra { namespace Model { /** */ class CreateIndexRequest : public KendraRequest { public: AWS_KENDRA_API CreateIndexRequest(); // 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 "CreateIndex"; } AWS_KENDRA_API Aws::String SerializePayload() const override; AWS_KENDRA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A name for the index.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

A name for the index.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

A name for the index.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

A name for the index.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

A name for the index.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

A name for the index.

*/ inline CreateIndexRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

A name for the index.

*/ inline CreateIndexRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

A name for the index.

*/ inline CreateIndexRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The Amazon Kendra edition to use for the index. Choose * DEVELOPER_EDITION for indexes intended for development, testing, or * proof of concept. Use ENTERPRISE_EDITION for production. Once you * set the edition for an index, it can't be changed.

The * Edition parameter is optional. If you don't supply a value, the * default is ENTERPRISE_EDITION.

For more information on quota * limits for Enterprise and Developer editions, see Quotas.

*/ inline const IndexEdition& GetEdition() const{ return m_edition; } /** *

The Amazon Kendra edition to use for the index. Choose * DEVELOPER_EDITION for indexes intended for development, testing, or * proof of concept. Use ENTERPRISE_EDITION for production. Once you * set the edition for an index, it can't be changed.

The * Edition parameter is optional. If you don't supply a value, the * default is ENTERPRISE_EDITION.

For more information on quota * limits for Enterprise and Developer editions, see Quotas.

*/ inline bool EditionHasBeenSet() const { return m_editionHasBeenSet; } /** *

The Amazon Kendra edition to use for the index. Choose * DEVELOPER_EDITION for indexes intended for development, testing, or * proof of concept. Use ENTERPRISE_EDITION for production. Once you * set the edition for an index, it can't be changed.

The * Edition parameter is optional. If you don't supply a value, the * default is ENTERPRISE_EDITION.

For more information on quota * limits for Enterprise and Developer editions, see Quotas.

*/ inline void SetEdition(const IndexEdition& value) { m_editionHasBeenSet = true; m_edition = value; } /** *

The Amazon Kendra edition to use for the index. Choose * DEVELOPER_EDITION for indexes intended for development, testing, or * proof of concept. Use ENTERPRISE_EDITION for production. Once you * set the edition for an index, it can't be changed.

The * Edition parameter is optional. If you don't supply a value, the * default is ENTERPRISE_EDITION.

For more information on quota * limits for Enterprise and Developer editions, see Quotas.

*/ inline void SetEdition(IndexEdition&& value) { m_editionHasBeenSet = true; m_edition = std::move(value); } /** *

The Amazon Kendra edition to use for the index. Choose * DEVELOPER_EDITION for indexes intended for development, testing, or * proof of concept. Use ENTERPRISE_EDITION for production. Once you * set the edition for an index, it can't be changed.

The * Edition parameter is optional. If you don't supply a value, the * default is ENTERPRISE_EDITION.

For more information on quota * limits for Enterprise and Developer editions, see Quotas.

*/ inline CreateIndexRequest& WithEdition(const IndexEdition& value) { SetEdition(value); return *this;} /** *

The Amazon Kendra edition to use for the index. Choose * DEVELOPER_EDITION for indexes intended for development, testing, or * proof of concept. Use ENTERPRISE_EDITION for production. Once you * set the edition for an index, it can't be changed.

The * Edition parameter is optional. If you don't supply a value, the * default is ENTERPRISE_EDITION.

For more information on quota * limits for Enterprise and Developer editions, see Quotas.

*/ inline CreateIndexRequest& WithEdition(IndexEdition&& value) { SetEdition(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

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

The Amazon Resource Name (ARN) of an IAM role with permission to access your * Amazon CloudWatch logs and metrics. For more information, see IAM access * roles for Amazon Kendra.

*/ inline CreateIndexRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

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.

*/ inline const ServerSideEncryptionConfiguration& GetServerSideEncryptionConfiguration() const{ return m_serverSideEncryptionConfiguration; } /** *

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.

*/ inline bool ServerSideEncryptionConfigurationHasBeenSet() const { return m_serverSideEncryptionConfigurationHasBeenSet; } /** *

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.

*/ inline void SetServerSideEncryptionConfiguration(const ServerSideEncryptionConfiguration& value) { m_serverSideEncryptionConfigurationHasBeenSet = true; m_serverSideEncryptionConfiguration = value; } /** *

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.

*/ inline void SetServerSideEncryptionConfiguration(ServerSideEncryptionConfiguration&& value) { m_serverSideEncryptionConfigurationHasBeenSet = true; m_serverSideEncryptionConfiguration = std::move(value); } /** *

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.

*/ inline CreateIndexRequest& WithServerSideEncryptionConfiguration(const ServerSideEncryptionConfiguration& value) { SetServerSideEncryptionConfiguration(value); return *this;} /** *

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.

*/ inline CreateIndexRequest& WithServerSideEncryptionConfiguration(ServerSideEncryptionConfiguration&& value) { SetServerSideEncryptionConfiguration(std::move(value)); return *this;} /** *

A description for the index.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description for the index.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description for the index.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description for the index.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description for the index.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description for the index.

*/ inline CreateIndexRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description for the index.

*/ inline CreateIndexRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description for the index.

*/ inline CreateIndexRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline CreateIndexRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline CreateIndexRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

A token that you provide to identify the request to create an index. Multiple * calls to the CreateIndex API with the same client token will create * only one index.

*/ inline CreateIndexRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

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: _ . : / * = + - @.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

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: _ . : / * = + - @.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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: _ . : / * = + - @.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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: _ . : / * = + - @.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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: _ . : / * = + - @.

*/ inline CreateIndexRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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: _ . : / * = + - @.

*/ inline CreateIndexRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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: _ . : / * = + - @.

*/ inline CreateIndexRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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: _ . : / * = + - @.

*/ inline CreateIndexRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The user token configuration.

*/ inline const Aws::Vector& GetUserTokenConfigurations() const{ return m_userTokenConfigurations; } /** *

The user token configuration.

*/ inline bool UserTokenConfigurationsHasBeenSet() const { return m_userTokenConfigurationsHasBeenSet; } /** *

The user token configuration.

*/ inline void SetUserTokenConfigurations(const Aws::Vector& value) { m_userTokenConfigurationsHasBeenSet = true; m_userTokenConfigurations = value; } /** *

The user token configuration.

*/ inline void SetUserTokenConfigurations(Aws::Vector&& value) { m_userTokenConfigurationsHasBeenSet = true; m_userTokenConfigurations = std::move(value); } /** *

The user token configuration.

*/ inline CreateIndexRequest& WithUserTokenConfigurations(const Aws::Vector& value) { SetUserTokenConfigurations(value); return *this;} /** *

The user token configuration.

*/ inline CreateIndexRequest& WithUserTokenConfigurations(Aws::Vector&& value) { SetUserTokenConfigurations(std::move(value)); return *this;} /** *

The user token configuration.

*/ inline CreateIndexRequest& AddUserTokenConfigurations(const UserTokenConfiguration& value) { m_userTokenConfigurationsHasBeenSet = true; m_userTokenConfigurations.push_back(value); return *this; } /** *

The user token configuration.

*/ inline CreateIndexRequest& AddUserTokenConfigurations(UserTokenConfiguration&& value) { m_userTokenConfigurationsHasBeenSet = true; m_userTokenConfigurations.push_back(std::move(value)); return *this; } /** *

The user context policy.

ATTRIBUTE_FILTER

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 * _user_id and _group_ids or you can provide user and * group information in UserContext.

USER_TOKEN
*

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.

*/ inline const UserContextPolicy& GetUserContextPolicy() const{ return m_userContextPolicy; } /** *

The user context policy.

ATTRIBUTE_FILTER

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 * _user_id and _group_ids or you can provide user and * group information in UserContext.

USER_TOKEN
*

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.

*/ inline bool UserContextPolicyHasBeenSet() const { return m_userContextPolicyHasBeenSet; } /** *

The user context policy.

ATTRIBUTE_FILTER

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 * _user_id and _group_ids or you can provide user and * group information in UserContext.

USER_TOKEN
*

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.

*/ inline void SetUserContextPolicy(const UserContextPolicy& value) { m_userContextPolicyHasBeenSet = true; m_userContextPolicy = value; } /** *

The user context policy.

ATTRIBUTE_FILTER

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 * _user_id and _group_ids or you can provide user and * group information in UserContext.

USER_TOKEN
*

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.

*/ inline void SetUserContextPolicy(UserContextPolicy&& value) { m_userContextPolicyHasBeenSet = true; m_userContextPolicy = std::move(value); } /** *

The user context policy.

ATTRIBUTE_FILTER

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 * _user_id and _group_ids or you can provide user and * group information in UserContext.

USER_TOKEN
*

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.

*/ inline CreateIndexRequest& WithUserContextPolicy(const UserContextPolicy& value) { SetUserContextPolicy(value); return *this;} /** *

The user context policy.

ATTRIBUTE_FILTER

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 * _user_id and _group_ids or you can provide user and * group information in UserContext.

USER_TOKEN
*

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.

*/ inline CreateIndexRequest& WithUserContextPolicy(UserContextPolicy&& value) { SetUserContextPolicy(std::move(value)); return *this;} /** *

Gets users and groups from IAM Identity Center (successor to Single Sign-On) * identity source. To configure this, see UserGroupResolutionConfiguration.

*/ inline const UserGroupResolutionConfiguration& GetUserGroupResolutionConfiguration() const{ return m_userGroupResolutionConfiguration; } /** *

Gets users and groups from IAM Identity Center (successor to Single Sign-On) * identity source. To configure this, see UserGroupResolutionConfiguration.

*/ inline bool UserGroupResolutionConfigurationHasBeenSet() const { return m_userGroupResolutionConfigurationHasBeenSet; } /** *

Gets users and groups from IAM Identity Center (successor to Single Sign-On) * identity source. To configure this, see UserGroupResolutionConfiguration.

*/ inline void SetUserGroupResolutionConfiguration(const UserGroupResolutionConfiguration& value) { m_userGroupResolutionConfigurationHasBeenSet = true; m_userGroupResolutionConfiguration = value; } /** *

Gets users and groups from IAM Identity Center (successor to Single Sign-On) * identity source. To configure this, see UserGroupResolutionConfiguration.

*/ inline void SetUserGroupResolutionConfiguration(UserGroupResolutionConfiguration&& value) { m_userGroupResolutionConfigurationHasBeenSet = true; m_userGroupResolutionConfiguration = std::move(value); } /** *

Gets users and groups from IAM Identity Center (successor to Single Sign-On) * identity source. To configure this, see UserGroupResolutionConfiguration.

*/ inline CreateIndexRequest& WithUserGroupResolutionConfiguration(const UserGroupResolutionConfiguration& value) { SetUserGroupResolutionConfiguration(value); return *this;} /** *

Gets users and groups from IAM Identity Center (successor to Single Sign-On) * identity source. To configure this, see UserGroupResolutionConfiguration.

*/ inline CreateIndexRequest& WithUserGroupResolutionConfiguration(UserGroupResolutionConfiguration&& value) { SetUserGroupResolutionConfiguration(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; IndexEdition m_edition; bool m_editionHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; ServerSideEncryptionConfiguration m_serverSideEncryptionConfiguration; bool m_serverSideEncryptionConfigurationHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Vector m_userTokenConfigurations; bool m_userTokenConfigurationsHasBeenSet = false; UserContextPolicy m_userContextPolicy; bool m_userContextPolicyHasBeenSet = false; UserGroupResolutionConfiguration m_userGroupResolutionConfiguration; bool m_userGroupResolutionConfigurationHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws