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 Details

    • Builder

      public Builder()
  • Method Details

    • maxCapacity

      @Stability(Stable) public ScalableTargetProps.Builder maxCapacity(Number maxCapacity)
      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 ScalableTargetProps.Builder minCapacity(Number minCapacity)
      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 ScalableTargetProps.Builder resourceId(String resourceId)
      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

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

      @Stability(Stable) public ScalableTargetProps.Builder role(IRole role)
      Parameters:
      role - Role that allows Application Auto Scaling to modify your scalable target.
      Returns:
      this
    • build

      @Stability(Stable) public ScalableTargetProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ScalableTargetProps>
      Returns:
      a new instance of ScalableTargetProps
      Throws:
      NullPointerException - if any required attribute was not provided