Class ScalableTarget.Builder

java.lang.Object
software.amazon.awscdk.services.applicationautoscaling.ScalableTarget.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ScalableTarget>
Enclosing class:
ScalableTarget

@Stability(Stable) public static final class ScalableTarget.Builder extends Object implements software.amazon.jsii.Builder<ScalableTarget>
A fluent builder for ScalableTarget.
  • Method Details

    • create

      @Stability(Stable) public static ScalableTarget.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of ScalableTarget.Builder.
    • maxCapacity

      @Stability(Stable) public ScalableTarget.Builder maxCapacity(Number maxCapacity)
      The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.

      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

      @Stability(Stable) public ScalableTarget.Builder minCapacity(Number minCapacity)
      The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.

      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

      @Stability(Stable) public ScalableTarget.Builder resourceId(String resourceId)
      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

      Parameters:
      resourceId - The resource identifier to associate with this scalable target. This parameter is required.
      Returns:
      this
      See Also:
    • scalableDimension

      @Stability(Stable) public ScalableTarget.Builder scalableDimension(String scalableDimension)
      The scalable dimension that's associated with the scalable target.

      Specify the service namespace, resource type, and scaling property.

      Example value: ecs:service:DesiredCount

      Parameters:
      scalableDimension - The scalable dimension that's associated with the scalable target. This parameter is required.
      Returns:
      this
      See Also:
    • serviceNamespace

      @Stability(Stable) public ScalableTarget.Builder serviceNamespace(ServiceNamespace serviceNamespace)
      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.

      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.
      Returns:
      this
      See Also:
    • role

      @Stability(Stable) public ScalableTarget.Builder role(IRole role)
      Role that allows Application Auto Scaling to modify your scalable target.

      Default: A role is automatically created

      Parameters:
      role - Role that allows Application Auto Scaling to modify your scalable target. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public ScalableTarget build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ScalableTarget>
      Returns:
      a newly built instance of ScalableTarget.