enum PredefinedMetric
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ApplicationAutoScaling.PredefinedMetric |
Java | software.amazon.awscdk.services.applicationautoscaling.PredefinedMetric |
Python | aws_cdk.aws_applicationautoscaling.PredefinedMetric |
TypeScript (source) | @aws-cdk/aws-applicationautoscaling » PredefinedMetric |
One of the predefined autoscaling metrics.
Example
import * as lambda from '@aws-cdk/aws-lambda';
declare const code: lambda.Code;
const handler = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.PYTHON_3_7,
handler: 'index.handler',
code,
reservedConcurrentExecutions: 2,
});
const fnVer = handler.currentVersion;
const target = new appscaling.ScalableTarget(this, 'ScalableTarget', {
serviceNamespace: appscaling.ServiceNamespace.LAMBDA,
maxCapacity: 100,
minCapacity: 10,
resourceId: `function:${handler.functionName}:${fnVer.version}`,
scalableDimension: 'lambda:function:ProvisionedConcurrency',
})
target.scaleToTrackMetric('PceTracking', {
targetValue: 0.9,
predefinedMetric: appscaling.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,
})
Members
Name | Description |
---|---|
APPSTREAM_AVERAGE_CAPACITY_UTILIZATION | Average percentage of instances in an AppStream fleet that are being used. |
CASSANDRA_READ_CAPACITY_UTILIZATION | Percentage of provisioned read capacity units utilized by a Keyspaces table. |
CASSANDRA_WRITE_CAPACITY_UTILIZATION | Percentage of provisioned write capacity units utilized by a Keyspaces table. |
COMPREHEND_INFERENCE_UTILIZATION | Percentage of provisioned inference units utilized by a Comprehend endpoint. |
NEPTURE_READER_AVERAGE_CPU_UTILIZATION | Average CPU Utilization of read replica instances in a Neptune DB cluster. |
DYNAMODB_READ_CAPACITY_UTILIZATION | Percentage of provisioned read capacity units consumed by a DynamoDB table. |
DYNAMODB_WRITE_CAPACITY_UTILIZATION | Percentage of provisioned write capacity units consumed by a DynamoDB table. |
DYANMODB_WRITE_CAPACITY_UTILIZATION | DYANMODB_WRITE_CAPACITY_UTILIZATION. |
ALB_REQUEST_COUNT_PER_TARGET | ALB_REQUEST_COUNT_PER_TARGET. |
RDS_READER_AVERAGE_CPU_UTILIZATION | RDS_READER_AVERAGE_CPU_UTILIZATION. |
RDS_READER_AVERAGE_DATABASE_CONNECTIONS | RDS_READER_AVERAGE_DATABASE_CONNECTIONS. |
EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION | EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION. |
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN | EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN. |
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT | EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT. |
SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE | SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE. |
ECS_SERVICE_AVERAGE_CPU_UTILIZATION | ECS_SERVICE_AVERAGE_CPU_UTILIZATION. |
ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION | ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION. |
LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION | LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION. |
KAFKA_BROKER_STORAGE_UTILIZATION | KAFKA_BROKER_STORAGE_UTILIZATION. |
ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION | ELASTIC_CACHE_PRIMARY_ENGINE_CPU_UTILIZATION. |
ELASTICACHE_REPLICA_ENGINE_CPU_UTILIZATION | ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION. |
ELASTICACHE_DATABASE_MEMORY_USAGE_COUNTED_FOR_EVICT_PERCENTAGE | ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION. |
APPSTREAM_AVERAGE_CAPACITY_UTILIZATION
Average percentage of instances in an AppStream fleet that are being used.
CASSANDRA_READ_CAPACITY_UTILIZATION
Percentage of provisioned read capacity units utilized by a Keyspaces table.
CASSANDRA_WRITE_CAPACITY_UTILIZATION
Percentage of provisioned write capacity units utilized by a Keyspaces table.
COMPREHEND_INFERENCE_UTILIZATION
Percentage of provisioned inference units utilized by a Comprehend endpoint.
NEPTURE_READER_AVERAGE_CPU_UTILIZATION
Average CPU Utilization of read replica instances in a Neptune DB cluster.
DYNAMODB_READ_CAPACITY_UTILIZATION
Percentage of provisioned read capacity units consumed by a DynamoDB table.
DYNAMODB_WRITE_CAPACITY_UTILIZATION
Percentage of provisioned write capacity units consumed by a DynamoDB table.
Suffix dummy
is necessary due to jsii bug (https://github.com/aws/jsii/issues/2782).
Duplicate values will be dropped, so this suffix is added as a workaround.
The value will be replaced when this enum is used.
DYANMODB_WRITE_CAPACITY_UTILIZATION
DYANMODB_WRITE_CAPACITY_UTILIZATION.
ALB_REQUEST_COUNT_PER_TARGET
ALB_REQUEST_COUNT_PER_TARGET.
RDS_READER_AVERAGE_CPU_UTILIZATION
RDS_READER_AVERAGE_CPU_UTILIZATION.
RDS_READER_AVERAGE_DATABASE_CONNECTIONS
RDS_READER_AVERAGE_DATABASE_CONNECTIONS.
EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION
EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION.
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN.
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT.
SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE
SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE.
ECS_SERVICE_AVERAGE_CPU_UTILIZATION
ECS_SERVICE_AVERAGE_CPU_UTILIZATION.
ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION
ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION.
LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION
LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION.
KAFKA_BROKER_STORAGE_UTILIZATION
KAFKA_BROKER_STORAGE_UTILIZATION.
ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION
ELASTIC_CACHE_PRIMARY_ENGINE_CPU_UTILIZATION.
ELASTICACHE_REPLICA_ENGINE_CPU_UTILIZATION
ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION.
ELASTICACHE_DATABASE_MEMORY_USAGE_COUNTED_FOR_EVICT_PERCENTAGE
ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION.