UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

1,306 lines 131 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Autoscaling = void 0; const shared_1 = require("../../shared"); /** * Statement provider for service [autoscaling](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2autoscaling.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ class Autoscaling extends shared_1.PolicyStatement { /** * Grants permission to attach one or more EC2 instances to the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_AttachInstances.html */ toAttachInstances() { return this.to('AttachInstances'); } /** * Grants permission to attach one or more target groups to the specified Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifTargetGroupARNs() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_AttachLoadBalancerTargetGroups.html */ toAttachLoadBalancerTargetGroups() { return this.to('AttachLoadBalancerTargetGroups'); } /** * Grants permission to attach one or more load balancers to the specified Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifLoadBalancerNames() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_AttachLoadBalancers.html */ toAttachLoadBalancers() { return this.to('AttachLoadBalancers'); } /** * Grants permission to attach one or more traffic sources to an Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifTrafficSourceIdentifiers() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_AttachTrafficSources.html */ toAttachTrafficSources() { return this.to('AttachTrafficSources'); } /** * Grants permission to delete the specified scheduled actions * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_BatchDeleteScheduledAction.html */ toBatchDeleteScheduledAction() { return this.to('BatchDeleteScheduledAction'); } /** * Grants permission to create or update multiple scheduled scaling actions for an Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_BatchPutScheduledUpdateGroupAction.html */ toBatchPutScheduledUpdateGroupAction() { return this.to('BatchPutScheduledUpdateGroupAction'); } /** * Grants permission to cancel an instance refresh operation in progress * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_CancelInstanceRefresh.html */ toCancelInstanceRefresh() { return this.to('CancelInstanceRefresh'); } /** * Grants permission to complete the lifecycle action for the specified token or instance with the specified result * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_CompleteLifecycleAction.html */ toCompleteLifecycleAction() { return this.to('CompleteLifecycleAction'); } /** * Grants permission to create an Auto Scaling group with the specified name and attributes * * Access Level: Write * * Possible conditions: * - .ifImageId() * - .ifCapacityReservationIds() * - .ifCapacityReservationResourceGroupArns() * - .ifInstanceTypes() * - .ifLaunchConfigurationName() * - .ifLaunchTemplateVersionSpecified() * - .ifLoadBalancerNames() * - .ifMaxSize() * - .ifMinSize() * - .ifTargetGroupARNs() * - .ifTrafficSourceIdentifiers() * - .ifVPCZoneIdentifiers() * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * Dependent actions: * - iam:CreateServiceLinkedRole * - iam:PassRole * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_CreateAutoScalingGroup.html */ toCreateAutoScalingGroup() { return this.to('CreateAutoScalingGroup'); } /** * Grants permission to create a launch configuration * * Access Level: Write * * Possible conditions: * - .ifImageId() * - .ifInstanceType() * - .ifSpotPrice() * - .ifMetadataHttpTokens() * - .ifMetadataHttpPutResponseHopLimit() * - .ifMetadataHttpEndpoint() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_CreateLaunchConfiguration.html */ toCreateLaunchConfiguration() { return this.to('CreateLaunchConfiguration'); } /** * Grants permission to create or update tags for the specified Auto Scaling group * * Access Level: Tagging * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_CreateOrUpdateTags.html */ toCreateOrUpdateTags() { return this.to('CreateOrUpdateTags'); } /** * Grants permission to delete the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteAutoScalingGroup.html */ toDeleteAutoScalingGroup() { return this.to('DeleteAutoScalingGroup'); } /** * Grants permission to delete the specified launch configuration * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteLaunchConfiguration.html */ toDeleteLaunchConfiguration() { return this.to('DeleteLaunchConfiguration'); } /** * Grants permission to deletes the specified lifecycle hook * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteLifecycleHook.html */ toDeleteLifecycleHook() { return this.to('DeleteLifecycleHook'); } /** * Grants permission to delete the specified notification * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteNotificationConfiguration.html */ toDeleteNotificationConfiguration() { return this.to('DeleteNotificationConfiguration'); } /** * Grants permission to delete the specified Auto Scaling policy * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeletePolicy.html */ toDeletePolicy() { return this.to('DeletePolicy'); } /** * Grants permission to delete the specified scheduled action * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteScheduledAction.html */ toDeleteScheduledAction() { return this.to('DeleteScheduledAction'); } /** * Grants permission to delete the specified tags * * Access Level: Tagging * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteTags.html */ toDeleteTags() { return this.to('DeleteTags'); } /** * Grants permission to delete the warm pool associated with the Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DeleteWarmPool.html */ toDeleteWarmPool() { return this.to('DeleteWarmPool'); } /** * Grants permission to describe the current Auto Scaling resource limits for your AWS account * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeAccountLimits.html */ toDescribeAccountLimits() { return this.to('DescribeAccountLimits'); } /** * Grants permission to describe the current Amazon EC2 Auto Scaling account settings for your account * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeAccountSettings.html */ toDescribeAccountSettings() { return this.to('DescribeAccountSettings'); } /** * Grants permission to describe the policy adjustment types for use with PutScalingPolicy * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeAdjustmentTypes.html */ toDescribeAdjustmentTypes() { return this.to('DescribeAdjustmentTypes'); } /** * Grants permission to describe one or more Auto Scaling groups. If a list of names is not provided, the call describes all Auto Scaling groups * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeAutoScalingGroups.html */ toDescribeAutoScalingGroups() { return this.to('DescribeAutoScalingGroups'); } /** * Grants permission to describe one or more Auto Scaling instances. If a list is not provided, the call describes all instances * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeAutoScalingInstances.html */ toDescribeAutoScalingInstances() { return this.to('DescribeAutoScalingInstances'); } /** * Grants permission to describe the notification types that are supported by Auto Scaling * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeAutoScalingNotificationTypes.html */ toDescribeAutoScalingNotificationTypes() { return this.to('DescribeAutoScalingNotificationTypes'); } /** * Grants permission to describe one or more instance refreshes for an Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeInstanceRefreshes.html */ toDescribeInstanceRefreshes() { return this.to('DescribeInstanceRefreshes'); } /** * Grants permission to describe one or more launch configurations. If you omit the list of names, then the call describes all launch configurations * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeLaunchConfigurations.html */ toDescribeLaunchConfigurations() { return this.to('DescribeLaunchConfigurations'); } /** * Grants permission to describe the available types of lifecycle hooks * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeLifecycleHookTypes.html */ toDescribeLifecycleHookTypes() { return this.to('DescribeLifecycleHookTypes'); } /** * Grants permission to describe the lifecycle hooks for the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeLifecycleHooks.html */ toDescribeLifecycleHooks() { return this.to('DescribeLifecycleHooks'); } /** * Grants permission to describe the target groups for the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeLoadBalancerTargetGroups.html */ toDescribeLoadBalancerTargetGroups() { return this.to('DescribeLoadBalancerTargetGroups'); } /** * Grants permission to describe the load balancers for the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeLoadBalancers.html */ toDescribeLoadBalancers() { return this.to('DescribeLoadBalancers'); } /** * Grants permission to describe the available CloudWatch metrics for Auto Scaling * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeMetricCollectionTypes.html */ toDescribeMetricCollectionTypes() { return this.to('DescribeMetricCollectionTypes'); } /** * Grants permission to describe the notification actions associated with the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeNotificationConfigurations.html */ toDescribeNotificationConfigurations() { return this.to('DescribeNotificationConfigurations'); } /** * Grants permission to describe the policies for the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribePolicies.html */ toDescribePolicies() { return this.to('DescribePolicies'); } /** * Grants permission to describe one or more scaling activities for the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeScalingActivities.html */ toDescribeScalingActivities() { return this.to('DescribeScalingActivities'); } /** * Grants permission to describe the scaling process types for use with ResumeProcesses and SuspendProcesses * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeScalingProcessTypes.html */ toDescribeScalingProcessTypes() { return this.to('DescribeScalingProcessTypes'); } /** * Grants permission to describe the actions scheduled for your Auto Scaling group that haven't run * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeScheduledActions.html */ toDescribeScheduledActions() { return this.to('DescribeScheduledActions'); } /** * Grants permission to describe the specified tags * * Access Level: Read * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeTags.html */ toDescribeTags() { return this.to('DescribeTags'); } /** * Grants permission to describe the termination policies supported by Auto Scaling * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeTerminationPolicyTypes.html */ toDescribeTerminationPolicyTypes() { return this.to('DescribeTerminationPolicyTypes'); } /** * Grants permission to describe the target groups for the specified Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeTrafficSources.html */ toDescribeTrafficSources() { return this.to('DescribeTrafficSources'); } /** * Grants permission to describe the warm pool associated with the Auto Scaling group * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeWarmPool.html */ toDescribeWarmPool() { return this.to('DescribeWarmPool'); } /** * Grants permission to remove one or more instances from the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DetachInstances.html */ toDetachInstances() { return this.to('DetachInstances'); } /** * Grants permission to detach one or more target groups from the specified Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifTargetGroupARNs() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DetachLoadBalancerTargetGroups.html */ toDetachLoadBalancerTargetGroups() { return this.to('DetachLoadBalancerTargetGroups'); } /** * Grants permission to remove one or more load balancers from the specified Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifLoadBalancerNames() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DetachLoadBalancers.html */ toDetachLoadBalancers() { return this.to('DetachLoadBalancers'); } /** * Grants permission to detach one or more traffic sources from an Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifTrafficSourceIdentifiers() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DetachTrafficSources.html */ toDetachTrafficSources() { return this.to('DetachTrafficSources'); } /** * Grants permission to disable monitoring of the specified metrics for the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DisableMetricsCollection.html */ toDisableMetricsCollection() { return this.to('DisableMetricsCollection'); } /** * Grants permission to enable monitoring of the specified metrics for the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_EnableMetricsCollection.html */ toEnableMetricsCollection() { return this.to('EnableMetricsCollection'); } /** * Grants permission to move the specified instances into Standby mode * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_EnterStandby.html */ toEnterStandby() { return this.to('EnterStandby'); } /** * Grants permission to execute the specified policy * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_ExecutePolicy.html */ toExecutePolicy() { return this.to('ExecutePolicy'); } /** * Grants permission to move the specified instances out of Standby mode * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_ExitStandby.html */ toExitStandby() { return this.to('ExitStandby'); } /** * Grants permission to retrieve the forecast data for a predictive scaling policy * * Access Level: List * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_GetPredictiveScalingForecast.html */ toGetPredictiveScalingForecast() { return this.to('GetPredictiveScalingForecast'); } /** * Grants permission to launch one or more EC2 instances in the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_LaunchInstances.html */ toLaunchInstances() { return this.to('LaunchInstances'); } /** * Grants permission to modify an account setting for your account * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutAccountSetting.html */ toPutAccountSetting() { return this.to('PutAccountSetting'); } /** * Grants permission to create or update a lifecycle hook for the specified Auto Scaling Group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutLifecycleHook.html */ toPutLifecycleHook() { return this.to('PutLifecycleHook'); } /** * Grants permission to configure an Auto Scaling group to send notifications when specified events take place * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutNotificationConfiguration.html */ toPutNotificationConfiguration() { return this.to('PutNotificationConfiguration'); } /** * Grants permission to create or update a policy for an Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutScalingPolicy.html */ toPutScalingPolicy() { return this.to('PutScalingPolicy'); } /** * Grants permission to create or update a scheduled scaling action for an Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifMaxSize() * - .ifMinSize() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutScheduledUpdateGroupAction.html */ toPutScheduledUpdateGroupAction() { return this.to('PutScheduledUpdateGroupAction'); } /** * Grants permission to create or update the warm pool associated with the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutWarmPool.html */ toPutWarmPool() { return this.to('PutWarmPool'); } /** * Grants permission to record a heartbeat for the lifecycle action associated with the specified token or instance * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_RecordLifecycleActionHeartbeat.html */ toRecordLifecycleActionHeartbeat() { return this.to('RecordLifecycleActionHeartbeat'); } /** * Grants permission to resume the specified suspended Auto Scaling processes, or all suspended process, for the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_ResumeProcesses.html */ toResumeProcesses() { return this.to('ResumeProcesses'); } /** * Grants permission to rollback an instance refresh operation in progress * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_RollbackInstanceRefresh.html */ toRollbackInstanceRefresh() { return this.to('RollbackInstanceRefresh'); } /** * Grants permission to set the size of the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_SetDesiredCapacity.html */ toSetDesiredCapacity() { return this.to('SetDesiredCapacity'); } /** * Grants permission to set the health status of the specified instance * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_SetInstanceHealth.html */ toSetInstanceHealth() { return this.to('SetInstanceHealth'); } /** * Grants permission to update the instance protection settings of the specified instances * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_SetInstanceProtection.html */ toSetInstanceProtection() { return this.to('SetInstanceProtection'); } /** * Grants permission to start a new instance refresh operation * * Access Level: Write * * Possible conditions: * - .ifImageId() * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_StartInstanceRefresh.html */ toStartInstanceRefresh() { return this.to('StartInstanceRefresh'); } /** * Grants permission to suspend the specified Auto Scaling processes, or all processes, for the specified Auto Scaling group * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_SuspendProcesses.html */ toSuspendProcesses() { return this.to('SuspendProcesses'); } /** * Grants permission to terminate the specified instance and optionally adjust the desired group size * * Access Level: Write * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_TerminateInstanceInAutoScalingGroup.html */ toTerminateInstanceInAutoScalingGroup() { return this.to('TerminateInstanceInAutoScalingGroup'); } /** * Grants permission to update the configuration for the specified Auto Scaling group * * Access Level: Write * * Possible conditions: * - .ifImageId() * - .ifCapacityReservationIds() * - .ifCapacityReservationResourceGroupArns() * - .ifInstanceTypes() * - .ifLaunchConfigurationName() * - .ifLaunchTemplateVersionSpecified() * - .ifMaxSize() * - .ifMinSize() * - .ifVPCZoneIdentifiers() * * Dependent actions: * - iam:PassRole * * https://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_UpdateAutoScalingGroup.html */ toUpdateAutoScalingGroup() { return this.to('UpdateAutoScalingGroup'); } /** * Adds a resource of type autoScalingGroup to the statement * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-resources * * @param groupId - Identifier for the groupId. * @param groupFriendlyName - Identifier for the groupFriendlyName. * @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: * - .ifResourceTag() * - .ifAwsResourceTag() */ onAutoScalingGroup(groupId, groupFriendlyName, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:autoscaling:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:autoScalingGroup:${groupId}:autoScalingGroupName/${groupFriendlyName}`); } /** * Adds a resource of type launchConfiguration to the statement * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-resources * * @param id - Identifier for the id. * @param launchConfigurationName - Identifier for the launchConfigurationName. * @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. */ onLaunchConfiguration(id, launchConfigurationName, account, region, partition) { return this.on(`arn:${partition ?? this.defaultPartition}:autoscaling:${region ?? this.defaultRegion}:${account ?? this.defaultAccount}:launchConfiguration:${id}:launchConfigurationName/${launchConfigurationName}`); } /** * Filters access based on the Capacity Reservation IDs * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * @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` */ ifCapacityReservationIds(value, operator) { return this.if(`CapacityReservationIds`, value, operator ?? 'StringLike'); } /** * Filters access based on the ARN of a Capacity Reservation resource group * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * @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` */ ifCapacityReservationResourceGroupArns(value, operator) { return this.if(`CapacityReservationResourceGroupArns`, value, operator ?? 'StringLike'); } /** * Filters access based on whether the force delete option is specified when deleting an Auto Scaling group * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toDeleteAutoScalingGroup() * * @param value `true` or `false`. **Default:** `true` */ ifForceDelete(value) { return this.if(`ForceDelete`, (typeof value !== 'undefined' ? value : true), 'Bool'); } /** * Filters access based on the AMI ID for the launch configuration * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toCreateLaunchConfiguration() * - .toStartInstanceRefresh() * - .toUpdateAutoScalingGroup() * * @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` */ ifImageId(value, operator) { return this.if(`ImageId`, value, operator ?? 'StringLike'); } /** * Filters access based on the instance type for the launch configuration * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateLaunchConfiguration() * * @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` */ ifInstanceType(value, operator) { return this.if(`InstanceType`, value, operator ?? 'StringLike'); } /** * Filters access based on the instance types present as overrides to a launch template for a mixed instances policy. Use it to qualify which instance types can be explicitly defined in the policy * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * @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` */ ifInstanceTypes(value, operator) { return this.if(`InstanceTypes`, value, operator ?? 'StringLike'); } /** * Filters access based on the name of a launch configuration * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * @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` */ ifLaunchConfigurationName(value, operator) { return this.if(`LaunchConfigurationName`, value, operator ?? 'StringLike'); } /** * Filters access based on whether users can specify any version of a launch template or only the Latest or Default version * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * @param value `true` or `false`. **Default:** `true` */ ifLaunchTemplateVersionSpecified(value) { return this.if(`LaunchTemplateVersionSpecified`, (typeof value !== 'undefined' ? value : true), 'Bool'); } /** * Filters access based on the name of the load balancer * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toAttachLoadBalancers() * - .toCreateAutoScalingGroup() * - .toDetachLoadBalancers() * * @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` */ ifLoadBalancerNames(value, operator) { return this.if(`LoadBalancerNames`, value, operator ?? 'StringLike'); } /** * Filters access based on the maximum scaling size in the request * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toPutScheduledUpdateGroupAction() * - .toUpdateAutoScalingGroup() * * @param value The value(s) to check * @param operator Works with [numeric operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_Numeric). **Default:** `NumericEquals` */ ifMaxSize(value, operator) { return this.if(`MaxSize`, value, operator ?? 'NumericEquals'); } /** * Filters access based on whether the HTTP endpoint is enabled for the instance metadata service * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateLaunchConfiguration() * * @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` */ ifMetadataHttpEndpoint(value, operator) { return this.if(`MetadataHttpEndpoint`, value, operator ?? 'StringLike'); } /** * Filters access based on the allowed number of hops when calling the instance metadata service * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateLaunchConfiguration() * * @param value The value(s) to check * @param operator Works with [numeric operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_Numeric). **Default:** `NumericEquals` */ ifMetadataHttpPutResponseHopLimit(value, operator) { return this.if(`MetadataHttpPutResponseHopLimit`, value, operator ?? 'NumericEquals'); } /** * Filters access based on whether tokens are required when calling the instance metadata service (optional or required) * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateLaunchConfiguration() * * @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` */ ifMetadataHttpTokens(value, operator) { return this.if(`MetadataHttpTokens`, value, operator ?? 'StringLike'); } /** * Filters access based on the minimum scaling size in the request * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toPutScheduledUpdateGroupAction() * - .toUpdateAutoScalingGroup() * * @param value The value(s) to check * @param operator Works with [numeric operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_Numeric). **Default:** `NumericEquals` */ ifMinSize(value, operator) { return this.if(`MinSize`, value, operator ?? 'NumericEquals'); } /** * Filters access based on the tags associated with the resource * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toAttachInstances() * - .toAttachLoadBalancerTargetGroups() * - .toAttachLoadBalancers() * - .toAttachTrafficSources() * - .toBatchDeleteScheduledAction() * - .toBatchPutScheduledUpdateGroupAction() * - .toCancelInstanceRefresh() * - .toCompleteLifecycleAction() * - .toCreateAutoScalingGroup() * - .toCreateOrUpdateTags() * - .toDeleteAutoScalingGroup() * - .toDeleteLifecycleHook() * - .toDeleteNotificationConfiguration() * - .toDeletePolicy() * - .toDeleteScheduledAction() * - .toDeleteTags() * - .toDeleteWarmPool() * - .toDetachInstances() * - .toDetachLoadBalancerTargetGroups() * - .toDetachLoadBalancers() * - .toDetachTrafficSources() * - .toDisableMetricsCollection() * - .toEnableMetricsCollection() * - .toEnterStandby() * - .toExecutePolicy() * - .toExitStandby() * - .toLaunchInstances() * - .toPutLifecycleHook() * - .toPutNotificationConfiguration() * - .toPutScalingPolicy() * - .toPutScheduledUpdateGroupAction() * - .toPutWarmPool() * - .toRecordLifecycleActionHeartbeat() * - .toResumeProcesses() * - .toRollbackInstanceRefresh() * - .toSetDesiredCapacity() * - .toSetInstanceHealth() * - .toSetInstanceProtection() * - .toStartInstanceRefresh() * - .toSuspendProcesses() * - .toTerminateInstanceInAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * Applies to resource types: * - autoScalingGroup * * @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` */ ifResourceTag(tagKey, value, operator) { return this.if(`ResourceTag/${tagKey}`, value, operator ?? 'StringLike'); } /** * Filters access based on the price for Spot Instances for the launch configuration * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateLaunchConfiguration() * * @param value The value(s) to check * @param operator Works with [numeric operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_Numeric). **Default:** `NumericEquals` */ ifSpotPrice(value, operator) { return this.if(`SpotPrice`, value, operator ?? 'NumericEquals'); } /** * Filters access based on the ARN of a target group * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toAttachLoadBalancerTargetGroups() * - .toCreateAutoScalingGroup() * - .toDetachLoadBalancerTargetGroups() * * @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` */ ifTargetGroupARNs(value, operator) { return this.if(`TargetGroupARNs`, value, operator ?? 'ArnLike'); } /** * Filters access based on the identifiers of the traffic sources * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toAttachTrafficSources() * - .toCreateAutoScalingGroup() * - .toDetachTrafficSources() * * @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` */ ifTrafficSourceIdentifiers(value, operator) { return this.if(`TrafficSourceIdentifiers`, value, operator ?? 'StringLike'); } /** * Filters access based on the identifier of a VPC zone * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * @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` */ ifVPCZoneIdentifiers(value, operator) { return this.if(`VPCZoneIdentifiers`, value, operator ?? 'StringLike'); } /** * Filters access based on the tags that are passed in the request * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toCreateOrUpdateTags() * - .toDeleteTags() * * @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, value, operator) { return this.if(`aws:RequestTag/${tagKey}`, value, operator ?? 'StringLike'); } /** * Filters access based on the tags associated with the resource * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toAttachInstances() * - .toAttachLoadBalancerTargetGroups() * - .toAttachLoadBalancers() * - .toAttachTrafficSources() * - .toBatchDeleteScheduledAction() * - .toBatchPutScheduledUpdateGroupAction() * - .toCancelInstanceRefresh() * - .toCompleteLifecycleAction() * - .toCreateAutoScalingGroup() * - .toCreateOrUpdateTags() * - .toDeleteAutoScalingGroup() * - .toDeleteLifecycleHook() * - .toDeleteNotificationConfiguration() * - .toDeletePolicy() * - .toDeleteScheduledAction() * - .toDeleteTags() * - .toDeleteWarmPool() * - .toDetachInstances() * - .toDetachLoadBalancerTargetGroups() * - .toDetachLoadBalancers() * - .toDetachTrafficSources() * - .toDisableMetricsCollection() * - .toEnableMetricsCollection() * - .toEnterStandby() * - .toExecutePolicy() * - .toExitStandby() * - .toLaunchInstances() * - .toPutLifecycleHook() * - .toPutNotificationConfiguration() * - .toPutScalingPolicy() * - .toPutScheduledUpdateGroupAction() * - .toPutWarmPool() * - .toRecordLifecycleActionHeartbeat() * - .toResumeProcesses() * - .toRollbackInstanceRefresh() * - .toSetDesiredCapacity() * - .toSetInstanceHealth() * - .toSetInstanceProtection() * - .toStartInstanceRefresh() * - .toSuspendProcesses() * - .toTerminateInstanceInAutoScalingGroup() * - .toUpdateAutoScalingGroup() * * Applies to resource types: * - autoScalingGroup * * @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, value, operator) { return this.if(`aws:ResourceTag/${tagKey}`, value, operator ?? 'StringLike'); } /** * Filters access based on the tag keys that are passed in the request * * https://docs.aws.amazon.com/autoscaling/latest/userguide/control-access-using-iam.html#policy-auto-scaling-condition-keys * * Applies to actions: * - .toCreateAutoScalingGroup() * - .toCreateOrUpdateTags() * - .toDeleteTags() * * @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, operator) { return this.if(`aws:TagKeys`, value, operator ?? 'StringLike'); } /** * Statement provider for service [autoscaling](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2autoscaling.html). * */ constructor(props) { super(props); this.servicePrefix = 'autoscaling'; this.accessLevelList = { Write: [ 'AttachInstances', 'AttachLoadBalancerTargetGroups', 'AttachLoadBalancers', 'AttachTrafficSources', 'BatchDeleteScheduledAction', 'BatchPutScheduledUpdateGroupAction', 'CancelInstanceRefresh', 'CompleteLifecycleAction', 'CreateAutoScalingGroup', 'CreateLaunchConfiguration', 'DeleteAutoScalingGroup', 'DeleteLaunchConfiguration', 'DeleteLifecycleHook', 'DeleteNotificationConfiguration', 'DeletePolicy', 'DeleteScheduledAction', 'DeleteWarmPool', 'DetachInstances', 'DetachLoadBalancerTargetGroups', 'DetachLoadBalancers', 'DetachTrafficSources', 'DisableMetricsCollection', 'EnableMetricsCollection', 'EnterStandby', 'ExecutePolicy', 'ExitStandby', 'LaunchInstances', 'PutAccountSetting', 'PutLifecycleHook', 'PutNotificationConfiguration', 'PutScalingPolicy', 'PutScheduledUpdateGroupAction', 'PutWarmPool', 'RecordLifecycleActionHeartbeat', 'ResumeProcesses', 'RollbackInstanceRefresh', 'SetDesiredCapacity', 'SetInstanceHealth', 'SetInstanceProtection', 'StartInstanceRefresh', 'SuspendProcesses', 'TerminateInstanceInAutoScalingGroup', 'UpdateAutoScalingGroup' ], Tagging: [ 'CreateOrUpdateTags', 'DeleteTags' ], List: [ 'DescribeAccountLimits', 'DescribeAccountSettings', 'DescribeAdjustmentTypes', 'DescribeAutoScalingGroups', 'DescribeAutoScalingInstances', 'DescribeAutoScalingNotificationTypes', 'DescribeInstanceRefreshes', 'DescribeLaunchConfigurations', 'DescribeLifecycleHookTypes', 'DescribeLifecycleHooks', 'DescribeLoadBalancerTargetGroups', 'DescribeLoadBalancers', 'DescribeMetricCollectionTypes', 'DescribeNotificationConfigurations', 'DescribePolicies', 'DescribeScalingActivities', 'DescribeScalingProcessTypes', 'DescribeScheduledActions', 'DescribeTerminationPolicyTypes', 'DescribeTrafficSources', 'DescribeWarmPool', 'GetPredictiveScalingForecast' ], Read: [ 'DescribeTags' ] }; } } exports.Autoscaling = Autoscaling; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWMyYXV0b3NjYWxpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlYzJhdXRvc2NhbGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOz