UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

257 lines (256 loc) 9.94 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; import { aws_iam as iam } from "aws-cdk-lib"; /** * Statement provider for service [translate](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontranslate.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Translate extends PolicyStatement { servicePrefix: string; /** * Grants permission to create a Parallel Data * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/translate/latest/APIReference/API_CreateParallelData.html */ toCreateParallelData(): this; /** * Grants permission to delete a Parallel Data * * Access Level: Write * * https://docs.aws.amazon.com/translate/latest/APIReference/API_DeleteParallelData.html */ toDeleteParallelData(): this; /** * Grants permission to delete a terminology * * Access Level: Write * * https://docs.aws.amazon.com/translate/latest/APIReference/API_DeleteTerminology.html */ toDeleteTerminology(): this; /** * Grants permission to get the properties associated with an asynchronous batch translation job * * Access Level: Read * * https://docs.aws.amazon.com/translate/latest/APIReference/API_DescribeTextTranslationJob.html */ toDescribeTextTranslationJob(): this; /** * Grants permission to get a Parallel Data * * Access Level: Read * * https://docs.aws.amazon.com/translate/latest/APIReference/API_GetParallelData.html */ toGetParallelData(): this; /** * Grants permission to retrieve a terminology * * Access Level: Read * * https://docs.aws.amazon.com/translate/latest/APIReference/API_GetTerminology.html */ toGetTerminology(): this; /** * Grants permission to create or update a terminology, depending on whether or not one already exists for the given terminology name * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/translate/latest/APIReference/API_ImportTerminology.html */ toImportTerminology(): this; /** * Grants permission to list supported languages * * Access Level: List * * https://docs.aws.amazon.com/translate/latest/APIReference/API_ListLanguages.html */ toListLanguages(): this; /** * Grants permission to list Parallel Data associated with your account * * Access Level: List * * https://docs.aws.amazon.com/translate/latest/APIReference/API_ListParallelData.html */ toListParallelData(): this; /** * Grants permission to list tags for a resource * * Access Level: Read * * https://docs.aws.amazon.com/translate/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to list terminologies associated with your account * * Access Level: List * * https://docs.aws.amazon.com/translate/latest/APIReference/API_ListTerminologies.html */ toListTerminologies(): this; /** * Grants permission to list batch translation jobs that you have submitted * * Access Level: List * * https://docs.aws.amazon.com/translate/latest/APIReference/API_ListTextTranslationJobs.html */ toListTextTranslationJobs(): this; /** * Grants permission to start an asynchronous batch translation job. Batch translation jobs can be used to translate large volumes of text across multiple documents at once * * Access Level: Write * * https://docs.aws.amazon.com/translate/latest/APIReference/API_StartTextTranslationJob.html */ toStartTextTranslationJob(): this; /** * Grants permission to stop an asynchronous batch translation job that is in progress * * Access Level: Write * * https://docs.aws.amazon.com/translate/latest/APIReference/API_StopTextTranslationJob.html */ toStopTextTranslationJob(): this; /** * Grants permission to tag a resource with given key value pairs * * Access Level: Tagging * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/translate/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to translate a document from a source language to a target language * * Access Level: Read * * https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateDocument.html */ toTranslateDocument(): this; /** * Grants permission to translate text from a source language to a target language * * Access Level: Read * * https://docs.aws.amazon.com/translate/latest/APIReference/API_TranslateText.html */ toTranslateText(): this; /** * Grants permission to untag a resource with given key * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/translate/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update an existing Parallel Data * * Access Level: Write * * https://docs.aws.amazon.com/translate/latest/APIReference/API_UpdateParallelData.html */ toUpdateParallelData(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type terminology to the statement * * https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html * * @param resourceName - Identifier for the resourceName. * @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() */ onTerminology(resourceName: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type parallel-data to the statement * * https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html * * @param resourceName - Identifier for the resourceName. * @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() */ onParallelData(resourceName: string, account?: string, region?: string, partition?: string): this; /** * Filters access by requiring tag values present in a resource creation request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available * * Applies to actions: * - .toCreateParallelData() * - .toImportTerminology() * - .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 requiring tag value associated with the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available * * Applies to resource types: * - terminology * - parallel-data * * @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 requiring the presence of mandatory tags in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available * * Applies to actions: * - .toCreateParallelData() * - .toImportTerminology() * - .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 [translate](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontranslate.html). * */ constructor(props?: iam.PolicyStatementProps); }