All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.ecs.ScalableTaskCount Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.ecs;

/**
 * The scalable attribute representing task count.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.15.0 (build 585166b)", date = "2021-01-06T15:18:00.636Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.ScalableTaskCount")
public class ScalableTaskCount extends software.amazon.awscdk.services.applicationautoscaling.BaseScalableAttribute {

    protected ScalableTaskCount(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected ScalableTaskCount(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * Constructs a new instance of the ScalableTaskCount class.
     * 

* @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public ScalableTaskCount(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.ScalableTaskCountProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Scales in or out to achieve a target CPU utilization. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void scaleOnCpuUtilization(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.CpuUtilizationScalingProps props) { software.amazon.jsii.Kernel.call(this, "scaleOnCpuUtilization", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Scales in or out to achieve a target memory utilization. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void scaleOnMemoryUtilization(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.MemoryUtilizationScalingProps props) { software.amazon.jsii.Kernel.call(this, "scaleOnMemoryUtilization", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Scales in or out based on a specified metric value. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void scaleOnMetric(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.applicationautoscaling.BasicStepScalingPolicyProps props) { software.amazon.jsii.Kernel.call(this, "scaleOnMetric", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Scales in or out to achieve a target Application Load Balancer request count per target. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void scaleOnRequestCount(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.RequestCountScalingProps props) { software.amazon.jsii.Kernel.call(this, "scaleOnRequestCount", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Scales in or out based on a specified scheduled time. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void scaleOnSchedule(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.applicationautoscaling.ScalingSchedule props) { software.amazon.jsii.Kernel.call(this, "scaleOnSchedule", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * Scales in or out to achieve a target on a custom metric. *

* @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void scaleToTrackCustomMetric(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.TrackCustomMetricProps props) { software.amazon.jsii.Kernel.call(this, "scaleToTrackCustomMetric", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * A fluent builder for {@link software.amazon.awscdk.services.ecs.ScalableTaskCount}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awscdk.services.ecs.ScalableTaskCountProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awscdk.services.ecs.ScalableTaskCountProps.Builder(); } /** * Maximum capacity to scale to. *

* @return {@code this} * @param maxCapacity Maximum capacity to scale to. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder maxCapacity(final java.lang.Number maxCapacity) { this.props.maxCapacity(maxCapacity); return this; } /** * Minimum capacity to scale to. *

* Default: 1 *

* @return {@code this} * @param minCapacity Minimum capacity to scale to. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder minCapacity(final java.lang.Number minCapacity) { this.props.minCapacity(minCapacity); return this; } /** * Scalable dimension of the attribute. *

* @return {@code this} * @param dimension Scalable dimension of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder dimension(final java.lang.String dimension) { this.props.dimension(dimension); return this; } /** * Resource ID of the attribute. *

* @return {@code this} * @param resourceId Resource ID of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder resourceId(final java.lang.String resourceId) { this.props.resourceId(resourceId); return this; } /** * Role to use for scaling. *

* @return {@code this} * @param role Role to use for scaling. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder role(final software.amazon.awscdk.services.iam.IRole role) { this.props.role(role); return this; } /** * Service namespace of the scalable attribute. *

* @return {@code this} * @param serviceNamespace Service namespace of the scalable attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder serviceNamespace(final software.amazon.awscdk.services.applicationautoscaling.ServiceNamespace serviceNamespace) { this.props.serviceNamespace(serviceNamespace); return this; } /** * @returns a newly built instance of {@link software.amazon.awscdk.services.ecs.ScalableTaskCount}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.awscdk.services.ecs.ScalableTaskCount build() { return new software.amazon.awscdk.services.ecs.ScalableTaskCount( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy