cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
1,367 lines • 129 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Personalize = void 0;
const shared_1 = require("../../shared");
/**
* Statement provider for service [personalize](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpersonalize.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
class Personalize extends shared_1.PolicyStatement {
/**
* Grants permission to create a batch inference job
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* Dependent actions:
* - iam:PassRole
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateBatchInferenceJob.html
*/
toCreateBatchInferenceJob() {
return this.to('CreateBatchInferenceJob');
}
/**
* Grants permission to create a batch segment job
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* Dependent actions:
* - iam:PassRole
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateBatchSegmentJob.html
*/
toCreateBatchSegmentJob() {
return this.to('CreateBatchSegmentJob');
}
/**
* Grants permission to create a campaign
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateCampaign.html
*/
toCreateCampaign() {
return this.to('CreateCampaign');
}
/**
* Grants permission to create a data deletion job
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* Dependent actions:
* - iam:PassRole
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataDeletionJob.html
*/
toCreateDataDeletionJob() {
return this.to('CreateDataDeletionJob');
}
/**
* Grants permission to create a data insights job
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/analyzing-data.html
*/
toCreateDataInsightsJob() {
return this.to('CreateDataInsightsJob');
}
/**
* Grants permission to create a dataset
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html
*/
toCreateDataset() {
return this.to('CreateDataset');
}
/**
* Grants permission to create a dataset export job
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* Dependent actions:
* - iam:PassRole
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetExportJob.html
*/
toCreateDatasetExportJob() {
return this.to('CreateDatasetExportJob');
}
/**
* Grants permission to create a dataset group
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html
*/
toCreateDatasetGroup() {
return this.to('CreateDatasetGroup');
}
/**
* Grants permission to create a dataset import job
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* Dependent actions:
* - iam:PassRole
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html
*/
toCreateDatasetImportJob() {
return this.to('CreateDatasetImportJob');
}
/**
* Grants permission to create an event tracker
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html
*/
toCreateEventTracker() {
return this.to('CreateEventTracker');
}
/**
* Grants permission to create a filter
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateFilter.html
*/
toCreateFilter() {
return this.to('CreateFilter');
}
/**
* Grants permission to create a metric attribution
*
* Access Level: Write
*
* Dependent actions:
* - iam:PassRole
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateMetricAttribution.html
*/
toCreateMetricAttribution() {
return this.to('CreateMetricAttribution');
}
/**
* Grants permission to create a recommender
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateRecommender.html
*/
toCreateRecommender() {
return this.to('CreateRecommender');
}
/**
* Grants permission to create a schema
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSchema.html
*/
toCreateSchema() {
return this.to('CreateSchema');
}
/**
* Grants permission to create a solution
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html
*/
toCreateSolution() {
return this.to('CreateSolution');
}
/**
* Grants permission to create a solution version
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolutionVersion.html
*/
toCreateSolutionVersion() {
return this.to('CreateSolutionVersion');
}
/**
* Grants permission to delete a campaign
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteCampaign.html
*/
toDeleteCampaign() {
return this.to('DeleteCampaign');
}
/**
* Grants permission to delete a dataset
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteDataset.html
*/
toDeleteDataset() {
return this.to('DeleteDataset');
}
/**
* Grants permission to delete a dataset group
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteDatasetGroup.html
*/
toDeleteDatasetGroup() {
return this.to('DeleteDatasetGroup');
}
/**
* Grants permission to delete an event tracker
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteEventTracker.html
*/
toDeleteEventTracker() {
return this.to('DeleteEventTracker');
}
/**
* Grants permission to delete a filter
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteFilter.html
*/
toDeleteFilter() {
return this.to('DeleteFilter');
}
/**
* Grants permission to delete a metric attribution
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteMetricAttribution.html
*/
toDeleteMetricAttribution() {
return this.to('DeleteMetricAttribution');
}
/**
* Grants permission to delete a recommender
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteRecommender.html
*/
toDeleteRecommender() {
return this.to('DeleteRecommender');
}
/**
* Grants permission to delete a schema
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteSchema.html
*/
toDeleteSchema() {
return this.to('DeleteSchema');
}
/**
* Grants permission to delete a solution including all versions of the solution
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteSolution.html
*/
toDeleteSolution() {
return this.to('DeleteSolution');
}
/**
* Grants permission to describe an algorithm
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeAlgorithm.html
*/
toDescribeAlgorithm() {
return this.to('DescribeAlgorithm');
}
/**
* Grants permission to describe a batch inference job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeBatchInferenceJob.html
*/
toDescribeBatchInferenceJob() {
return this.to('DescribeBatchInferenceJob');
}
/**
* Grants permission to describe a batch segment job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeBatchSegmentJob.html
*/
toDescribeBatchSegmentJob() {
return this.to('DescribeBatchSegmentJob');
}
/**
* Grants permission to describe a campaign
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeCampaign.html
*/
toDescribeCampaign() {
return this.to('DescribeCampaign');
}
/**
* Grants permission to describe a data deletion job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDataDeletionJob.html
*/
toDescribeDataDeletionJob() {
return this.to('DescribeDataDeletionJob');
}
/**
* Grants permission to describe a data insights job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/analyzing-data.html
*/
toDescribeDataInsightsJob() {
return this.to('DescribeDataInsightsJob');
}
/**
* Grants permission to describe a dataset
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDataset.html
*/
toDescribeDataset() {
return this.to('DescribeDataset');
}
/**
* Grants permission to describe a dataset export job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetExportJob.html
*/
toDescribeDatasetExportJob() {
return this.to('DescribeDatasetExportJob');
}
/**
* Grants permission to describe a dataset group
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetGroup.html
*/
toDescribeDatasetGroup() {
return this.to('DescribeDatasetGroup');
}
/**
* Grants permission to describe a dataset import job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetImportJob.html
*/
toDescribeDatasetImportJob() {
return this.to('DescribeDatasetImportJob');
}
/**
* Grants permission to describe an event tracker
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeEventTracker.html
*/
toDescribeEventTracker() {
return this.to('DescribeEventTracker');
}
/**
* Grants permission to describe a feature transformation
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeFeatureTransformation.html
*/
toDescribeFeatureTransformation() {
return this.to('DescribeFeatureTransformation');
}
/**
* Grants permission to describe a filter
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeFilter.html
*/
toDescribeFilter() {
return this.to('DescribeFilter');
}
/**
* Grants permission to describe a metric attribution
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeMetricAttribution.html
*/
toDescribeMetricAttribution() {
return this.to('DescribeMetricAttribution');
}
/**
* Grants permission to describe a recipe
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeRecipe.html
*/
toDescribeRecipe() {
return this.to('DescribeRecipe');
}
/**
* Grants permission to describe a recommender
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeRecommender.html
*/
toDescribeRecommender() {
return this.to('DescribeRecommender');
}
/**
* Grants permission to describe a schema
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSchema.html
*/
toDescribeSchema() {
return this.to('DescribeSchema');
}
/**
* Grants permission to describe a solution
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolution.html
*/
toDescribeSolution() {
return this.to('DescribeSolution');
}
/**
* Grants permission to describe a version of a solution
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html
*/
toDescribeSolutionVersion() {
return this.to('DescribeSolutionVersion');
}
/**
* Grants permission to get a list of recommended actions
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetActionRecommendations.html
*/
toGetActionRecommendations() {
return this.to('GetActionRecommendations');
}
/**
* Grants permission to get data insights from a data insights job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/analyzing-data.html
*/
toGetDataInsights() {
return this.to('GetDataInsights');
}
/**
* Grants permission to get a re-ranked list of recommendations
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetPersonalizedRanking.html
*/
toGetPersonalizedRanking() {
return this.to('GetPersonalizedRanking');
}
/**
* Grants permission to get a list of recommendations from a campaign
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html
*/
toGetRecommendations() {
return this.to('GetRecommendations');
}
/**
* Grants permission to get metrics for a solution version
*
* Access Level: Read
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_GetSolutionMetrics.html
*/
toGetSolutionMetrics() {
return this.to('GetSolutionMetrics');
}
/**
* Grants permission to list batch inference jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListBatchInferenceJobs.html
*/
toListBatchInferenceJobs() {
return this.to('ListBatchInferenceJobs');
}
/**
* Grants permission to list batch segment jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListBatchSegmentJobs.html
*/
toListBatchSegmentJobs() {
return this.to('ListBatchSegmentJobs');
}
/**
* Grants permission to list campaigns
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListCampaigns.html
*/
toListCampaigns() {
return this.to('ListCampaigns');
}
/**
* Grants permission to list data deletion jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListDataDeletionJobs.html
*/
toListDataDeletionJobs() {
return this.to('ListDataDeletionJobs');
}
/**
* Grants permission to list data insights jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/analyzing-data.html
*/
toListDataInsightsJobs() {
return this.to('ListDataInsightsJobs');
}
/**
* Grants permission to list dataset export jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListDatasetExportJobs.html
*/
toListDatasetExportJobs() {
return this.to('ListDatasetExportJobs');
}
/**
* Grants permission to list dataset groups
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListDatasetGroups.html
*/
toListDatasetGroups() {
return this.to('ListDatasetGroups');
}
/**
* Grants permission to list dataset import jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListDatasetImportJobs.html
*/
toListDatasetImportJobs() {
return this.to('ListDatasetImportJobs');
}
/**
* Grants permission to list datasets
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListDatasets.html
*/
toListDatasets() {
return this.to('ListDatasets');
}
/**
* Grants permission to list event trackers
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListEventTrackers.html
*/
toListEventTrackers() {
return this.to('ListEventTrackers');
}
/**
* Grants permission to list filters
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListFilters.html
*/
toListFilters() {
return this.to('ListFilters');
}
/**
* Grants permission to list metric attribution metrics
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListMetricAttributionMetrics.html
*/
toListMetricAttributionMetrics() {
return this.to('ListMetricAttributionMetrics');
}
/**
* Grants permission to list metric attributions
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListMetricAttributions.html
*/
toListMetricAttributions() {
return this.to('ListMetricAttributions');
}
/**
* Grants permission to list recipes
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListRecipes.html
*/
toListRecipes() {
return this.to('ListRecipes');
}
/**
* Grants permission to list recommenders
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListRecommenders.html
*/
toListRecommenders() {
return this.to('ListRecommenders');
}
/**
* Grants permission to list schemas
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListSchemas.html
*/
toListSchemas() {
return this.to('ListSchemas');
}
/**
* Grants permission to list versions of a solution
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html
*/
toListSolutionVersions() {
return this.to('ListSolutionVersions');
}
/**
* Grants permission to list solutions
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutions.html
*/
toListSolutions() {
return this.to('ListSolutions');
}
/**
* Grants permission to list tags for a resource
*
* Access Level: List
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_ListTagsForResource.html
*/
toListTagsForResource() {
return this.to('ListTagsForResource');
}
/**
* Grants permission to put real time action interaction data
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_PutActionInteractions.html
*/
toPutActionInteractions() {
return this.to('PutActionInteractions');
}
/**
* Grants permission to ingest Actions data
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_PutActions.html
*/
toPutActions() {
return this.to('PutActions');
}
/**
* Grants permission to put real time event data
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_PutEvents.html
*/
toPutEvents() {
return this.to('PutEvents');
}
/**
* Grants permission to ingest Items data
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_PutItems.html
*/
toPutItems() {
return this.to('PutItems');
}
/**
* Grants permission to ingest Users data
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_PutUsers.html
*/
toPutUsers() {
return this.to('PutUsers');
}
/**
* Grants permission to start a recommender
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_StartRecommender.html
*/
toStartRecommender() {
return this.to('StartRecommender');
}
/**
* Grants permission to stop a recommender
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_StopRecommender.html
*/
toStopRecommender() {
return this.to('StopRecommender');
}
/**
* Grants permission to stop a solution version creation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_StopSolutionVersionCreation.html
*/
toStopSolutionVersionCreation() {
return this.to('StopSolutionVersionCreation');
}
/**
* Grants permission to tag a resource
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_TagResource.html
*/
toTagResource() {
return this.to('TagResource');
}
/**
* Grants permission to untag a resource
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UntagResource.html
*/
toUntagResource() {
return this.to('UntagResource');
}
/**
* Grants permission to update a campaign
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateCampaign.html
*/
toUpdateCampaign() {
return this.to('UpdateCampaign');
}
/**
* Grants permission to update a dataset
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateDataset.html
*/
toUpdateDataset() {
return this.to('UpdateDataset');
}
/**
* Grants permission to update a metric attribution
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateMetricAttribution.html
*/
toUpdateMetricAttribution() {
return this.to('UpdateMetricAttribution');
}
/**
* Grants permission to update a recommender
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateRecommender.html
*/
toUpdateRecommender() {
return this.to('UpdateRecommender');
}
/**
* Grants permission to update a solution
*
* Access Level: Write
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateSolution.html
*/
toUpdateSolution() {
return this.to('UpdateSolution');
}
/**
* Adds a resource of type schema to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/how-it-works-dataset-schema.html#schema-examples
*
* @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.
*/
onSchema(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:schema/${resourceId}`);
}
/**
* Adds a resource of type featureTransformation to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_FeatureTransformation.html
*
* @param resourceId - Identifier for the resourceId.
* @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.
*/
onFeatureTransformation(resourceId, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:::feature-transformation/${resourceId}`);
}
/**
* Adds a resource of type dataset to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Dataset.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()
*/
onDataset(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:dataset/${resourceId}`);
}
/**
* Adds a resource of type datasetGroup to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DatasetGroup.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()
*/
onDatasetGroup(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:dataset-group/${resourceId}`);
}
/**
* Adds a resource of type datasetImportJob to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DatasetImportJob.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()
*/
onDatasetImportJob(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:dataset-import-job/${resourceId}`);
}
/**
* Adds a resource of type dataInsightsJob to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/analyzing-data.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.
*/
onDataInsightsJob(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:data-insights-job/${resourceId}`);
}
/**
* Adds a resource of type datasetExportJob to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DatasetExportJob.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()
*/
onDatasetExportJob(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:dataset-export-job/${resourceId}`);
}
/**
* Adds a resource of type dataDeletionJob to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_DataDeletionJob.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()
*/
onDataDeletionJob(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:data-deletion-job/${resourceId}`);
}
/**
* Adds a resource of type solution to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Solution.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()
*/
onSolution(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:solution/${resourceId}`);
}
/**
* Adds a resource of type campaign to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Campaign.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()
*/
onCampaign(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:campaign/${resourceId}`);
}
/**
* Adds a resource of type eventTracker to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_EventTracker.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()
*/
onEventTracker(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:event-tracker/${resourceId}`);
}
/**
* Adds a resource of type recipe to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Recipe.html
*
* @param resourceId - Identifier for the resourceId.
* @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.
*/
onRecipe(resourceId, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:::recipe/${resourceId}`);
}
/**
* Adds a resource of type algorithm to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Algorithm.html
*
* @param resourceId - Identifier for the resourceId.
* @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.
*/
onAlgorithm(resourceId, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:::algorithm/${resourceId}`);
}
/**
* Adds a resource of type batchInferenceJob to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_BatchInferenceJob.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()
*/
onBatchInferenceJob(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:batch-inference-job/${resourceId}`);
}
/**
* Adds a resource of type filter to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Filter.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()
*/
onFilter(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:filter/${resourceId}`);
}
/**
* Adds a resource of type recommender to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_Recommender.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()
*/
onRecommender(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:recommender/${resourceId}`);
}
/**
* Adds a resource of type batchSegmentJob to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_BatchSegmentJob.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()
*/
onBatchSegmentJob(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:batch-segment-job/${resourceId}`);
}
/**
* Adds a resource of type metricAttribution to the statement
*
* https://docs.aws.amazon.com/personalize/latest/dg/API_MetricAttribution.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.
*/
onMetricAttribution(resourceId, account, region, partition) {
return this.on(`arn:${partition ?? this.defaultPartition}:personalize:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:metric-attribution/${resourceId}`);
}
/**
* 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:
* - .toCreateBatchInferenceJob()
* - .toCreateBatchSegmentJob()
* - .toCreateCampaign()
* - .toCreateDataDeletionJob()
* - .toCreateDataset()
* - .toCreateDatasetExportJob()
* - .toCreateDatasetGroup()
* - .toCreateDatasetImportJob()
* - .toCreateEventTracker()
* - .toCreateFilter()
* - .toCreateRecommender()
* - .toCreateSolution()
* - .toCreateSolutionVersion()
* - .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, value, operator) {
return this.if(`aws:RequestTag/${tagKey}`, value, operator ?? 'StringLike');
}
/**
* 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:
* - dataset
* - datasetGroup
* - datasetImportJob
* - datasetExportJob
* - dataDeletionJob
* - solution
* - campaign
* - eventTracker
* - batchInferenceJob
* - filter
* - recommender
* - batchSegmentJob
*
* @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, value, operator) {
return this.if(`aws:ResourceTag/${tagKey}`, value, operator ?? 'StringLike');
}
/**
* 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:
* - .toCreateBatchInferenceJob()
* - .toCreateBatchSegmentJob()
* - .toCreateCampaign()
* - .toCreateDataDeletionJob()
* - .toCreateDataset()
* - .toCreateDatasetExportJob()
* - .toCreateDatasetGroup()
* - .toCreateDatasetImportJob()
* - .toCreateEventTracker()
* - .toCreateFilter()
* - .toCreateRecommender()
* - .toCreateSolution()
* - .toCreateSolutionVersion()
* - .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, operator) {
return this.if(`aws:TagKeys`, value, operator ?? 'StringLike');
}
/**
* Statement provider for service [personalize](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpersonalize.html).
*
*/
constructor(props) {
super(props);
this.servicePrefix = 'personalize';
this.accessLevelList = {
Write: [
'CreateBatchInferenceJob',
'CreateBatchSegmentJob',
'CreateCampaign',
'CreateDataDeletionJob',
'CreateDataInsightsJob',
'CreateDataset',
'CreateDatasetExportJob',
'CreateDatasetGroup',
'CreateDatasetImportJob',
'CreateEventTracker',
'CreateFilter',
'CreateMetricAttribution',
'CreateRecommender',
'CreateSchema',
'CreateSolution',
'CreateSolutionVersion',
'DeleteCampaign',
'DeleteDataset',
'DeleteDatasetGroup',
'DeleteEventTracker',
'DeleteFilter',
'DeleteMetricAttribution',
'DeleteRecommender',
'DeleteSchema',
'DeleteSolution',
'PutActionInteractions',
'PutActions',
'PutEvents',
'PutItems',
'PutUsers',
'StartRecommender',
'StopRecommender',
'StopSolutionVersionCreation',
'UpdateCampaign',
'UpdateDataset',
'UpdateMetricAttribution',
'UpdateRecommender',
'UpdateSolution'
],
Read: [
'DescribeAlgorithm',
'DescribeBatchInferenceJob',
'DescribeBatchSegmentJob',
'DescribeCampaign',
'DescribeDataDeletionJob',
'DescribeDataInsightsJob',
'DescribeDataset',
'DescribeDatasetExportJob',
'DescribeDatasetGroup',
'DescribeDatasetImportJob',
'DescribeEventTracker',
'DescribeFeatureTransformation',
'DescribeFilter',
'DescribeMetricAttribution',
'DescribeRecipe',
'DescribeRecommender',
'DescribeSchema',
'DescribeSolution',
'DescribeSolutionVersion',
'GetActionRecommendations',
'GetDataInsights',
'GetPersonalizedRanking',
'GetRecommendations',
'GetSolutionMetrics'
],
List: [
'ListBatchInferenceJobs',
'ListBatchSegmentJobs',
'ListCampaigns',
'ListDataDeletionJobs',
'ListDataInsightsJobs',
'ListDatasetExportJobs',
'ListDatasetGroups',
'ListDatasetImportJobs',
'ListDatasets',
'ListEventTrackers',
'ListFilters',
'ListMetricAttributionMetrics',
'ListMetricAttributions',
'ListRecipes',
'ListRecommenders',
'ListSchemas',
'ListSolutionVersions',
'ListSolutions',
'ListTagsForResource'
],
Tagging: [
'TagResource',
'UntagResource'
]
};
}
}
exports.Personalize = Personalize;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyc29uYWxpemUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwZXJzb25hbGl6ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSx5Q0FBeUQ7QUFHekQ7Ozs7R0FJRztBQUNILE1BQWEsV0FBWSxTQUFRLHdCQUFlO0lBRzlDOzs7Ozs7Ozs7Ozs7O09BYUc7SUFDSSx5QkFBeUI7UUFDOUIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLHlCQUF5QixDQUFDLENBQUM7SUFDNUMsQ0FBQztJQUVEOzs7Ozs7Ozs7Ozs7O09BYUc7SUFDSSx1QkFBdUI7UUFDNUIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLHVCQUF1QixDQUFDLENBQUM7SUFDMUMsQ0FBQztJQUVEOzs7Ozs7Ozs7O09BVUc7SUFDSSxnQkFBZ0I7UUFDckIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLGdCQUFnQixDQUFDLENBQUM7SUFDbkMsQ0FBQztJQUVEOzs7Ozs7Ozs7Ozs7O09BYUc7SUFDSSx1QkFBdUI7UUFDNUIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLHVCQUF1QixDQUFDLENBQUM7SUFDMUMsQ0FBQztJQUVEOzs7Ozs7T0FNRztJQUNJLHVCQUF1QjtRQUM1QixPQUFPLElBQUksQ0FBQyxFQUFFLENBQUMsdUJBQXVCLENBQUMsQ0FBQztJQUMxQyxDQUFDO0lBRUQ7Ozs7Ozs7Ozs7T0FVRztJQUNJLGVBQWU7UUFDcEIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLGVBQWUsQ0FBQyxDQUFDO0lBQ2xDLENBQUM7SUFFRDs7Ozs7Ozs7Ozs7OztPQWFHO0lBQ0ksd0JBQXdCO1FBQzdCLE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQyx3QkFBd0IsQ0FBQyxDQUFDO0lBQzNDLENBQUM7SUFFRDs7Ozs7Ozs7OztPQVVHO0lBQ0ksb0JBQW9CO1FBQ3pCLE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO0lBQ3ZDLENBQUM7SUFFRDs7Ozs7Ozs7Ozs7OztPQWFHO0lBQ0ksd0JBQXdCO1FBQzdCLE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQyx3QkFBd0IsQ0FBQyxDQUFDO0lBQzNDLENBQUM7SUFFRDs7Ozs7Ozs7OztPQVVHO0lBQ0ksb0JBQW9CO1FBQ3pCLE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO0lBQ3ZDLENBQUM7SUFFRDs7Ozs7Ozs7OztPQVVHO0lBQ0ksY0FBYztRQUNuQixPQUFPLElBQUksQ0FBQyxFQUFFLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDakMsQ0FBQztJQUVEOzs7Ozs7Ozs7T0FTRztJQUNJLHlCQUF5QjtRQUM5QixPQUFPLElBQUksQ0FBQyxFQUFFLENBQUMseUJBQXlCLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQ7Ozs7Ozs7Ozs7T0FVRztJQUNJLG1CQUFtQjtRQUN4QixPQUFPLElBQUksQ0FBQyxFQUFFLENBQUMsbUJBQW1CLENBQUMsQ0FBQztJQUN0QyxDQUFDO0lBRUQ7Ozs7OztPQU1HO0lBQ0ksY0FBYztRQUNuQixPQUFPLElBQUksQ0FBQyxFQUFFLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDakMsQ0FBQztJQUVEOzs7Ozs7Ozs7O09BVUc7SUFDSSxnQkFBZ0I7UUFDckIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLGdCQUFnQixDQUFDLENBQUM7SUFDbkMsQ0FBQztJQUVEOzs7Ozs7Ozs7O09BVUc7SUFDSSx1QkFBdUI7UUFDNUIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLHVCQUF1QixDQ