Class: AWSCDK::Sagemaker::CfnEndpoint::BlueGreenUpdatePolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Sagemaker::CfnEndpoint::BlueGreenUpdatePolicyProperty
- Defined in:
- sagemaker/cfn_endpoint.rb
Overview
Update policy for a blue/green deployment.
If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default.
Instance Attribute Summary collapse
-
#maximum_execution_timeout_in_seconds ⇒ Numeric?
readonly
Maximum execution timeout for the deployment.
-
#termination_wait_in_seconds ⇒ Numeric?
readonly
Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet.
-
#traffic_routing_configuration ⇒ AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnEndpoint::TrafficRoutingConfigProperty
readonly
Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(traffic_routing_configuration:, maximum_execution_timeout_in_seconds: nil, termination_wait_in_seconds: nil) ⇒ BlueGreenUpdatePolicyProperty
constructor
A new instance of BlueGreenUpdatePolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(traffic_routing_configuration:, maximum_execution_timeout_in_seconds: nil, termination_wait_in_seconds: nil) ⇒ BlueGreenUpdatePolicyProperty
Returns a new instance of BlueGreenUpdatePolicyProperty.
684 685 686 687 688 689 690 691 |
# File 'sagemaker/cfn_endpoint.rb', line 684 def initialize(traffic_routing_configuration:, maximum_execution_timeout_in_seconds: nil, termination_wait_in_seconds: nil) @traffic_routing_configuration = traffic_routing_configuration.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpoint::TrafficRoutingConfigProperty.new(**traffic_routing_configuration.transform_keys(&:to_sym)) : traffic_routing_configuration Jsii::Type.check_type(@traffic_routing_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnQuVHJhZmZpY1JvdXRpbmdDb25maWdQcm9wZXJ0eSJ9XX19")), "trafficRoutingConfiguration") @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? @termination_wait_in_seconds = termination_wait_in_seconds Jsii::Type.check_type(@termination_wait_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "terminationWaitInSeconds") unless @termination_wait_in_seconds.nil? end |
Instance Attribute Details
#maximum_execution_timeout_in_seconds ⇒ Numeric? (readonly)
Maximum execution timeout for the deployment.
Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds .
704 705 706 |
# File 'sagemaker/cfn_endpoint.rb', line 704 def maximum_execution_timeout_in_seconds @maximum_execution_timeout_in_seconds end |
#termination_wait_in_seconds ⇒ Numeric? (readonly)
Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet.
Default is 0.
711 712 713 |
# File 'sagemaker/cfn_endpoint.rb', line 711 def termination_wait_in_seconds @termination_wait_in_seconds end |
#traffic_routing_configuration ⇒ AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnEndpoint::TrafficRoutingConfigProperty (readonly)
Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.
697 698 699 |
# File 'sagemaker/cfn_endpoint.rb', line 697 def traffic_routing_configuration @traffic_routing_configuration end |
Class Method Details
.jsii_properties ⇒ Object
713 714 715 716 717 718 719 |
# File 'sagemaker/cfn_endpoint.rb', line 713 def self.jsii_properties { :traffic_routing_configuration => "trafficRoutingConfiguration", :maximum_execution_timeout_in_seconds => "maximumExecutionTimeoutInSeconds", :termination_wait_in_seconds => "terminationWaitInSeconds", } end |
Instance Method Details
#to_jsii ⇒ Object
721 722 723 724 725 726 727 728 729 |
# File 'sagemaker/cfn_endpoint.rb', line 721 def to_jsii result = {} result.merge!({ "trafficRoutingConfiguration" => @traffic_routing_configuration, "maximumExecutionTimeoutInSeconds" => @maximum_execution_timeout_in_seconds, "terminationWaitInSeconds" => @termination_wait_in_seconds, }) result.compact end |