UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

181 lines (180 loc) 6.83 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 [savingsplans](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssavingsplans.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Savingsplans extends PolicyStatement { servicePrefix: string; /** * Grants permission to create a savings plan * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_CreateSavingsPlan.html */ toCreateSavingsPlan(): this; /** * Grants permission to delete the queued savings plan associated with customers account * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DeleteQueuedSavingsPlan.html */ toDeleteQueuedSavingsPlan(): this; /** * Grants permission to describe the rates associated with customers savings plan * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlanRates.html */ toDescribeSavingsPlanRates(): this; /** * Grants permission to describe the savings plans associated with customers account * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlans.html */ toDescribeSavingsPlans(): this; /** * Grants permission to describe the rates assciated with savings plans offerings * * Access Level: Read * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlansOfferingRates.html */ toDescribeSavingsPlansOfferingRates(): this; /** * Grants permission to describe the savings plans offerings that customer is eligible to purchase * * Access Level: Read * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_DescribeSavingsPlansOfferings.html */ toDescribeSavingsPlansOfferings(): this; /** * Grants permission to list tags for a savings plan * * Access Level: List * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to return a savings plan * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_ReturnSavingsPlan.html */ toReturnSavingsPlan(): this; /** * Grants permission to tag a savings plan * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to untag a savings plan * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/savingsplans/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type savingsplan to the statement * * https://docs.aws.amazon.com/savingsplans/latest/userguide/what-is-savings-plans.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 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() */ onSavingsplan(resourceId: string, account?: string, partition?: string): this; /** * Filters access by the allowed set of values for each of the tags * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toCreateSavingsPlan() * - .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 tag-value associated with the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to actions: * - .toDeleteQueuedSavingsPlan() * - .toDescribeSavingsPlanRates() * - .toDescribeSavingsPlans() * - .toReturnSavingsPlan() * * Applies to resource types: * - savingsplan * * @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 presence of mandatory tags in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toCreateSavingsPlan() * - .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 [savingsplans](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssavingsplans.html). * */ constructor(props?: iam.PolicyStatementProps); }