/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

Defines the traffic routing strategy during an endpoint deployment to shift * traffic from the old fleet to the new fleet.

See Also:

AWS * API Reference

*/ class TrafficRoutingConfig { public: AWS_SAGEMAKER_API TrafficRoutingConfig(); AWS_SAGEMAKER_API TrafficRoutingConfig(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API TrafficRoutingConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Traffic routing strategy type.

  • ALL_AT_ONCE: * Endpoint traffic shifts to the new fleet in a single step.

  • * CANARY: Endpoint traffic shifts to the new fleet in two steps. The * first step is the canary, which is a small portion of the traffic. The second * step is the remainder of the traffic.

  • LINEAR: * Endpoint traffic shifts to the new fleet in n steps of a configurable size.

    *
*/ inline const TrafficRoutingConfigType& GetType() const{ return m_type; } /** *

Traffic routing strategy type.

  • ALL_AT_ONCE: * Endpoint traffic shifts to the new fleet in a single step.

  • * CANARY: Endpoint traffic shifts to the new fleet in two steps. The * first step is the canary, which is a small portion of the traffic. The second * step is the remainder of the traffic.

  • LINEAR: * Endpoint traffic shifts to the new fleet in n steps of a configurable size.

    *
*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Traffic routing strategy type.

  • ALL_AT_ONCE: * Endpoint traffic shifts to the new fleet in a single step.

  • * CANARY: Endpoint traffic shifts to the new fleet in two steps. The * first step is the canary, which is a small portion of the traffic. The second * step is the remainder of the traffic.

  • LINEAR: * Endpoint traffic shifts to the new fleet in n steps of a configurable size.

    *
*/ inline void SetType(const TrafficRoutingConfigType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Traffic routing strategy type.

  • ALL_AT_ONCE: * Endpoint traffic shifts to the new fleet in a single step.

  • * CANARY: Endpoint traffic shifts to the new fleet in two steps. The * first step is the canary, which is a small portion of the traffic. The second * step is the remainder of the traffic.

  • LINEAR: * Endpoint traffic shifts to the new fleet in n steps of a configurable size.

    *
*/ inline void SetType(TrafficRoutingConfigType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Traffic routing strategy type.

  • ALL_AT_ONCE: * Endpoint traffic shifts to the new fleet in a single step.

  • * CANARY: Endpoint traffic shifts to the new fleet in two steps. The * first step is the canary, which is a small portion of the traffic. The second * step is the remainder of the traffic.

  • LINEAR: * Endpoint traffic shifts to the new fleet in n steps of a configurable size.

    *
*/ inline TrafficRoutingConfig& WithType(const TrafficRoutingConfigType& value) { SetType(value); return *this;} /** *

Traffic routing strategy type.

  • ALL_AT_ONCE: * Endpoint traffic shifts to the new fleet in a single step.

  • * CANARY: Endpoint traffic shifts to the new fleet in two steps. The * first step is the canary, which is a small portion of the traffic. The second * step is the remainder of the traffic.

  • LINEAR: * Endpoint traffic shifts to the new fleet in n steps of a configurable size.

    *
*/ inline TrafficRoutingConfig& WithType(TrafficRoutingConfigType&& value) { SetType(std::move(value)); return *this;} /** *

The waiting time (in seconds) between incremental steps to turn on traffic on * the new endpoint fleet.

*/ inline int GetWaitIntervalInSeconds() const{ return m_waitIntervalInSeconds; } /** *

The waiting time (in seconds) between incremental steps to turn on traffic on * the new endpoint fleet.

*/ inline bool WaitIntervalInSecondsHasBeenSet() const { return m_waitIntervalInSecondsHasBeenSet; } /** *

The waiting time (in seconds) between incremental steps to turn on traffic on * the new endpoint fleet.

*/ inline void SetWaitIntervalInSeconds(int value) { m_waitIntervalInSecondsHasBeenSet = true; m_waitIntervalInSeconds = value; } /** *

The waiting time (in seconds) between incremental steps to turn on traffic on * the new endpoint fleet.

*/ inline TrafficRoutingConfig& WithWaitIntervalInSeconds(int value) { SetWaitIntervalInSeconds(value); return *this;} /** *

Batch size for the first step to turn on traffic on the new endpoint fleet. * Value must be less than or equal to 50% of the variant's total * instance count.

*/ inline const CapacitySize& GetCanarySize() const{ return m_canarySize; } /** *

Batch size for the first step to turn on traffic on the new endpoint fleet. * Value must be less than or equal to 50% of the variant's total * instance count.

*/ inline bool CanarySizeHasBeenSet() const { return m_canarySizeHasBeenSet; } /** *

Batch size for the first step to turn on traffic on the new endpoint fleet. * Value must be less than or equal to 50% of the variant's total * instance count.

*/ inline void SetCanarySize(const CapacitySize& value) { m_canarySizeHasBeenSet = true; m_canarySize = value; } /** *

Batch size for the first step to turn on traffic on the new endpoint fleet. * Value must be less than or equal to 50% of the variant's total * instance count.

*/ inline void SetCanarySize(CapacitySize&& value) { m_canarySizeHasBeenSet = true; m_canarySize = std::move(value); } /** *

Batch size for the first step to turn on traffic on the new endpoint fleet. * Value must be less than or equal to 50% of the variant's total * instance count.

*/ inline TrafficRoutingConfig& WithCanarySize(const CapacitySize& value) { SetCanarySize(value); return *this;} /** *

Batch size for the first step to turn on traffic on the new endpoint fleet. * Value must be less than or equal to 50% of the variant's total * instance count.

*/ inline TrafficRoutingConfig& WithCanarySize(CapacitySize&& value) { SetCanarySize(std::move(value)); return *this;} /** *

Batch size for each step to turn on traffic on the new endpoint fleet. * Value must be 10-50% of the variant's total instance count.

*/ inline const CapacitySize& GetLinearStepSize() const{ return m_linearStepSize; } /** *

Batch size for each step to turn on traffic on the new endpoint fleet. * Value must be 10-50% of the variant's total instance count.

*/ inline bool LinearStepSizeHasBeenSet() const { return m_linearStepSizeHasBeenSet; } /** *

Batch size for each step to turn on traffic on the new endpoint fleet. * Value must be 10-50% of the variant's total instance count.

*/ inline void SetLinearStepSize(const CapacitySize& value) { m_linearStepSizeHasBeenSet = true; m_linearStepSize = value; } /** *

Batch size for each step to turn on traffic on the new endpoint fleet. * Value must be 10-50% of the variant's total instance count.

*/ inline void SetLinearStepSize(CapacitySize&& value) { m_linearStepSizeHasBeenSet = true; m_linearStepSize = std::move(value); } /** *

Batch size for each step to turn on traffic on the new endpoint fleet. * Value must be 10-50% of the variant's total instance count.

*/ inline TrafficRoutingConfig& WithLinearStepSize(const CapacitySize& value) { SetLinearStepSize(value); return *this;} /** *

Batch size for each step to turn on traffic on the new endpoint fleet. * Value must be 10-50% of the variant's total instance count.

*/ inline TrafficRoutingConfig& WithLinearStepSize(CapacitySize&& value) { SetLinearStepSize(std::move(value)); return *this;} private: TrafficRoutingConfigType m_type; bool m_typeHasBeenSet = false; int m_waitIntervalInSeconds; bool m_waitIntervalInSecondsHasBeenSet = false; CapacitySize m_canarySize; bool m_canarySizeHasBeenSet = false; CapacitySize m_linearStepSize; bool m_linearStepSizeHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws