How to use the @aws-cdk/aws-autoscaling.UpdateType function in @aws-cdk/aws-autoscaling

To help you get started, we’ve selected a few @aws-cdk/aws-autoscaling examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / aws-eks-legacy / lib / cluster.ts View on Github external
public addCapacity(id: string, options: CapacityOptions): autoscaling.AutoScalingGroup {
    const asg = new autoscaling.AutoScalingGroup(this, id, {
      ...options,
      vpc: this.vpc,
      machineImage: new EksOptimizedImage({
        nodeType: nodeTypeForInstanceType(options.instanceType),
        kubernetesVersion: this.version,
      }),
      updateType: options.updateType || autoscaling.UpdateType.ROLLING_UPDATE,
      instanceType: options.instanceType,
    });

    this.addAutoScalingGroup(asg, {
      mapRole: options.mapRole,
      bootstrapOptions: options.bootstrapOptions,
      bootstrapEnabled: options.bootstrapEnabled
    });

    return asg;
  }
github aws / aws-cdk / packages / @aws-cdk / aws-ecs / lib / cluster.ts View on Github external
public addCapacity(id: string, options: AddCapacityOptions): autoscaling.AutoScalingGroup {
    const autoScalingGroup = new autoscaling.AutoScalingGroup(this, id, {
      ...options,
      vpc: this.vpc,
      machineImage: options.machineImage || new EcsOptimizedAmi(),
      updateType: options.updateType || autoscaling.UpdateType.REPLACING_UPDATE,
      instanceType: options.instanceType,
    });

    this.addAutoScalingGroup(autoScalingGroup, options);

    return autoScalingGroup;
  }

@aws-cdk/aws-autoscaling

The CDK Construct Library for AWS::AutoScaling

Apache-2.0
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis