UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

371 lines (370 loc) 13.5 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 [lookoutmetrics](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutformetrics.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Lookoutmetrics extends PolicyStatement { servicePrefix: string; /** * Grants permission to activate an anomaly detector * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ActivateAnomalyDetector.html */ toActivateAnomalyDetector(): this; /** * Grants permission to run a backtest with an anomaly detector * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_BackTestAnomalyDetector.html */ toBackTestAnomalyDetector(): this; /** * Grants permission to create an alert for an anomaly detector * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_CreateAlert.html */ toCreateAlert(): this; /** * Grants permission to create an anomaly detector * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_CreateAnomalyDetector.html */ toCreateAnomalyDetector(): this; /** * Grants permission to create a dataset * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_CreateMetricSet.html */ toCreateMetricSet(): this; /** * Grants permission to deactivate an anomaly detector * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DeactivateAnomalyDetector.html */ toDeactivateAnomalyDetector(): this; /** * Grants permission to delete an alert * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DeleteAlert.html */ toDeleteAlert(): this; /** * Grants permission to delete an anomaly detector * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DeleteAnomalyDetector.html */ toDeleteAnomalyDetector(): this; /** * Grants permission to get details about an alert * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DescribeAlert.html */ toDescribeAlert(): this; /** * Grants permission to get information about an anomaly detection job * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DescribeAnomalyDetectionExecutions.html */ toDescribeAnomalyDetectionExecutions(): this; /** * Grants permission to get details about an anomaly detector * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DescribeAnomalyDetector.html */ toDescribeAnomalyDetector(): this; /** * Grants permission to get details about a dataset * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DescribeMetricSet.html */ toDescribeMetricSet(): this; /** * Grants permission to detect metric set config from data source * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_DetectMetricSetConfig.html */ toDetectMetricSetConfig(): this; /** * Grants permission to get details about a group of affected metrics * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_GetAnomalyGroup.html */ toGetAnomalyGroup(): this; /** * Grants permission to get data quality metrics for an anomaly detector * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_GetDataQualityMetrics.html */ toGetDataQualityMetrics(): this; /** * Grants permission to get feedback on affected metrics for an anomaly group * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_GetFeedback.html */ toGetFeedback(): this; /** * Grants permission to get a selection of sample records from an Amazon S3 datasource * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_GetSampleData.html */ toGetSampleData(): this; /** * Grants permission to get a list of alerts for a detector * * Access Level: List * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListAlerts.html */ toListAlerts(): this; /** * Grants permission to get a list of anomaly detectors * * Access Level: List * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListAnomalyDetectors.html */ toListAnomalyDetectors(): this; /** * Grants permission to get a list of related measures in an anomaly group * * Access Level: List * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListAnomalyGroupRelatedMetrics.html */ toListAnomalyGroupRelatedMetrics(): this; /** * Grants permission to get a list of anomaly groups * * Access Level: List * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListAnomalyGroupSummaries.html */ toListAnomalyGroupSummaries(): this; /** * Grants permission to get a list of affected metrics for a measure in an anomaly group * * Access Level: List * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListAnomalyGroupTimeSeries.html */ toListAnomalyGroupTimeSeries(): this; /** * Grants permission to get a list of datasets * * Access Level: List * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListMetricSets.html */ toListMetricSets(): this; /** * Grants permission to get a list of tags for a detector, dataset, or alert * * Access Level: Read * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to add feedback for an affected metric in an anomaly group * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_PutFeedback.html */ toPutFeedback(): this; /** * Grants permission to add tags to a detector, dataset, or alert * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_TagResource.html */ toTagResource(): this; /** * Grants permission to remove tags from a detector, dataset, or alert * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update an alert for an anomaly detector * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_UpdateAlert.html */ toUpdateAlert(): this; /** * Grants permission to update an anomaly detector * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_UpdateAnomalyDetector.html */ toUpdateAnomalyDetector(): this; /** * Grants permission to update a dataset * * Access Level: Write * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_UpdateMetricSet.html */ toUpdateMetricSet(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type AnomalyDetector to the statement * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_AnomalyDetectorSummary.html * * @param anomalyDetectorName - Identifier for the anomalyDetectorName. * @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() */ onAnomalyDetector(anomalyDetectorName: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type MetricSet to the statement * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_MetricSetSummary.html * * @param anomalyDetectorName - Identifier for the anomalyDetectorName. * @param metricSetName - Identifier for the metricSetName. * @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() */ onMetricSet(anomalyDetectorName: string, metricSetName: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type Alert to the statement * * https://docs.aws.amazon.com/lookoutmetrics/latest/api/API_AlertSummary.html * * @param alertName - Identifier for the alertName. * @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() */ onAlert(alertName: 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: * - .toCreateAlert() * - .toCreateAnomalyDetector() * - .toCreateMetricSet() * - .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 actions: * - .toTagResource() * * Applies to resource types: * - AnomalyDetector * - MetricSet * - Alert * * @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: * - .toCreateAlert() * - .toCreateAnomalyDetector() * - .toCreateMetricSet() * - .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 [lookoutmetrics](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutformetrics.html). * */ constructor(props?: iam.PolicyStatementProps); }