UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

456 lines (455 loc) 17.4 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 [cleanrooms-ml](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscleanroomsml.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class CleanroomsMl extends PolicyStatement { servicePrefix: string; /** * Grants permission to create an audience model * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_CreateAudienceModel.html */ toCreateAudienceModel(): this; /** * Grants permission to create a configured audience model * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_CreateConfiguredAudienceModel.html */ toCreateConfiguredAudienceModel(): this; /** * Grants permission to create a training dataset, or seed audience. In Clean Rooms ML, the TrainingDataset is metadata that points to a Glue table, which is read only during AudienceModel creation * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_CreateTrainingDataset.html */ toCreateTrainingDataset(): this; /** * Grants permission to delete the specified audience generation job, and removes all data associated with the job * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_DeleteAudienceGenerationJob.html */ toDeleteAudienceGenerationJob(): this; /** * Grants permission to delete the specified audience generation job, and removes all data associated with the job * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_DeleteAudienceModel.html */ toDeleteAudienceModel(): this; /** * Grants permission to delete the specified configured audience model * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_DeleteConfiguredAudienceModel.html */ toDeleteConfiguredAudienceModel(): this; /** * Grants permission to delete the specified configured audience model policy * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_DeleteConfiguredAudienceModelPolicy.html */ toDeleteConfiguredAudienceModelPolicy(): this; /** * Grants permission to delete a training dataset * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_DeleteTrainingDataset.html */ toDeleteTrainingDataset(): this; /** * Grants permission to return information about an audience generation job * * Access Level: Read * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_GetAudienceGenerationJob.html */ toGetAudienceGenerationJob(): this; /** * Grants permission to return information about an audience model * * Access Level: Read * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_GetAudienceModel.html */ toGetAudienceModel(): this; /** * Grants permission to return information about a configured audience model * * Access Level: Read * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_GetConfiguredAudienceModel.html */ toGetConfiguredAudienceModel(): this; /** * Grants permission to return information about a configured audience model policy * * Access Level: Read * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_GetConfiguredAudienceModelPolicy.html */ toGetConfiguredAudienceModelPolicy(): this; /** * Grants permission to return information about a training dataset * * Access Level: Read * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_GetTrainingDataset.html */ toGetTrainingDataset(): this; /** * Grants permission to return a list of the audience export jobs * * Access Level: List * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ListAudienceExportJobs.html */ toListAudienceExportJobs(): this; /** * Grants permission to return a list of audience generation jobs * * Access Level: List * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ListAudienceGenerationJobs.html */ toListAudienceGenerationJobs(): this; /** * Grants permission to return a list of audience models * * Access Level: List * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ListAudienceModels.html */ toListAudienceModels(): this; /** * Grants permission to return a list of configured audience models * * Access Level: List * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ListConfiguredAudienceModels.html */ toListConfiguredAudienceModels(): this; /** * Grants permission to return a list of tags for a provided resource * * Access Level: List * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to return a list of training datasets * * Access Level: List * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ListTrainingDatasets.html */ toListTrainingDatasets(): this; /** * Grants permission to create or update the resource policy for a configured audience model * * Access Level: Permissions management * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_PutConfiguredAudienceModelPolicy.html */ toPutConfiguredAudienceModelPolicy(): this; /** * Grants permission to export an audience of a specified size after you have generated an audience * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_StartAudienceExportJob.html */ toStartAudienceExportJob(): this; /** * Grants permission to start the audience generation job * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifCollaborationId() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_StartAudienceGenerationJob.html */ toStartAudienceGenerationJob(): this; /** * Grants permission to tag a specific resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to untag a specific resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_UntagResource.html */ toUnTagResource(): this; /** * Grants permission to update a configured audience model. * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_UpdateConfiguredAudienceModel.html */ toUpdateConfiguredAudienceModel(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type trainingdataset to the statement * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_TrainingDatasetSummary.html * * @param resourceId - Identifier for the resourceId. * @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() */ onTrainingdataset(resourceId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type audiencemodel to the statement * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_AudienceModelSummary.html * * @param resourceId - Identifier for the resourceId. * @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() */ onAudiencemodel(resourceId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type configuredaudiencemodel to the statement * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_ConfiguredAudienceModelSummary.html * * @param resourceId - Identifier for the resourceId. * @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() */ onConfiguredaudiencemodel(resourceId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type audiencegenerationjob to the statement * * https://docs.aws.amazon.com/cleanrooms-ml/latest/APIReference/API_AudienceGenerationJobSummary.html * * @param resourceId - Identifier for the resourceId. * @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() */ onAudiencegenerationjob(resourceId: string, account?: string, region?: string, partition?: string): this; /** * Filters access by the presence of tag key-value pairs in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toCreateAudienceModel() * - .toCreateConfiguredAudienceModel() * - .toCreateTrainingDataset() * - .toDeleteAudienceGenerationJob() * - .toDeleteAudienceModel() * - .toDeleteConfiguredAudienceModel() * - .toDeleteConfiguredAudienceModelPolicy() * - .toDeleteTrainingDataset() * - .toGetAudienceGenerationJob() * - .toGetAudienceModel() * - .toGetConfiguredAudienceModel() * - .toGetConfiguredAudienceModelPolicy() * - .toGetTrainingDataset() * - .toListAudienceExportJobs() * - .toListAudienceGenerationJobs() * - .toStartAudienceExportJob() * - .toStartAudienceGenerationJob() * - .toTagResource() * - .toUpdateConfiguredAudienceModel() * * @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 tag key-value pairs attached to the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to actions: * - .toListTagsForResource() * - .toTagResource() * - .toUnTagResource() * * Applies to resource types: * - trainingdataset * - audiencemodel * - configuredaudiencemodel * - audiencegenerationjob * * @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 presence 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: * - .toCreateAudienceModel() * - .toCreateConfiguredAudienceModel() * - .toCreateTrainingDataset() * - .toDeleteAudienceGenerationJob() * - .toDeleteAudienceModel() * - .toDeleteConfiguredAudienceModel() * - .toDeleteConfiguredAudienceModelPolicy() * - .toDeleteTrainingDataset() * - .toGetAudienceGenerationJob() * - .toGetAudienceModel() * - .toGetConfiguredAudienceModel() * - .toGetConfiguredAudienceModelPolicy() * - .toGetTrainingDataset() * - .toListAudienceExportJobs() * - .toListAudienceGenerationJobs() * - .toListTagsForResource() * - .toStartAudienceExportJob() * - .toStartAudienceGenerationJob() * - .toTagResource() * - .toUnTagResource() * - .toUpdateConfiguredAudienceModel() * * @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; /** * Filters access by clean rooms collaboration id * * https://docs.aws.amazon.com/TBD * * Applies to actions: * - .toStartAudienceGenerationJob() * * @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` */ ifCollaborationId(value: string | string[], operator?: Operator | string): this; /** * Statement provider for service [cleanrooms-ml](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscleanroomsml.html). * */ constructor(props?: iam.PolicyStatementProps); }