@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.413Z") @Stability(value=Stable) public interface ScalableTargetProps extends software.amazon.jsii.JsiiSerializable
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() |
Number |
getMaxCapacity()
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.
|
Number |
getMinCapacity()
The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.
|
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.
|
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.
|
@Stability(value=Stable) @NotNull Number getMaxCapacity()
@Stability(value=Stable) @NotNull Number getMinCapacity()
@Stability(value=Stable) @NotNull String getResourceId()
This string consists of the resource type and unique identifier.
Example value: service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH
@Stability(value=Stable) @NotNull String getScalableDimension()
Specify the service namespace, resource type, and scaling property.
Example value: ecs:service:DesiredCount
@Stability(value=Stable) @NotNull ServiceNamespace getServiceNamespace()
For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.
@Stability(value=Stable) @Nullable default IRole getRole()
Default: A role is automatically created
@Stability(value=Stable) static ScalableTargetProps.Builder builder()
ScalableTargetProps.Builder of ScalableTargetPropsCopyright © 2022. All rights reserved.