Class: AWSCDK::Sagemaker::CfnEndpoint::CapacitySizeProperty

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

Overview

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

You can specify your batches as either instance count or 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 to 100%, then SageMaker 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:) ⇒ CapacitySizeProperty

Returns a new instance of CapacitySizeProperty.

Parameters:

  • type (String)

    Specifies the endpoint capacity type.

  • value (Numeric)

    Defines the capacity size, either as a number of instances or a capacity percentage.



744
745
746
747
748
749
# File 'sagemaker/cfn_endpoint.rb', line 744

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.

  • INSTANCE_COUNT : The endpoint activates based on the number of instances.
  • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.


758
759
760
# File 'sagemaker/cfn_endpoint.rb', line 758

def type
  @type
end

#valueNumeric (readonly)

Defines the capacity size, either as a number of instances or a capacity percentage.



763
764
765
# File 'sagemaker/cfn_endpoint.rb', line 763

def value
  @value
end

Class Method Details

.jsii_propertiesObject



765
766
767
768
769
770
# File 'sagemaker/cfn_endpoint.rb', line 765

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

Instance Method Details

#to_jsiiObject



772
773
774
775
776
777
778
779
# File 'sagemaker/cfn_endpoint.rb', line 772

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