Class ScalableInstanceCount
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.applicationautoscaling.BaseScalableAttribute
software.amazon.awscdk.services.sagemaker.alpha.ScalableInstanceCount
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:19.196Z")
@Stability(Experimental)
public class ScalableInstanceCount
extends BaseScalableAttribute
(experimental) A scalable sagemaker endpoint attribute.
Example:
import software.amazon.awscdk.services.sagemaker.alpha.*; Model model; String variantName = "my-variant"; EndpointConfig endpointConfig = EndpointConfig.Builder.create(this, "EndpointConfig") .instanceProductionVariants(List.of(InstanceProductionVariantProps.builder() .model(model) .variantName(variantName) .build())) .build(); Endpoint endpoint = Endpoint.Builder.create(this, "Endpoint").endpointConfig(endpointConfig).build(); IEndpointInstanceProductionVariant productionVariant = endpoint.findInstanceProductionVariant(variantName); ScalableInstanceCount instanceCount = productionVariant.autoScaleInstanceCount(EnableScalingProps.builder() .maxCapacity(3) .build()); instanceCount.scaleOnInvocations("LimitRPS", InvocationsScalingProps.builder() .maxRequestsPerSecond(30) .build());
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forScalableInstanceCount
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
ScalableInstanceCount
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ScalableInstanceCount
(software.amazon.jsii.JsiiObjectRef objRef) ScalableInstanceCount
(software.constructs.Construct scope, String id, ScalableInstanceCountProps props) (experimental) Constructs a new instance of the ScalableInstanceCount class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
scaleOnInvocations
(String id, InvocationsScalingProps props) (experimental) Scales in or out to achieve a target requests per second per instance.Methods inherited from class software.amazon.awscdk.services.applicationautoscaling.BaseScalableAttribute
doScaleOnMetric, doScaleOnSchedule, doScaleToTrackMetric, getProps
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ScalableInstanceCount
protected ScalableInstanceCount(software.amazon.jsii.JsiiObjectRef objRef) -
ScalableInstanceCount
protected ScalableInstanceCount(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ScalableInstanceCount
@Stability(Experimental) public ScalableInstanceCount(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ScalableInstanceCountProps props) (experimental) Constructs a new instance of the ScalableInstanceCount class.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
scaleOnInvocations
@Stability(Experimental) public void scaleOnInvocations(@NotNull String id, @NotNull InvocationsScalingProps props) (experimental) Scales in or out to achieve a target requests per second per instance.- Parameters:
id
- This parameter is required.props
- This parameter is required.
-