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

The retry strategy to use when a training job fails due to an * InternalServerError. RetryStrategy is specified as * part of the CreateTrainingJob and * CreateHyperParameterTuningJob requests. You can add the * StoppingCondition parameter to the request to limit the training * time for the complete job.

See Also:

AWS * API Reference

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

The number of times to retry the job. When the job is retried, it's * SecondaryStatus is changed to STARTING.

*/ inline int GetMaximumRetryAttempts() const{ return m_maximumRetryAttempts; } /** *

The number of times to retry the job. When the job is retried, it's * SecondaryStatus is changed to STARTING.

*/ inline bool MaximumRetryAttemptsHasBeenSet() const { return m_maximumRetryAttemptsHasBeenSet; } /** *

The number of times to retry the job. When the job is retried, it's * SecondaryStatus is changed to STARTING.

*/ inline void SetMaximumRetryAttempts(int value) { m_maximumRetryAttemptsHasBeenSet = true; m_maximumRetryAttempts = value; } /** *

The number of times to retry the job. When the job is retried, it's * SecondaryStatus is changed to STARTING.

*/ inline RetryStrategy& WithMaximumRetryAttempts(int value) { SetMaximumRetryAttempts(value); return *this;} private: int m_maximumRetryAttempts; bool m_maximumRetryAttemptsHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws