Class: AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentCapacitySizeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_inference_component.rb

Overview

Specifies the type and size of the endpoint capacity to activate for a rolling deployment or a rollback strategy.

You can specify your batches as either of the following:

  • A count of inference component copies
  • The overall percentage or your fleet

For a rollback strategy, if you don't specify the fields in this object, or if you set the Value parameter to 100%, then SageMaker AI uses a blue/green rollback strategy and rolls all traffic back to the blue fleet.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, value:) ⇒ InferenceComponentCapacitySizeProperty

Returns a new instance of InferenceComponentCapacitySizeProperty.

Parameters:

  • type (String)

    Specifies the endpoint capacity type.

  • value (Numeric)

    Defines the capacity size, either as a number of inference component copies or a capacity percentage.



792
793
794
795
796
797
# File 'sagemaker/cfn_inference_component.rb', line 792

def initialize(type:, value:)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value")
end

Instance Attribute Details

#typeString (readonly)

Specifies the endpoint capacity type.

  • COPY_COUNT - The endpoint activates based on the number of inference component copies.
  • CAPACITY_PERCENT - The endpoint activates based on the specified percentage of capacity.


806
807
808
# File 'sagemaker/cfn_inference_component.rb', line 806

def type
  @type
end

#valueNumeric (readonly)

Defines the capacity size, either as a number of inference component copies or a capacity percentage.



811
812
813
# File 'sagemaker/cfn_inference_component.rb', line 811

def value
  @value
end

Class Method Details

.jsii_propertiesObject



813
814
815
816
817
818
# File 'sagemaker/cfn_inference_component.rb', line 813

def self.jsii_properties
  {
    :type => "type",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



820
821
822
823
824
825
826
827
# File 'sagemaker/cfn_inference_component.rb', line 820

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "value" => @value,
  })
  result.compact
end