/** * 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 Transfer { namespace Model { /** *

Specifies the error message and type, for an error that occurs during the * execution of the workflow.

See Also:

AWS * API Reference

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

Specifies the error type.

  • ALREADY_EXISTS: * occurs for a copy step, if the overwrite option is not selected and a file with * the same name already exists in the target location.

  • * BAD_REQUEST: a general bad request: for example, a step that * attempts to tag an EFS file returns BAD_REQUEST, as only S3 files * can be tagged.

  • CUSTOM_STEP_FAILED: occurs when * the custom step provided a callback that indicates failure.

  • * INTERNAL_SERVER_ERROR: a catch-all error that can occur for a * variety of reasons.

  • NOT_FOUND: occurs when a * requested entity, for example a source file for a copy step, does not exist.

    *
  • PERMISSION_DENIED: occurs if your policy does not * contain the correct permissions to complete one or more of the steps in the * workflow.

  • TIMEOUT: occurs when the execution * times out.

    You can set the TimeoutSeconds for a * custom step, anywhere from 1 second to 1800 seconds (30 minutes).

    *
  • THROTTLED: occurs if you exceed the new execution * refill rate of one workflow per second.

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

Specifies the error type.

  • ALREADY_EXISTS: * occurs for a copy step, if the overwrite option is not selected and a file with * the same name already exists in the target location.

  • * BAD_REQUEST: a general bad request: for example, a step that * attempts to tag an EFS file returns BAD_REQUEST, as only S3 files * can be tagged.

  • CUSTOM_STEP_FAILED: occurs when * the custom step provided a callback that indicates failure.

  • * INTERNAL_SERVER_ERROR: a catch-all error that can occur for a * variety of reasons.

  • NOT_FOUND: occurs when a * requested entity, for example a source file for a copy step, does not exist.

    *
  • PERMISSION_DENIED: occurs if your policy does not * contain the correct permissions to complete one or more of the steps in the * workflow.

  • TIMEOUT: occurs when the execution * times out.

    You can set the TimeoutSeconds for a * custom step, anywhere from 1 second to 1800 seconds (30 minutes).

    *
  • THROTTLED: occurs if you exceed the new execution * refill rate of one workflow per second.

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

Specifies the error type.

  • ALREADY_EXISTS: * occurs for a copy step, if the overwrite option is not selected and a file with * the same name already exists in the target location.

  • * BAD_REQUEST: a general bad request: for example, a step that * attempts to tag an EFS file returns BAD_REQUEST, as only S3 files * can be tagged.

  • CUSTOM_STEP_FAILED: occurs when * the custom step provided a callback that indicates failure.

  • * INTERNAL_SERVER_ERROR: a catch-all error that can occur for a * variety of reasons.

  • NOT_FOUND: occurs when a * requested entity, for example a source file for a copy step, does not exist.

    *
  • PERMISSION_DENIED: occurs if your policy does not * contain the correct permissions to complete one or more of the steps in the * workflow.

  • TIMEOUT: occurs when the execution * times out.

    You can set the TimeoutSeconds for a * custom step, anywhere from 1 second to 1800 seconds (30 minutes).

    *
  • THROTTLED: occurs if you exceed the new execution * refill rate of one workflow per second.

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

Specifies the error type.

  • ALREADY_EXISTS: * occurs for a copy step, if the overwrite option is not selected and a file with * the same name already exists in the target location.

  • * BAD_REQUEST: a general bad request: for example, a step that * attempts to tag an EFS file returns BAD_REQUEST, as only S3 files * can be tagged.

  • CUSTOM_STEP_FAILED: occurs when * the custom step provided a callback that indicates failure.

  • * INTERNAL_SERVER_ERROR: a catch-all error that can occur for a * variety of reasons.

  • NOT_FOUND: occurs when a * requested entity, for example a source file for a copy step, does not exist.

    *
  • PERMISSION_DENIED: occurs if your policy does not * contain the correct permissions to complete one or more of the steps in the * workflow.

  • TIMEOUT: occurs when the execution * times out.

    You can set the TimeoutSeconds for a * custom step, anywhere from 1 second to 1800 seconds (30 minutes).

    *
  • THROTTLED: occurs if you exceed the new execution * refill rate of one workflow per second.

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

Specifies the error type.

  • ALREADY_EXISTS: * occurs for a copy step, if the overwrite option is not selected and a file with * the same name already exists in the target location.

  • * BAD_REQUEST: a general bad request: for example, a step that * attempts to tag an EFS file returns BAD_REQUEST, as only S3 files * can be tagged.

  • CUSTOM_STEP_FAILED: occurs when * the custom step provided a callback that indicates failure.

  • * INTERNAL_SERVER_ERROR: a catch-all error that can occur for a * variety of reasons.

  • NOT_FOUND: occurs when a * requested entity, for example a source file for a copy step, does not exist.

    *
  • PERMISSION_DENIED: occurs if your policy does not * contain the correct permissions to complete one or more of the steps in the * workflow.

  • TIMEOUT: occurs when the execution * times out.

    You can set the TimeoutSeconds for a * custom step, anywhere from 1 second to 1800 seconds (30 minutes).

    *
  • THROTTLED: occurs if you exceed the new execution * refill rate of one workflow per second.

*/ inline ExecutionError& WithType(const ExecutionErrorType& value) { SetType(value); return *this;} /** *

Specifies the error type.

  • ALREADY_EXISTS: * occurs for a copy step, if the overwrite option is not selected and a file with * the same name already exists in the target location.

  • * BAD_REQUEST: a general bad request: for example, a step that * attempts to tag an EFS file returns BAD_REQUEST, as only S3 files * can be tagged.

  • CUSTOM_STEP_FAILED: occurs when * the custom step provided a callback that indicates failure.

  • * INTERNAL_SERVER_ERROR: a catch-all error that can occur for a * variety of reasons.

  • NOT_FOUND: occurs when a * requested entity, for example a source file for a copy step, does not exist.

    *
  • PERMISSION_DENIED: occurs if your policy does not * contain the correct permissions to complete one or more of the steps in the * workflow.

  • TIMEOUT: occurs when the execution * times out.

    You can set the TimeoutSeconds for a * custom step, anywhere from 1 second to 1800 seconds (30 minutes).

    *
  • THROTTLED: occurs if you exceed the new execution * refill rate of one workflow per second.

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

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline ExecutionError& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline ExecutionError& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

Specifies the descriptive message that corresponds to the * ErrorType.

*/ inline ExecutionError& WithMessage(const char* value) { SetMessage(value); return *this;} private: ExecutionErrorType m_type; bool m_typeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace Transfer } // namespace Aws