UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

275 lines (274 loc) 10.1 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 [aco-automation](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscomputeoptimizerautomation.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class AcoAutomation extends PolicyStatement { servicePrefix: string; /** * Grants permission to associate member accounts with the management account * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_AssociateAccounts.html */ toAssociateAccounts(): this; /** * Grants permission to create automation rule * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_CreateAutomationRule.html */ toCreateAutomationRule(): this; /** * Grants permission to delete automation rule * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_DeleteAutomationRule.html */ toDeleteAutomationRule(): this; /** * Grants permission to disassociate member accounts from the management account * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_DisassociateAccounts.html */ toDisassociateAccounts(): this; /** * Grants permission to get automation event details * * Access Level: Read * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_GetAutomationEvent.html */ toGetAutomationEvent(): this; /** * Grants permission to get automation rule * * Access Level: Read * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_GetAutomationRule.html */ toGetAutomationRule(): this; /** * Grants permission to get enrollment configuration * * Access Level: Read * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_GetEnrollmentConfiguration.html */ toGetEnrollmentConfiguration(): this; /** * Grants permission to list the accounts in your organization that are enrolled in Compute Optimizer and whether they have enabled the Automation feature * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAccounts.html */ toListAccounts(): this; /** * Grants permission to list automation event steps * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAutomationEventSteps.html */ toListAutomationEventSteps(): this; /** * Grants permission to list automation event summaries * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAutomationEventSummaries.html */ toListAutomationEventSummaries(): this; /** * Grants permission to list automation events * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAutomationEvents.html */ toListAutomationEvents(): this; /** * Grants permission to list automation rule preview results * * Access Level: List * * Dependent actions: * - ec2:DescribeVolumes * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAutomationRulePreview.html */ toListAutomationRulePreview(): this; /** * Grants permission to list automation rule preview summaries * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAutomationRulePreviewSummaries.html */ toListAutomationRulePreviewSummaries(): this; /** * Grants permission to list automation rules * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListAutomationRules.html */ toListAutomationRules(): this; /** * Grants permission to list recommended action summaries * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListRecommendedActionSummaries.html */ toListRecommendedActionSummaries(): this; /** * Grants permission to list recommended actions * * Access Level: List * * Dependent actions: * - ec2:DescribeVolumes * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListRecommendedActions.html */ toListRecommendedActions(): this; /** * Grants permission to list tags for automation rule * * Access Level: List * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to initiate a rollback for an automation event * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_RollbackAutomationEvent.html */ toRollbackAutomationEvent(): this; /** * Grants permission to initiate an on-demand automation for a recommended action * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_StartAutomationEvent.html */ toStartAutomationEvent(): this; /** * Grants permission to add tags to automation rule * * Access Level: Tagging * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_TagResource.html */ toTagResource(): this; /** * Grants permission to remove tags from automation rule * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update automation rule * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_UpdateAutomationRule.html */ toUpdateAutomationRule(): this; /** * Grants permission to update enrollment configuration for the Compute Optimizer automation feature * * Access Level: Write * * https://docs.aws.amazon.com/compute-optimizer/latest/APIReference/API_automation_UpdateEnrollmentConfiguration.html */ toUpdateEnrollmentConfiguration(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type AutomationRule to the statement * * https://docs.aws.amazon.com/compute-optimizer/latest/ug/automation-rules.html * * @param ruleId - Identifier for the ruleId. * @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() */ onAutomationRule(ruleId: string, account?: string, partition?: string): this; /** * Filters access by the tags that are passed in the request * * Applies to actions: * - .toCreateAutomationRule() * - .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 * * Applies to actions: * - .toDeleteAutomationRule() * - .toGetAutomationRule() * - .toListTagsForResource() * - .toTagResource() * - .toUntagResource() * - .toUpdateAutomationRule() * * Applies to resource types: * - AutomationRule * * @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 * * Applies to actions: * - .toCreateAutomationRule() * - .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 [aco-automation](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscomputeoptimizerautomation.html). * */ constructor(props?: iam.PolicyStatementProps); }