@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)",
date="2022-05-20T22:19:57.961Z")
public interface ScalableTargetProps
Example:
import software.amazon.awscdk.services.lambda.*; Code code; Function handler = Function.Builder.create(this, "MyFunction") .runtime(Runtime.PYTHON_3_7) .handler("index.handler") .code(code) .reservedConcurrentExecutions(2) .build(); Version fnVer = handler.getCurrentVersion(); ScalableTarget target = ScalableTarget.Builder.create(this, "ScalableTarget") .serviceNamespace(ServiceNamespace.LAMBDA) .maxCapacity(100) .minCapacity(10) .resourceId(String.format("function:%s:%s", handler.getFunctionName(), fnVer.getVersion())) .scalableDimension("lambda:function:ProvisionedConcurrency") .build(); target.scaleToTrackMetric("PceTracking", BasicTargetTrackingScalingPolicyProps.builder() .targetValue(0.9) .predefinedMetric(PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION) .build());
Modifier and Type | Interface and Description |
---|---|
static class |
ScalableTargetProps.Builder
A builder for
ScalableTargetProps |
static class |
ScalableTargetProps.Jsii$Proxy
An implementation for
ScalableTargetProps |
Modifier and Type | Method and Description |
---|---|
static ScalableTargetProps.Builder |
builder() |
java.lang.Number |
getMaxCapacity()
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.
|
java.lang.Number |
getMinCapacity()
The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.
|
java.lang.String |
getResourceId()
The resource identifier to associate with this scalable target.
|
default IRole |
getRole()
Role that allows Application Auto Scaling to modify your scalable target.
|
java.lang.String |
getScalableDimension()
The scalable dimension that's associated with the scalable target.
|
ServiceNamespace |
getServiceNamespace()
The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.
|
java.lang.Number getMaxCapacity()
java.lang.Number getMinCapacity()
java.lang.String getResourceId()
This string consists of the resource type and unique identifier.
Example value: service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH
https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html
java.lang.String getScalableDimension()
Specify the service namespace, resource type, and scaling property.
Example value: ecs:service:DesiredCount
https://docs.aws.amazon.com/autoscaling/application/APIReference/API_ScalingPolicy.html
ServiceNamespace getServiceNamespace()
For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.
https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html
default IRole getRole()
Default: A role is automatically created
static ScalableTargetProps.Builder builder()
ScalableTargetProps.Builder
of ScalableTargetProps