Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/aws-autoscaling

Package Overview
Dependencies
Maintainers
5
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-autoscaling - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

191

lib/auto-scaling-group.d.ts

@@ -136,2 +136,8 @@ import cloudwatch = require('@aws-cdk/aws-cloudwatch');

readonly spotPrice?: string;
/**
* Configuration for health checks
*
* @default - HealthCheck.ec2 with no grace period
*/
readonly healthCheck?: HealthCheck;
}

@@ -177,2 +183,15 @@ /**

readonly role?: iam.IRole;
/**
* Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
*
* Each instance that is launched has an associated root device volume,
* either an Amazon EBS volume or an instance store volume.
* You can use block device mappings to specify additional EBS volumes or
* instance store volumes to attach to an instance when it is launched.
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
*
* @default - Uses the block device mapping of the AMI
*/
readonly blockDevices?: BlockDevice[];
}

@@ -394,2 +413,45 @@ declare abstract class AutoScalingGroupBase extends Resource implements IAutoScalingGroup {

/**
* EC2 Heath check options
*/
export interface Ec2HealthCheckOptions {
/**
* Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service
*
* @default Duration.seconds(0)
*/
readonly grace?: Duration;
}
/**
* ELB Heath check options
*/
export interface ElbHealthCheckOptions {
/**
* Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service
*
* This option is required for ELB health checks.
*/
readonly grace: Duration;
}
/**
* Health check settings
*/
export declare class HealthCheck {
readonly type: string;
readonly gracePeriod?: Duration | undefined;
/**
* Use EC2 for health checks
*
* @param options EC2 health check options
*/
static ec2(options?: Ec2HealthCheckOptions): HealthCheck;
/**
* Use ELB for health checks.
* It considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks.
*
* @param options ELB health check options
*/
static elb(options: ElbHealthCheckOptions): HealthCheck;
private constructor();
}
/**
* An AutoScalingGroup

@@ -481,2 +543,131 @@ */

}
export interface BlockDevice {
/**
* The device name exposed to the EC2 instance
*
* @example '/dev/sdh', 'xvdh'
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html
*/
readonly deviceName: string;
/**
* Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume
*
* @example BlockDeviceVolume.ebs(15), BlockDeviceVolume.ephemeral(0)
*
*/
readonly volume: BlockDeviceVolume;
/**
* If false, the device mapping will be suppressed.
* If set to false for the root device, the instance might fail the Amazon EC2 health check.
* Amazon EC2 Auto Scaling launches a replacement instance if the instance fails the health check.
*
* @default true - device mapping is left untouched
*/
readonly mappingEnabled?: boolean;
}
export interface EbsDeviceOptionsBase {
/**
* Indicates whether to delete the volume when the instance is terminated.
*
* @default - true for Amazon EC2 Auto Scaling, false otherwise (e.g. EBS)
*/
readonly deleteOnTermination?: boolean;
/**
* The number of I/O operations per second (IOPS) to provision for the volume.
*
* Must only be set for {@link volumeType}: {@link EbsDeviceVolumeType.IO1}
*
* The maximum ratio of IOPS to volume size (in GiB) is 50:1, so for 5,000 provisioned IOPS,
* you need at least 100 GiB storage on the volume.
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
*/
readonly iops?: number;
/**
* The EBS volume type
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
*
* @default {@link EbsDeviceVolumeType.GP2}
*/
readonly volumeType?: EbsDeviceVolumeType;
}
export interface EbsDeviceOptions extends EbsDeviceOptionsBase {
/**
* Specifies whether the EBS volume is encrypted.
* Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption
*
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances
*
* @default false
*/
readonly encrypted?: boolean;
}
export interface EbsDeviceSnapshotOptions extends EbsDeviceOptionsBase {
/**
* The volume size, in Gibibytes (GiB)
*
* If you specify volumeSize, it must be equal or greater than the size of the snapshot.
*
* @default - The snapshot size
*/
readonly volumeSize?: number;
}
export interface EbsDeviceProps extends EbsDeviceSnapshotOptions {
readonly snapshotId?: string;
}
/**
* Describes a block device mapping for an Auto Scaling group.
*/
export declare class BlockDeviceVolume {
readonly ebsDevice?: EbsDeviceProps | undefined;
readonly virtualName?: string | undefined;
/**
* Creates a new Elastic Block Storage device
*
* @param volumeSize The volume size, in Gibibytes (GiB)
* @param options additional device options
*/
static ebs(volumeSize: number, options?: EbsDeviceOptions): BlockDeviceVolume;
/**
* Creates a new Elastic Block Storage device from an existing snapshot
*
* @param snapshotId The snapshot ID of the volume to use
* @param options additional device options
*/
static ebsFromSnapshot(snapshotId: string, options?: EbsDeviceSnapshotOptions): BlockDeviceVolume;
/**
* Creates a virtual, ephemeral device.
* The name will be in the form ephemeral{volumeIndex}.
*
* @param volumeIndex the volume index. Must be equal or greater than 0
*/
static ephemeral(volumeIndex: number): BlockDeviceVolume;
protected constructor(ebsDevice?: EbsDeviceProps | undefined, virtualName?: string | undefined);
}
/**
* Supported EBS volume types for {@link AutoScalingGroupProps.blockDevices}
*/
export declare enum EbsDeviceVolumeType {
/**
* Magnetic
*/
STANDARD = "standard",
/**
* Provisioned IOPS SSD
*/
IO1 = "io1",
/**
* General Purpose SSD
*/
GP2 = "gp2",
/**
* Throughput Optimized HDD
*/
ST1 = "st1",
/**
* Cold HDD
*/
SC1 = "sc1"
}
export {};

37

package.json
{
"name": "@aws-cdk/aws-autoscaling",
"version": "1.3.0",
"version": "1.4.0",
"description": "The CDK Construct Library for AWS::AutoScaling",

@@ -65,3 +65,4 @@ "main": "lib/index.js",

"devDependencies": {
"@aws-cdk/assert": "^1.3.0",
"@aws-cdk/assert": "^1.4.0",
"@aws-cdk/cx-api": "^1.4.0",
"cdk-build-tools": "file:../../../tools/cdk-build-tools",

@@ -73,21 +74,21 @@ "cdk-integ-tools": "file:../../../tools/cdk-integ-tools",

"dependencies": {
"@aws-cdk/aws-autoscaling-common": "^1.3.0",
"@aws-cdk/aws-cloudwatch": "^1.3.0",
"@aws-cdk/aws-ec2": "^1.3.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.3.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.3.0",
"@aws-cdk/aws-iam": "^1.3.0",
"@aws-cdk/aws-sns": "^1.3.0",
"@aws-cdk/core": "^1.3.0"
"@aws-cdk/aws-autoscaling-common": "^1.4.0",
"@aws-cdk/aws-cloudwatch": "^1.4.0",
"@aws-cdk/aws-ec2": "^1.4.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.4.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.4.0",
"@aws-cdk/aws-iam": "^1.4.0",
"@aws-cdk/aws-sns": "^1.4.0",
"@aws-cdk/core": "^1.4.0"
},
"homepage": "https://github.com/aws/aws-cdk",
"peerDependencies": {
"@aws-cdk/aws-autoscaling-common": "^1.3.0",
"@aws-cdk/aws-cloudwatch": "^1.3.0",
"@aws-cdk/aws-ec2": "^1.3.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.3.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.3.0",
"@aws-cdk/aws-iam": "^1.3.0",
"@aws-cdk/aws-sns": "^1.3.0",
"@aws-cdk/core": "^1.3.0"
"@aws-cdk/aws-autoscaling-common": "^1.4.0",
"@aws-cdk/aws-cloudwatch": "^1.4.0",
"@aws-cdk/aws-ec2": "^1.4.0",
"@aws-cdk/aws-elasticloadbalancing": "^1.4.0",
"@aws-cdk/aws-elasticloadbalancingv2": "^1.4.0",
"@aws-cdk/aws-iam": "^1.4.0",
"@aws-cdk/aws-sns": "^1.4.0",
"@aws-cdk/core": "^1.4.0"
},

@@ -94,0 +95,0 @@ "engines": {

@@ -14,2 +14,4 @@ import { Test } from 'nodeunit';

'can configure resource signals'(test: Test): void;
'can configure EC2 health check'(test: Test): void;
'can configure EBS health check'(test: Test): void;
'can add Security Group to Fleet'(test: Test): void;

@@ -23,3 +25,9 @@ 'can set tags'(test: Test): void;

'an existing role can be specified instead of auto-created'(test: Test): void;
'defaultChild is available on an ASG'(test: Test): void;
'can set blockDeviceMappings'(test: Test): void;
'throws if ephemeral volumeIndex < 0'(test: Test): void;
'throws if volumeType === IO1 without iops'(test: Test): void;
'warning if iops without volumeType'(test: Test): void;
'warning if iops and volumeType !== IO1'(test: Test): void;
};
export = _default;

@@ -65,2 +65,5 @@ {

{
"path": "../cx-api"
},
{
"path": "../../../tools/cdk-build-tools"

@@ -67,0 +70,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc