ServiceNamespace Enum
The service that supports Application AutoScaling.
| Source | aws-applicationautoscaling/lib/scalable-target.ts |
|---|---|
| Type last changed |
Example
ts
const shardsScalableTarget = new appscaling.ScalableTarget(this, 'ElastiCacheRedisShardsScalableTarget', {
serviceNamespace: appscaling.ServiceNamespace.ELASTICACHE,
scalableDimension: 'elasticache:replication-group:NodeGroups',
minCapacity: 2,
maxCapacity: 10,
resourceId: 'replication-group/main-cluster',
});
shardsScalableTarget.scaleToTrackMetric('ElastiCacheRedisShardsCPUUtilization', {
targetValue: 20,
predefinedMetric: appscaling.PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION,
});
python
shards_scalable_target = appscaling.ScalableTarget(self, "ElastiCacheRedisShardsScalableTarget",
service_namespace=appscaling.ServiceNamespace.ELASTICACHE,
scalable_dimension="elasticache:replication-group:NodeGroups",
min_capacity=2,
max_capacity=10,
resource_id="replication-group/main-cluster"
)
shards_scalable_target.scale_to_track_metric("ElastiCacheRedisShardsCPUUtilization",
target_value=20,
predefined_metric=appscaling.PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION
)
java
ScalableTarget shardsScalableTarget = ScalableTarget.Builder.create(this, "ElastiCacheRedisShardsScalableTarget")
.serviceNamespace(ServiceNamespace.ELASTICACHE)
.scalableDimension("elasticache:replication-group:NodeGroups")
.minCapacity(2)
.maxCapacity(10)
.resourceId("replication-group/main-cluster")
.build();
shardsScalableTarget.scaleToTrackMetric("ElastiCacheRedisShardsCPUUtilization", BasicTargetTrackingScalingPolicyProps.builder()
.targetValue(20)
.predefinedMetric(PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION)
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var shardsScalableTarget = new ScalableTarget(this, "ElastiCacheRedisShardsScalableTarget", new ScalableTargetProps {
ServiceNamespace = ServiceNamespace.ELASTICACHE,
ScalableDimension = "elasticache:replication-group:NodeGroups",
MinCapacity = 2,
MaxCapacity = 10,
ResourceId = "replication-group/main-cluster"
});
shardsScalableTarget.ScaleToTrackMetric("ElastiCacheRedisShardsCPUUtilization", new BasicTargetTrackingScalingPolicyProps {
TargetValue = 20,
PredefinedMetric = PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
shardsScalableTarget := appscaling.NewScalableTarget(this, jsii.String("ElastiCacheRedisShardsScalableTarget"), &ScalableTargetProps{
ServiceNamespace: appscaling.ServiceNamespace_ELASTICACHE,
ScalableDimension: jsii.String("elasticache:replication-group:NodeGroups"),
MinCapacity: jsii.Number(2),
MaxCapacity: jsii.Number(10),
ResourceId: jsii.String("replication-group/main-cluster"),
})
shardsScalableTarget.ScaleToTrackMetric(jsii.String("ElastiCacheRedisShardsCPUUtilization"), &BasicTargetTrackingScalingPolicyProps{
TargetValue: jsii.Number(20),
PredefinedMetric: appscaling.PredefinedMetric_ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION,
})
Members
| Member | Description |
|---|---|
ECS | Elastic Container Service. |
ELASTIC_MAP_REDUCE | Elastic Map Reduce. |
EC2 | Elastic Compute Cloud. |
APPSTREAM | App Stream. |
DYNAMODB | Dynamo DB. |
RDS | Relational Database Service. |
SAGEMAKER | SageMaker. |
CUSTOM_RESOURCE | Custom Resource. |
LAMBDA | Lambda. |
COMPREHEND | Comprehend. |
KAFKA | Kafka. |
ELASTICACHE | ElastiCache. |
NEPTUNE | Neptune. |
CASSANDRA | Cassandra. |
WORKSPACES | Workspaces. |
Referenced by
BaseScalableAttributeProps.serviceNamespaceservice_namespaceserviceNamespaceServiceNamespaceServiceNamespaceScalableTargetProps.serviceNamespaceservice_namespaceserviceNamespaceServiceNamespaceServiceNamespace