UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

274 lines (273 loc) 10.9 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 [notifications](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsusernotifications.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Notifications extends PolicyStatement { servicePrefix: string; /** * Grants permission to associate a new Channel with a particular NotificationConfiguration * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toAssociateChannel(): this; /** * Grants permission to create a new EventRule, associating it with a NotificationConfiguration * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toCreateEventRule(): this; /** * Grants permission to create a NotificationConfiguration * * Access Level: Write * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toCreateNotificationConfiguration(): this; /** * Grants permission to delete an EventRule * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toDeleteEventRule(): this; /** * Grants permission to delete a NotificationConfiguration * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toDeleteNotificationConfiguration(): this; /** * Grants permission to deregister a NotificationHub * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toDeregisterNotificationHub(): this; /** * Grants permission to remove a Channel from a NotificationConfiguration * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toDisassociateChannel(): this; /** * Grants permission to get an EventRule * * Access Level: Read * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toGetEventRule(): this; /** * Grants permission to get a NotificationConfiguration * * Access Level: Read * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toGetNotificationConfiguration(): this; /** * Grants permission to get a NotificationEvent * * Access Level: Read * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toGetNotificationEvent(): this; /** * Grants permission to list Channels by NotificationConfiguration * * Access Level: List * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toListChannels(): this; /** * Grants permission to list EventRules * * Access Level: List * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toListEventRules(): this; /** * Grants permission to list NotificationConfigurations * * Access Level: List * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toListNotificationConfigurations(): this; /** * Grants permission to list NotificationEvents * * Access Level: List * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toListNotificationEvents(): this; /** * Grants permission to list NotificationHubs * * Access Level: List * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toListNotificationHubs(): this; /** * Grants permission to get tags for a resource * * Access Level: Read * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toListTagsForResource(): this; /** * Grants permission to register a NotificationHub * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toRegisterNotificationHub(): this; /** * Grants permission to tag a resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toTagResource(): this; /** * Grants permission to remove tags from a resource * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toUntagResource(): this; /** * Grants permission to update an EventRule * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toUpdateEventRule(): this; /** * Grants permission to update a NotificationConfiguration * * Access Level: Write * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html */ toUpdateNotificationConfiguration(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type EventRule to the statement * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html * * @param notificationConfigurationId - Identifier for the notificationConfigurationId. * @param eventRuleId - Identifier for the eventRuleId. * @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account. * @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. */ onEventRule(notificationConfigurationId: string, eventRuleId: string, account?: string, partition?: string): this; /** * Adds a resource of type NotificationConfiguration to the statement * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html * * @param notificationConfigurationId - Identifier for the notificationConfigurationId. * @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account. * @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() */ onNotificationConfiguration(notificationConfigurationId: string, account?: string, partition?: string): this; /** * Adds a resource of type NotificationEvent to the statement * * https://docs.aws.amazon.com/notifications/latest/userguide/resource-level-permissions.html * * @param notificationConfigurationId - Identifier for the notificationConfigurationId. * @param notificationEventId - Identifier for the notificationEventId. * @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. */ onNotificationEvent(notificationConfigurationId: string, notificationEventId: 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: * - .toCreateNotificationConfiguration() * - .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 resource types: * - NotificationConfiguration * * @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: * - .toCreateNotificationConfiguration() * - .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 [notifications](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsusernotifications.html). * */ constructor(props?: iam.PolicyStatementProps); }