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

The configuration that specifies how traffic is shifted from one version of a * Lambda function to another version during an Lambda deployment, or from one * Amazon ECS task set to another during an Amazon ECS deployment.

See * Also:

AWS * API Reference

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

The type of traffic shifting (TimeBasedCanary or * TimeBasedLinear) used by a deployment configuration.

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

The type of traffic shifting (TimeBasedCanary or * TimeBasedLinear) used by a deployment configuration.

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

The type of traffic shifting (TimeBasedCanary or * TimeBasedLinear) used by a deployment configuration.

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

The type of traffic shifting (TimeBasedCanary or * TimeBasedLinear) used by a deployment configuration.

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

The type of traffic shifting (TimeBasedCanary or * TimeBasedLinear) used by a deployment configuration.

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

The type of traffic shifting (TimeBasedCanary or * TimeBasedLinear) used by a deployment configuration.

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

A configuration that shifts traffic from one version of a Lambda function or * ECS task set to another in two increments. The original and target Lambda * function versions or ECS task sets are specified in the deployment's AppSpec * file.

*/ inline const TimeBasedCanary& GetTimeBasedCanary() const{ return m_timeBasedCanary; } /** *

A configuration that shifts traffic from one version of a Lambda function or * ECS task set to another in two increments. The original and target Lambda * function versions or ECS task sets are specified in the deployment's AppSpec * file.

*/ inline bool TimeBasedCanaryHasBeenSet() const { return m_timeBasedCanaryHasBeenSet; } /** *

A configuration that shifts traffic from one version of a Lambda function or * ECS task set to another in two increments. The original and target Lambda * function versions or ECS task sets are specified in the deployment's AppSpec * file.

*/ inline void SetTimeBasedCanary(const TimeBasedCanary& value) { m_timeBasedCanaryHasBeenSet = true; m_timeBasedCanary = value; } /** *

A configuration that shifts traffic from one version of a Lambda function or * ECS task set to another in two increments. The original and target Lambda * function versions or ECS task sets are specified in the deployment's AppSpec * file.

*/ inline void SetTimeBasedCanary(TimeBasedCanary&& value) { m_timeBasedCanaryHasBeenSet = true; m_timeBasedCanary = std::move(value); } /** *

A configuration that shifts traffic from one version of a Lambda function or * ECS task set to another in two increments. The original and target Lambda * function versions or ECS task sets are specified in the deployment's AppSpec * file.

*/ inline TrafficRoutingConfig& WithTimeBasedCanary(const TimeBasedCanary& value) { SetTimeBasedCanary(value); return *this;} /** *

A configuration that shifts traffic from one version of a Lambda function or * ECS task set to another in two increments. The original and target Lambda * function versions or ECS task sets are specified in the deployment's AppSpec * file.

*/ inline TrafficRoutingConfig& WithTimeBasedCanary(TimeBasedCanary&& value) { SetTimeBasedCanary(std::move(value)); return *this;} /** *

A configuration that shifts traffic from one version of a Lambda function or * Amazon ECS task set to another in equal increments, with an equal number of * minutes between each increment. The original and target Lambda function versions * or Amazon ECS task sets are specified in the deployment's AppSpec file.

*/ inline const TimeBasedLinear& GetTimeBasedLinear() const{ return m_timeBasedLinear; } /** *

A configuration that shifts traffic from one version of a Lambda function or * Amazon ECS task set to another in equal increments, with an equal number of * minutes between each increment. The original and target Lambda function versions * or Amazon ECS task sets are specified in the deployment's AppSpec file.

*/ inline bool TimeBasedLinearHasBeenSet() const { return m_timeBasedLinearHasBeenSet; } /** *

A configuration that shifts traffic from one version of a Lambda function or * Amazon ECS task set to another in equal increments, with an equal number of * minutes between each increment. The original and target Lambda function versions * or Amazon ECS task sets are specified in the deployment's AppSpec file.

*/ inline void SetTimeBasedLinear(const TimeBasedLinear& value) { m_timeBasedLinearHasBeenSet = true; m_timeBasedLinear = value; } /** *

A configuration that shifts traffic from one version of a Lambda function or * Amazon ECS task set to another in equal increments, with an equal number of * minutes between each increment. The original and target Lambda function versions * or Amazon ECS task sets are specified in the deployment's AppSpec file.

*/ inline void SetTimeBasedLinear(TimeBasedLinear&& value) { m_timeBasedLinearHasBeenSet = true; m_timeBasedLinear = std::move(value); } /** *

A configuration that shifts traffic from one version of a Lambda function or * Amazon ECS task set to another in equal increments, with an equal number of * minutes between each increment. The original and target Lambda function versions * or Amazon ECS task sets are specified in the deployment's AppSpec file.

*/ inline TrafficRoutingConfig& WithTimeBasedLinear(const TimeBasedLinear& value) { SetTimeBasedLinear(value); return *this;} /** *

A configuration that shifts traffic from one version of a Lambda function or * Amazon ECS task set to another in equal increments, with an equal number of * minutes between each increment. The original and target Lambda function versions * or Amazon ECS task sets are specified in the deployment's AppSpec file.

*/ inline TrafficRoutingConfig& WithTimeBasedLinear(TimeBasedLinear&& value) { SetTimeBasedLinear(std::move(value)); return *this;} private: TrafficRoutingType m_type; bool m_typeHasBeenSet = false; TimeBasedCanary m_timeBasedCanary; bool m_timeBasedCanaryHasBeenSet = false; TimeBasedLinear m_timeBasedLinear; bool m_timeBasedLinearHasBeenSet = false; }; } // namespace Model } // namespace CodeDeploy } // namespace Aws