UNPKG

iam-floyd

Version:

AWS IAM policy statement generator with fluent interface

252 lines (251 loc) 9.18 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; /** * Statement provider for service [rum](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudwatchrum.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Rum extends PolicyStatement { servicePrefix: string; /** * Statement provider for service [rum](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudwatchrum.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ constructor(sid?: string); /** * Grants permission to create rum metric definitions * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricDefinitions.html */ toBatchCreateRumMetricDefinitions(): this; /** * Grants permission to remove rum metric definitions * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchDeleteRumMetricDefinitions.html */ toBatchDeleteRumMetricDefinitions(): this; /** * Grants permission to get rum metric definitions * * Access Level: Read * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchGetRumMetricDefinitions.html */ toBatchGetRumMetricDefinitions(): this; /** * Grants permission to create appMonitor metadata * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * Dependent actions: * - iam:CreateServiceLinkedRole * - iam:GetRole * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html */ toCreateAppMonitor(): this; /** * Grants permission to delete appMonitor metadata * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_DeleteAppMonitor.html */ toDeleteAppMonitor(): this; /** * Grants permission to delete a resource policy attached to an app monitor * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_DeleteResourcePolicy.html */ toDeleteResourcePolicy(): this; /** * Grants permission to delete rum metrics destinations * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_DeleteRumMetricsDestination.html */ toDeleteRumMetricsDestination(): this; /** * Grants permission to get appMonitor metadata * * Access Level: Read * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_GetAppMonitor.html */ toGetAppMonitor(): this; /** * Grants permission to get appMonitor data * * Access Level: Read * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_GetAppMonitorData.html */ toGetAppMonitorData(): this; /** * Grants permission to retrieve a resource policy attached to an app monitor * * Access Level: Read * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_GetResourcePolicy.html */ toGetResourcePolicy(): this; /** * Grants permission to list appMonitors metadata * * Access Level: List * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_ListAppMonitors.html */ toListAppMonitors(): this; /** * Grants permission to list rum metrics destinations * * Access Level: Read * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_ListRumMetricsDestinations.html */ toListRumMetricsDestinations(): this; /** * Grants permission to list tags for resources * * Access Level: Read * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to attach a resource policy to an app monitor * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutResourcePolicy.html */ toPutResourcePolicy(): this; /** * Grants permission to put RUM events for appmonitor * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumEvents.html */ toPutRumEvents(): this; /** * Grants permission to put rum metrics destinations * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html */ toPutRumMetricsDestination(): this; /** * Grants permission to tag resources * * Access Level: Tagging * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to untag resources * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update appmonitor metadata * * Access Level: Write * * Dependent actions: * - iam:CreateServiceLinkedRole * - iam:GetRole * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateAppMonitor.html */ toUpdateAppMonitor(): this; /** * Grants permission to update rum metric definition * * Access Level: Write * * https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateRumMetricDefinition.html */ toUpdateRumMetricDefinition(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type AppMonitorResource to the statement * * https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/API_AppMonitor.html * * @param name - Identifier for the name. * @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() */ onAppMonitorResource(name: string, account?: string, region?: string, partition?: string): this; /** * Filters access by the tags that are passed the request on behalf of the IAM principal * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toCreateAppMonitor() * - .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 that make the request on behalf of the IAM principal * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html * * Applies to resource types: * - AppMonitorResource * * @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 on behalf of the IAM principal * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toCreateAppMonitor() * - .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; }