Interface ScalableTargetProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ScalableTargetProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:37.370Z")
@Stability(Stable)
public interface ScalableTargetProps
extends software.amazon.jsii.JsiiSerializable
Properties for a scalable target.
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forScalableTargetProps
static final class
An implementation forScalableTargetProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScalableTargetProps.Builder
builder()
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.The resource identifier to associate with this scalable target.default IRole
getRole()
Role that allows Application Auto Scaling to modify your scalable target.The scalable dimension that's associated with the scalable target.The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMaxCapacity
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity. -
getMinCapacity
The minimum value that Application Auto Scaling can use to scale a target during a scaling activity. -
getResourceId
The resource identifier to associate with this scalable target.This string consists of the resource type and unique identifier.
Example value:
service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH
-
getScalableDimension
The scalable dimension that's associated with the scalable target.Specify the service namespace, resource type, and scaling property.
Example value:
ecs:service:DesiredCount
-
getServiceNamespace
The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.
-
getRole
Role that allows Application Auto Scaling to modify your scalable target.Default: A role is automatically created
-
builder
- Returns:
- a
ScalableTargetProps.Builder
ofScalableTargetProps
-