Class ScalableInstanceCount
(experimental) A scalable sagemaker endpoint attribute.
Inherited Members
Namespace: Amazon.CDK.AWS.Sagemaker.Alpha
Assembly: Amazon.CDK.AWS.Sagemaker.Alpha.dll
Syntax (csharp)
public class ScalableInstanceCount : BaseScalableAttribute
Syntax (vb)
Public Class ScalableInstanceCount
Inherits BaseScalableAttribute
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Sagemaker.Alpha;
Model model;
var variantName = "my-variant";
var endpointConfig = new EndpointConfig(this, "EndpointConfig", new EndpointConfigProps {
InstanceProductionVariants = new [] { new InstanceProductionVariantProps {
Model = model,
VariantName = variantName
} }
});
var endpoint = new Endpoint(this, "Endpoint", new EndpointProps { EndpointConfig = endpointConfig });
var productionVariant = endpoint.FindInstanceProductionVariant(variantName);
var instanceCount = productionVariant.AutoScaleInstanceCount(new EnableScalingProps {
MaxCapacity = 3
});
instanceCount.ScaleOnInvocations("LimitRPS", new InvocationsScalingProps {
MaxRequestsPerSecond = 30
});
Synopsis
Constructors
Scalable |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Scalable |
Used by jsii to construct an instance of this class from DeputyProps |
Scalable |
(experimental) Constructs a new instance of the ScalableInstanceCount class. |
Methods
Scale |
(experimental) Scales in or out to achieve a target requests per second per instance. |
Constructors
ScalableInstanceCount(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ScalableInstanceCount(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
ScalableInstanceCount(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ScalableInstanceCount(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
ScalableInstanceCount(Construct, String, IScalableInstanceCountProps)
(experimental) Constructs a new instance of the ScalableInstanceCount class.
public ScalableInstanceCount(Construct scope, string id, IScalableInstanceCountProps props)
Parameters
- scope Constructs.
Construct - id System.
String - props IScalable
Instance Count Props
Remarks
Stability: Experimental
Methods
ScaleOnInvocations(String, IInvocationsScalingProps)
(experimental) Scales in or out to achieve a target requests per second per instance.
public virtual void ScaleOnInvocations(string id, IInvocationsScalingProps props)
Parameters
- id System.
String - props IInvocations
Scaling Props
Remarks
Stability: Experimental