UNPKG

iam-floyd

Version:

AWS IAM policy statement generator with fluent interface

277 lines (276 loc) 10.4 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; /** * Statement provider for service [codestar-notifications](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestarnotifications.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class CodestarNotifications extends PolicyStatement { servicePrefix: string; /** * Statement provider for service [codestar-notifications](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestarnotifications.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 a notification rule for a resource * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsResourceTag() * - .ifAwsTagKeys() * - .ifNotificationsForResource() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_CreateNotificationRule.html */ toCreateNotificationRule(): this; /** * Grants permission to delete a notification rule for a resource * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifNotificationsForResource() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_DeleteNotificationRule.html */ toDeleteNotificationRule(): this; /** * Grants permission to delete a target for a notification rule * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_DeleteTarget.html */ toDeleteTarget(): this; /** * Grants permission to get information about a notification rule * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifNotificationsForResource() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_DescribeNotificationRule.html */ toDescribeNotificationRule(): this; /** * Grants permission to list notifications event types * * Access Level: List * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_ListEventTypes.html */ toListEventTypes(): this; /** * Grants permission to list notification rules in an AWS account * * Access Level: List * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_ListNotificationRules.html */ toListNotificationRules(): this; /** * Grants permission to list the tags attached to a notification rule resource ARN * * Access Level: List * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to list the notification rule targets for an AWS account * * Access Level: List * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_ListTargets.html */ toListTargets(): this; /** * Grants permission to create an association between a notification rule and an Amazon SNS topic * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifNotificationsForResource() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_Subscribe.html */ toSubscribe(): this; /** * Grants permission to attach resource tags to a notification rule resource ARN * * Access Level: Tagging * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to remove an association between a notification rule and an Amazon SNS topic * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifNotificationsForResource() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_Unsubscribe.html */ toUnsubscribe(): this; /** * Grants permission to disassociate resource tags from a notification rule resource ARN * * Access Level: Tagging * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to change a notification rule for a resource * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * - .ifNotificationsForResource() * * https://docs.aws.amazon.com/codestar-notifications/latest/APIReference/API_UpdateNotificationRule.html */ toUpdateNotificationRule(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type notificationrule to the statement * * https://docs.aws.amazon.com/codestar-notifications/latest/userguide/security_iam_service-with-iam.html * * @param notificationRuleId - Identifier for the notificationRuleId. * @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() */ onNotificationrule(notificationRuleId: string, account?: string, region?: string, partition?: string): this; /** * Filters actions based on 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: * - .toCreateNotificationRule() * - .toDeleteNotificationRule() * - .toDeleteTarget() * - .toDescribeNotificationRule() * - .toListTagsForResource() * - .toListTargets() * - .toSubscribe() * - .toTagResource() * - .toUnsubscribe() * - .toUpdateNotificationRule() * * @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 actions based on 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: * - .toCreateNotificationRule() * - .toDeleteNotificationRule() * - .toDescribeNotificationRule() * - .toSubscribe() * - .toTagResource() * - .toUnsubscribe() * - .toUntagResource() * - .toUpdateNotificationRule() * * Applies to resource types: * - notificationrule * * @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 actions based on 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: * - .toCreateNotificationRule() * - .toDeleteNotificationRule() * - .toDeleteTarget() * - .toDescribeNotificationRule() * - .toListTagsForResource() * - .toListTargets() * - .toSubscribe() * - .toTagResource() * - .toUnsubscribe() * - .toUntagResource() * - .toUpdateNotificationRule() * * @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 based on the ARN of the resource for which notifications are configured * * https://docs.aws.amazon.com/codestar-notifications/latest/userguide/security_iam_id-based-policy-examples.html * * Applies to actions: * - .toCreateNotificationRule() * - .toDeleteNotificationRule() * - .toDescribeNotificationRule() * - .toSubscribe() * - .toUnsubscribe() * - .toUpdateNotificationRule() * * @param value The value(s) to check * @param operator Works with [arn operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_ARN). **Default:** `ArnLike` */ ifNotificationsForResource(value: string | string[], operator?: Operator | string): this; }