Class ScalableTargetProps.Builder
java.lang.Object
software.amazon.awscdk.services.applicationautoscaling.ScalableTargetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScalableTargetProps>
- Enclosing interface:
ScalableTargetProps
@Stability(Stable)
public static final class ScalableTargetProps.Builder
extends Object
implements software.amazon.jsii.Builder<ScalableTargetProps>
A builder for
ScalableTargetProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.maxCapacity(Number maxCapacity) Sets the value ofScalableTargetProps.getMaxCapacity()minCapacity(Number minCapacity) Sets the value ofScalableTargetProps.getMinCapacity()resourceId(String resourceId) Sets the value ofScalableTargetProps.getResourceId()Sets the value ofScalableTargetProps.getRole()scalableDimension(String scalableDimension) Sets the value ofScalableTargetProps.getScalableDimension()serviceNamespace(ServiceNamespace serviceNamespace) Sets the value ofScalableTargetProps.getServiceNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxCapacity
Sets the value ofScalableTargetProps.getMaxCapacity()- Parameters:
maxCapacity- The maximum value that Application Auto Scaling can use to scale a target during a scaling activity. This parameter is required.- Returns:
this
-
minCapacity
Sets the value ofScalableTargetProps.getMinCapacity()- Parameters:
minCapacity- The minimum value that Application Auto Scaling can use to scale a target during a scaling activity. This parameter is required.- Returns:
this
-
resourceId
Sets the value ofScalableTargetProps.getResourceId()- Parameters:
resourceId- The resource identifier to associate with this scalable target. This parameter is required. This string consists of the resource type and unique identifier.Example value:
service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH- Returns:
this
-
scalableDimension
Sets the value ofScalableTargetProps.getScalableDimension()- Parameters:
scalableDimension- The scalable dimension that's associated with the scalable target. This parameter is required. Specify the service namespace, resource type, and scaling property.Example value:
ecs:service:DesiredCount- Returns:
this
-
serviceNamespace
@Stability(Stable) public ScalableTargetProps.Builder serviceNamespace(ServiceNamespace serviceNamespace) Sets the value ofScalableTargetProps.getServiceNamespace()- Parameters:
serviceNamespace- The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service. This parameter is required. For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.- Returns:
this
-
role
Sets the value ofScalableTargetProps.getRole()- Parameters:
role- Role that allows Application Auto Scaling to modify your scalable target.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ScalableTargetProps>- Returns:
- a new instance of
ScalableTargetProps - Throws:
NullPointerException- if any required attribute was not provided
-