UNPKG

iam-floyd

Version:

AWS IAM policy statement generator with fluent interface

568 lines (567 loc) 21 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; /** * Statement provider for service [lex](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlex.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Lex extends PolicyStatement { servicePrefix: string; /** * Statement provider for service [lex](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlex.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ constructor(sid?: string); /** * Creates a new version based on the $LATEST version of the specified bot * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_CreateBotVersion.html */ toCreateBotVersion(): this; /** * Creates a new version based on the $LATEST version of the specified intent * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_CreateIntentVersion.html */ toCreateIntentVersion(): this; /** * Creates a new version based on the $LATEST version of the specified slot type * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_CreateSlotTypeVersion.html */ toCreateSlotTypeVersion(): this; /** * Deletes all versions of a bot * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteBot.html */ toDeleteBot(): this; /** * Deletes an alias for a specific bot * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteBotAlias.html */ toDeleteBotAlias(): this; /** * Deletes the association between a Amazon Lex bot alias and a messaging platform * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteBotChannelAssociation.html */ toDeleteBotChannelAssociation(): this; /** * Deletes a specific version of a bot * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteBotVersion.html */ toDeleteBotVersion(): this; /** * Deletes all versions of an intent * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteIntent.html */ toDeleteIntent(): this; /** * Deletes a specific version of an intent * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteIntentVersion.html */ toDeleteIntentVersion(): this; /** * Removes session information for a specified bot, alias, and user ID * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_runtime_DeleteSession.html */ toDeleteSession(): this; /** * Deletes all versions of a slot type * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteSlotType.html */ toDeleteSlotType(): this; /** * Deletes a specific version of a slot type * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteSlotTypeVersion.html */ toDeleteSlotTypeVersion(): this; /** * Deletes the information Amazon Lex maintains for utterances on a specific bot and userId * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_DeleteUtterances.html */ toDeleteUtterances(): this; /** * Returns information for a specific bot. In addition to the bot name, the bot version or alias is required * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBot.html */ toGetBot(): this; /** * Returns information about a Amazon Lex bot alias * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBotAlias.html */ toGetBotAlias(): this; /** * Returns a list of aliases for a given Amazon Lex bot * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBotAliases.html */ toGetBotAliases(): this; /** * Returns information about the association between a Amazon Lex bot and a messaging platform * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBotChannelAssociation.html */ toGetBotChannelAssociation(): this; /** * Returns a list of all of the channels associated with a single bot * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBotChannelAssociations.html */ toGetBotChannelAssociations(): this; /** * Returns information for all versions of a specific bot * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBotVersions.html */ toGetBotVersions(): this; /** * Returns information for the $LATEST version of all bots, subject to filters provided by the client * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBots.html */ toGetBots(): this; /** * Returns information about a built-in intent * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBuiltinIntent.html */ toGetBuiltinIntent(): this; /** * Gets a list of built-in intents that meet the specified criteria * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBuiltinIntents.html */ toGetBuiltinIntents(): this; /** * Gets a list of built-in slot types that meet the specified criteria * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetBuiltinSlotTypes.html */ toGetBuiltinSlotTypes(): this; /** * Exports Amazon Lex Resource in a requested format * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetExport.html */ toGetExport(): this; /** * Gets information about an import job started with StartImport * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetImport.html */ toGetImport(): this; /** * Returns information for a specific intent. In addition to the intent name, you must also specify the intent version * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetIntent.html */ toGetIntent(): this; /** * Returns information for all versions of a specific intent * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetIntentVersions.html */ toGetIntentVersions(): this; /** * Returns information for the $LATEST version of all intents, subject to filters provided by the client * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetIntents.html */ toGetIntents(): this; /** * Grants permission to view an ongoing or completed migration * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetMigration.html */ toGetMigration(): this; /** * Grants permission to view list of migrations from Amazon Lex v1 to Amazon Lex v2 * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetMigrations.html */ toGetMigrations(): this; /** * Returns session information for a specified bot, alias, and user ID * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_runtime_GetSession.html */ toGetSession(): this; /** * Returns information about a specific version of a slot type. In addition to specifying the slot type name, you must also specify the slot type version * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_GetSlotType.html */ toGetSlotType(): this; /** * Returns information for all versions of a specific slot type * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetSlotTypeVersions.html */ toGetSlotTypeVersions(): this; /** * Returns information for the $LATEST version of all slot types, subject to filters provided by the client * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetSlotTypes.html */ toGetSlotTypes(): this; /** * Returns a view of aggregate utterance data for versions of a bot for a recent time period * * Access Level: List * * https://docs.aws.amazon.com/lex/latest/dg/API_GetUtterancesView.html */ toGetUtterancesView(): this; /** * Lists tags for a Lex resource * * Access Level: Read * * https://docs.aws.amazon.com/lex/latest/dg/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Sends user input (text or speech) to Amazon Lex * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html */ toPostContent(): this; /** * Sends user input (text-only) to Amazon Lex * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html */ toPostText(): this; /** * Creates or updates the $LATEST version of a Amazon Lex conversational bot * * Access Level: Write * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html */ toPutBot(): this; /** * Creates or updates an alias for the specific bot * * Access Level: Write * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/lex/latest/dg/API_PutBotAlias.html */ toPutBotAlias(): this; /** * Creates or updates the $LATEST version of an intent * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_PutIntent.html */ toPutIntent(): this; /** * Creates a new session or modifies an existing session with an Amazon Lex bot * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PutSession.html */ toPutSession(): this; /** * Creates or updates the $LATEST version of a slot type * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_PutSlotType.html */ toPutSlotType(): this; /** * Starts a job to import a resource to Amazon Lex * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_StartImport.html */ toStartImport(): this; /** * Grants permission to migrate a bot from Amazon Lex v1 to Amazon Lex v2 * * Access Level: Write * * https://docs.aws.amazon.com/lex/latest/dg/API_StartMigration.html */ toStartMigration(): this; /** * Adds or overwrites tags to a Lex resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/lex/latest/dg/API_TagResource.html */ toTagResource(): this; /** * Removes tags from a Lex resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/lex/latest/dg/API_UntagResource.html */ toUntagResource(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type bot to the statement * * https://docs.aws.amazon.com/lex/latest/dg/API_BotMetadata.html * * @param botName - Identifier for the botName. * @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() */ onBot(botName: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type bot version to the statement * * https://docs.aws.amazon.com/lex/latest/dg/API_BotMetadata.html * * @param botName - Identifier for the botName. * @param botVersion - Identifier for the botVersion. * @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() */ onBotVersion(botName: string, botVersion: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type bot alias to the statement * * https://docs.aws.amazon.com/lex/latest/dg/API_BotAliasMetadata.html * * @param botName - Identifier for the botName. * @param botAlias - Identifier for the botAlias. * @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() */ onBotAlias(botName: string, botAlias: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type channel to the statement * * https://docs.aws.amazon.com/lex/latest/dg/API_BotChannelAssociation.html * * @param botName - Identifier for the botName. * @param botAlias - Identifier for the botAlias. * @param channelName - Identifier for the channelName. * @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() */ onChannel(botName: string, botAlias: string, channelName: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type intent version to the statement * * https://docs.aws.amazon.com/lex/latest/dg/API_Intent.html * * @param intentName - Identifier for the intentName. * @param intentVersion - Identifier for the intentVersion. * @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. */ onIntentVersion(intentName: string, intentVersion: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type slottype version to the statement * * https://docs.aws.amazon.com/lex/latest/dg/API_SlotTypeMetadata.html * * @param slotName - Identifier for the slotName. * @param slotVersion - Identifier for the slotVersion. * @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. */ onSlottypeVersion(slotName: string, slotVersion: string, account?: string, region?: string, partition?: string): this; /** * Filters access based on the tags in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toPutBot() * - .toPutBotAlias() * - .toTagResource() * - .toUntagResource() * * @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 attached to a Lex resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to resource types: * - bot * - bot version * - bot alias * - channel * * @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 based on the set of tag keys in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toPutBot() * - .toPutBotAlias() * - .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; /** * Enables you to control access based on the intents included in the request * * https://docs.aws.amazon.com/lex/latest/dg/security_iam_service-with-iam.html * * @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` */ ifAssociatedIntents(value: string | string[], operator?: Operator | string): this; /** * Enables you to control access based on the slot types included in the request * * https://docs.aws.amazon.com/lex/latest/dg/security_iam_service-with-iam.html * * @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` */ ifAssociatedSlotTypes(value: string | string[], operator?: Operator | string): this; /** * Enables you to control access based on the channel type included in the request * * https://docs.aws.amazon.com/lex/latest/dg/security_iam_service-with-iam.html * * @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` */ ifChannelType(value: string | string[], operator?: Operator | string): this; }