Class: AWSCDK::Sagemaker::CfnEndpoint::RollingUpdatePolicyProperty

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

Overview

Specifies a rolling deployment strategy for updating a SageMaker endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(maximum_batch_size:, wait_interval_in_seconds:, maximum_execution_timeout_in_seconds: nil, rollback_maximum_batch_size: nil) ⇒ RollingUpdatePolicyProperty

Returns a new instance of RollingUpdatePolicyProperty.

Parameters:



847
848
849
850
851
852
853
854
855
856
# File 'sagemaker/cfn_endpoint.rb', line 847

def initialize(maximum_batch_size:, wait_interval_in_seconds:, maximum_execution_timeout_in_seconds: nil, rollback_maximum_batch_size: nil)
  @maximum_batch_size = maximum_batch_size.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpoint::CapacitySizeProperty.new(**maximum_batch_size.transform_keys(&:to_sym)) : maximum_batch_size
  Jsii::Type.check_type(@maximum_batch_size, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnQuQ2FwYWNpdHlTaXplUHJvcGVydHkifV19fQ==")), "maximumBatchSize")
  @wait_interval_in_seconds = wait_interval_in_seconds
  Jsii::Type.check_type(@wait_interval_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "waitIntervalInSeconds")
  @maximum_execution_timeout_in_seconds = maximum_execution_timeout_in_seconds
  Jsii::Type.check_type(@maximum_execution_timeout_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumExecutionTimeoutInSeconds") unless @maximum_execution_timeout_in_seconds.nil?
  @rollback_maximum_batch_size = rollback_maximum_batch_size.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpoint::CapacitySizeProperty.new(**rollback_maximum_batch_size.transform_keys(&:to_sym)) : rollback_maximum_batch_size
  Jsii::Type.check_type(@rollback_maximum_batch_size, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnQuQ2FwYWNpdHlTaXplUHJvcGVydHkifV19fQ==")), "rollbackMaximumBatchSize") unless @rollback_maximum_batch_size.nil?
end

Instance Attribute Details

#maximum_batch_sizeAWSCDK::IResolvable, AWSCDK::Sagemaker::CfnEndpoint::CapacitySizeProperty (readonly)

Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet.

Value must be between 5% to 50% of the variant's total instance count.



864
865
866
# File 'sagemaker/cfn_endpoint.rb', line 864

def maximum_batch_size
  @maximum_batch_size
end

#maximum_execution_timeout_in_secondsNumeric? (readonly)

The time limit for the total deployment.

Exceeding this limit causes a timeout.



876
877
878
# File 'sagemaker/cfn_endpoint.rb', line 876

def maximum_execution_timeout_in_seconds
  @maximum_execution_timeout_in_seconds
end

#rollback_maximum_batch_sizeAWSCDK::IResolvable, ... (readonly)

Batch size for rollback to the old endpoint fleet.

Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.



883
884
885
# File 'sagemaker/cfn_endpoint.rb', line 883

def rollback_maximum_batch_size
  @rollback_maximum_batch_size
end

#wait_interval_in_secondsNumeric (readonly)

The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet.



869
870
871
# File 'sagemaker/cfn_endpoint.rb', line 869

def wait_interval_in_seconds
  @wait_interval_in_seconds
end

Class Method Details

.jsii_propertiesObject



885
886
887
888
889
890
891
892
# File 'sagemaker/cfn_endpoint.rb', line 885

def self.jsii_properties
  {
    :maximum_batch_size => "maximumBatchSize",
    :wait_interval_in_seconds => "waitIntervalInSeconds",
    :maximum_execution_timeout_in_seconds => "maximumExecutionTimeoutInSeconds",
    :rollback_maximum_batch_size => "rollbackMaximumBatchSize",
  }
end

Instance Method Details

#to_jsiiObject



894
895
896
897
898
899
900
901
902
903
# File 'sagemaker/cfn_endpoint.rb', line 894

def to_jsii
  result = {}
  result.merge!({
    "maximumBatchSize" => @maximum_batch_size,
    "waitIntervalInSeconds" => @wait_interval_in_seconds,
    "maximumExecutionTimeoutInSeconds" => @maximum_execution_timeout_in_seconds,
    "rollbackMaximumBatchSize" => @rollback_maximum_batch_size,
  })
  result.compact
end