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

software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration Maven / Gradle / Ivy

package software.amazon.awscdk.services.apprunner.alpha;

/**
 * (experimental) The App Runner Auto Scaling Configuration.
 * 

* Example: *

*

 * AutoScalingConfiguration autoScalingConfiguration = AutoScalingConfiguration.Builder.create(this, "AutoScalingConfiguration")
 *         .autoScalingConfigurationName("MyAutoScalingConfiguration")
 *         .maxConcurrency(150)
 *         .maxSize(20)
 *         .minSize(5)
 *         .build();
 * Service.Builder.create(this, "DemoService")
 *         .source(Source.fromEcrPublic(EcrPublicProps.builder()
 *                 .imageConfiguration(ImageConfiguration.builder().port(8000).build())
 *                 .imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest")
 *                 .build()))
 *         .autoScalingConfiguration(autoScalingConfiguration)
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-12-17T21:37:41.209Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.AutoScalingConfiguration") public class AutoScalingConfiguration extends software.amazon.awscdk.Resource implements software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration { protected AutoScalingConfiguration(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected AutoScalingConfiguration(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public AutoScalingConfiguration(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfigurationProps 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"), props }); } /** * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public AutoScalingConfiguration(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) { 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") }); } /** * (experimental) Imports an App Runner Auto Scaling Configuration from its ARN. *

* @param scope This parameter is required. * @param id This parameter is required. * @param autoScalingConfigurationArn This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration fromArn(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String autoScalingConfigurationArn) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration.class, "fromArn", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(autoScalingConfigurationArn, "autoScalingConfigurationArn is required") }); } /** * (experimental) Imports an App Runner Auto Scaling Configuration from attributes. *

* @param scope This parameter is required. * @param id This parameter is required. * @param attrs This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration fromAutoScalingConfigurationAttributes(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.apprunner.alpha.AutoScalingConfigurationAttributes attrs) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration.class, "fromAutoScalingConfigurationAttributes", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.IAutoScalingConfiguration.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(attrs, "attrs is required") }); } /** * (experimental) The ARN of the Auto Scaling Configuration. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getAutoScalingConfigurationArn() { return software.amazon.jsii.Kernel.get(this, "autoScalingConfigurationArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The name of the Auto Scaling Configuration. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getAutoScalingConfigurationName() { return software.amazon.jsii.Kernel.get(this, "autoScalingConfigurationName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The revision of the Auto Scaling Configuration. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.Number getAutoScalingConfigurationRevision() { return software.amazon.jsii.Kernel.get(this, "autoScalingConfigurationRevision", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) 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.Experimental) 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 software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfigurationProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; } /** * (experimental) The name for the Auto Scaling Configuration. *

* Default: - a name generated by CloudFormation *

* @return {@code this} * @param autoScalingConfigurationName The name for the Auto Scaling Configuration. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder autoScalingConfigurationName(final java.lang.String autoScalingConfigurationName) { this.props().autoScalingConfigurationName(autoScalingConfigurationName); return this; } /** * (experimental) The maximum number of concurrent requests that an instance processes. *

* If the number of concurrent requests exceeds this limit, App Runner scales the service up. *

* Must be between 1 and 200. *

* Default: 100 *

* @return {@code this} * @param maxConcurrency The maximum number of concurrent requests that an instance processes. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder maxConcurrency(final java.lang.Number maxConcurrency) { this.props().maxConcurrency(maxConcurrency); return this; } /** * (experimental) The maximum number of instances that a service scales up to. *

* At most maxSize instances actively serve traffic for your service. *

* Must be between 1 and 25. *

* Default: 25 *

* @return {@code this} * @param maxSize The maximum number of instances that a service scales up to. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder maxSize(final java.lang.Number maxSize) { this.props().maxSize(maxSize); return this; } /** * (experimental) The minimum number of instances that App Runner provisions for a service. *

* The service always has at least minSize provisioned instances. *

* Must be between 1 and 25. *

* Default: 1 *

* @return {@code this} * @param minSize The minimum number of instances that App Runner provisions for a service. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder minSize(final java.lang.Number minSize) { this.props().minSize(minSize); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration build() { return new software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfiguration( this.scope, this.id, this.props != null ? this.props.build() : null ); } private software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfigurationProps.Builder props() { if (this.props == null) { this.props = new software.amazon.awscdk.services.apprunner.alpha.AutoScalingConfigurationProps.Builder(); } return this.props; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy