cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
593 lines (592 loc) • 19.3 kB
TypeScript
import { AccessLevelList } from '../../shared/access-level';
import { PolicyStatement, Operator } from '../../shared';
import { aws_iam as iam } from "aws-cdk-lib";
/**
* Statement provider for service [qbusiness](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonqbusiness.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class Qbusiness extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to add one or more users for licenses
*
* Access Level: Write
*/
toAddUserLicenses(): this;
/**
* Grants permission to batch delete document
*
* Access Level: Write
*/
toBatchDeleteDocument(): this;
/**
* Grants permission to batch put document
*
* Access Level: Write
*/
toBatchPutDocument(): this;
/**
* Grants permission to cancel a subscription
*
* Access Level: Write
*/
toCancelSubscription(): this;
/**
* Grants permission to chat using an application
*
* Access Level: Read
*/
toChat(): this;
/**
* Grants permission to chat synchronously using an application
*
* Access Level: Read
*/
toChatSync(): this;
/**
* Grants permission to create an application
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toCreateApplication(): this;
/**
* Grants permission to create a data source for a given application and index
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toCreateDataSource(): this;
/**
* Grants permission to create an index for a given application
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toCreateIndex(): this;
/**
* Grants permission to create a license
*
* Access Level: Write
*/
toCreateLicense(): this;
/**
* Grants permission to create a plugin for a given application
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toCreatePlugin(): this;
/**
* Grants permission to create a retriever for a given application
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toCreateRetriever(): this;
/**
* Grants permission to create a subscription
*
* Access Level: Write
*/
toCreateSubscription(): this;
/**
* Grants permission to create a user
*
* Access Level: Write
*/
toCreateUser(): this;
/**
* Grants permission to create a web experience for a given application
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toCreateWebExperience(): this;
/**
* Grants permission to delete an application
*
* Access Level: Write
*/
toDeleteApplication(): this;
/**
* Grants permission to delete chat controls configuration for an application
*
* Access Level: Write
*/
toDeleteChatControlsConfiguration(): this;
/**
* Grants permission to delete a conversation
*
* Access Level: Write
*/
toDeleteConversation(): this;
/**
* Grants permission to delete a DataSource
*
* Access Level: Write
*/
toDeleteDataSource(): this;
/**
* Grants permission to delete a group
*
* Access Level: Write
*/
toDeleteGroup(): this;
/**
* Grants permission to delete an index
*
* Access Level: Write
*/
toDeleteIndex(): this;
/**
* Grants permission to delete a plugin
*
* Access Level: Write
*/
toDeletePlugin(): this;
/**
* Grants permission to delete a retriever
*
* Access Level: Write
*/
toDeleteRetriever(): this;
/**
* Grants permission to delete a user
*
* Access Level: Write
*/
toDeleteUser(): this;
/**
* Grants permission to delete a web-experience
*
* Access Level: Write
*/
toDeleteWebExperience(): this;
/**
* Grants permission to get an application
*
* Access Level: Read
*/
toGetApplication(): this;
/**
* Grants permission to get chat controls configuration for an application
*
* Access Level: List
*/
toGetChatControlsConfiguration(): this;
/**
* Grants permission to get a data source
*
* Access Level: Read
*/
toGetDataSource(): this;
/**
* Grants permission to get a group
*
* Access Level: Read
*/
toGetGroup(): this;
/**
* Grants permission to get an index
*
* Access Level: Read
*/
toGetIndex(): this;
/**
* Grants permission to get a license
*
* Access Level: Read
*/
toGetLicense(): this;
/**
* Grants permission to get a plugin
*
* Access Level: Read
*/
toGetPlugin(): this;
/**
* Grants permission to get a retriever
*
* Access Level: Read
*/
toGetRetriever(): this;
/**
* Grants permission to get a user
*
* Access Level: Read
*/
toGetUser(): this;
/**
* Grants permission to get a web-experience
*
* Access Level: Read
*/
toGetWebExperience(): this;
/**
* Grants permission to list the applications
*
* Access Level: List
*/
toListApplications(): this;
/**
* Grants permission to list all conversations for an application
*
* Access Level: List
*/
toListConversations(): this;
/**
* Grants permission to get Data Source sync job history
*
* Access Level: List
*/
toListDataSourceSyncJobs(): this;
/**
* Grants permission to list the data sources of an application and an index
*
* Access Level: List
*/
toListDataSources(): this;
/**
* Grants permission to list all documents
*
* Access Level: List
*/
toListDocuments(): this;
/**
* Grants permission to list groups
*
* Access Level: List
*/
toListGroups(): this;
/**
* Grants permission to list the indices of an application
*
* Access Level: List
*/
toListIndices(): this;
/**
* Grants permission to list all messages
*
* Access Level: List
*/
toListMessages(): this;
/**
* Grants permission to list the plugins of an application
*
* Access Level: List
*/
toListPlugins(): this;
/**
* Grants permission to list the retrievers of an application
*
* Access Level: List
*/
toListRetrievers(): this;
/**
* Grants permission to list subscriptions
*
* Access Level: List
*/
toListSubscriptions(): this;
/**
* Grants permission to list tags for a resource
*
* Access Level: Read
*/
toListTagsForResource(): this;
/**
* Grants permission to list licenses
*
* Access Level: List
*/
toListUserLicenses(): this;
/**
* Grants permission to list the web experiences of an application
*
* Access Level: List
*/
toListWebExperiences(): this;
/**
* Grants permission to put feedback about a conversation message
*
* Access Level: Write
*/
toPutFeedback(): this;
/**
* Grants permission to put a group of users
*
* Access Level: Write
*/
toPutGroup(): this;
/**
* Grants permission to remove licenses for one or more users
*
* Access Level: Write
*/
toRemoveUserLicenses(): this;
/**
* Grants permission to start Data Source sync job
*
* Access Level: Write
*/
toStartDataSourceSyncJob(): this;
/**
* Grants permission to stop Data Source sync job
*
* Access Level: Write
*/
toStopDataSourceSyncJob(): this;
/**
* Grants permission to tag a resource with given key value pairs
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*/
toTagResource(): this;
/**
* Grants permission to remove the tag with the given key from a resource
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsTagKeys()
*/
toUntagResource(): this;
/**
* Grants permission to update an Application
*
* Access Level: Write
*/
toUpdateApplication(): this;
/**
* Grants permission to update chat controls configuration for an application
*
* Access Level: Write
*/
toUpdateChatControlsConfiguration(): this;
/**
* Grants permission to update a DataSource
*
* Access Level: Write
*/
toUpdateDataSource(): this;
/**
* Grants permission to update an index
*
* Access Level: Write
*/
toUpdateIndex(): this;
/**
* Grants permission to update a plugin
*
* Access Level: Write
*/
toUpdatePlugin(): this;
/**
* Grants permission to update a Retriever
*
* Access Level: Write
*/
toUpdateRetriever(): this;
/**
* Grants permission to update a subscription
*
* Access Level: Write
*/
toUpdateSubscription(): this;
/**
* Grants permission to update a user
*
* Access Level: Write
*/
toUpdateUser(): this;
/**
* Grants permission to update a WebExperience
*
* Access Level: Write
*/
toUpdateWebExperience(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type application to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onApplication(applicationId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type retriever to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param retrieverId - Identifier for the retrieverId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onRetriever(applicationId: string, retrieverId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type index to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param indexId - Identifier for the indexId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onIndex(applicationId: string, indexId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type data-source to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param indexId - Identifier for the indexId.
* @param dataSourceId - Identifier for the dataSourceId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onDataSource(applicationId: string, indexId: string, dataSourceId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type plugin to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param pluginId - Identifier for the pluginId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onPlugin(applicationId: string, pluginId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type web-experience to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param webExperienceId - Identifier for the webExperienceId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onWebExperience(applicationId: string, webExperienceId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type user-license to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param userLicenseId - Identifier for the userLicenseId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*/
onUserLicense(applicationId: string, userLicenseId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type subscription to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param subscriptionId - Identifier for the subscriptionId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*/
onSubscription(applicationId: string, subscriptionId: string, account?: string, region?: string, partition?: string): this;
/**
* Filters access by the tags that are passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag
*
* Applies to actions:
* - .toCreateApplication()
* - .toCreateDataSource()
* - .toCreateIndex()
* - .toCreatePlugin()
* - .toCreateRetriever()
* - .toCreateWebExperience()
* - .toTagResource()
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsRequestTag(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the tags associated with the resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* Applies to resource types:
* - application
* - retriever
* - index
* - data-source
* - plugin
* - web-experience
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsResourceTag(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the tag keys that are passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys
*
* Applies to actions:
* - .toCreateApplication()
* - .toCreateDataSource()
* - .toCreateIndex()
* - .toCreatePlugin()
* - .toCreateRetriever()
* - .toCreateWebExperience()
* - .toTagResource()
* - .toUntagResource()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsTagKeys(value: string | string[], operator?: Operator | string): this;
/**
* Statement provider for service [qbusiness](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonqbusiness.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}