From bdab7477b8464e04730a2b4b09841008bc6e8ab9 Mon Sep 17 00:00:00 2001 From: Jungseok Lee Date: Mon, 17 Feb 2020 23:49:47 -0800 Subject: [PATCH] feat(aws-applicationautoscaling): support Lambda and Comprehend (#6191) * feat(aws-applicationautoscaling): support Lambda and Comprehend Application Auto Scaling supports Lambda and Comprehend services. * docs(aws-applicationautoscaling): add description on Lambda and Comprehend This patch adds description on Lambda and Comprehend scalable resources. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../@aws-cdk/aws-applicationautoscaling/README.md | 2 +- .../lib/scalable-target.ts | 10 ++++++++++ .../test/test.scalable-target.ts | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-applicationautoscaling/README.md b/packages/@aws-cdk/aws-applicationautoscaling/README.md index b61115a70b3e8..8f91543dbb0a5 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/README.md +++ b/packages/@aws-cdk/aws-applicationautoscaling/README.md @@ -11,7 +11,7 @@ **Application AutoScaling** is used to configure autoscaling for all services other than scaling EC2 instances. For example, you will use this to -scale ECS tasks, DynamoDB capacity, Spot Fleet sizes and more. +scale ECS tasks, DynamoDB capacity, Spot Fleet sizes, Comprehend document classification endpoints, Lambda function provisioned concurrency and more. As a CDK user, you will probably not have to interact with this library directly; instead, it will be used by other construct libraries to diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts index 7873380c55afd..8ebf7889c9dd7 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts @@ -263,4 +263,14 @@ export enum ServiceNamespace { * Custom Resource */ CUSTOM_RESOURCE = 'custom-resource', + + /** + * Lambda + */ + LAMBDA = 'lambda', + + /** + * Comprehend + */ + COMPREHEND = 'comprehend', } diff --git a/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts index 341dd0eeec4c9..d7e050c55b159 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts @@ -140,4 +140,18 @@ export = { test.done(); }, + + 'test service namespace enum'(test: Test) { + test.equals(appscaling.ServiceNamespace.APPSTREAM, 'appstream'); + test.equals(appscaling.ServiceNamespace.COMPREHEND, 'comprehend'); + test.equals(appscaling.ServiceNamespace.CUSTOM_RESOURCE, 'custom-resource'); + test.equals(appscaling.ServiceNamespace.DYNAMODB, 'dynamodb'); + test.equals(appscaling.ServiceNamespace.EC2, 'ec2'); + test.equals(appscaling.ServiceNamespace.ECS, 'ecs'); + test.equals(appscaling.ServiceNamespace.ELASTIC_MAP_REDUCE, 'elasticmapreduce'); + test.equals(appscaling.ServiceNamespace.LAMBDA, 'lambda'); + test.equals(appscaling.ServiceNamespace.RDS, 'rds'); + test.equals(appscaling.ServiceNamespace.SAGEMAKER, 'sagemaker'); + test.done(); + }, };