{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-lambda/json-schema/aws-lambda-get-durable-execution-response-schema.json",
  "title": "GetDurableExecutionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-lambda-operations-api-openapi.yml#/components/schemas/GetDurableExecutionResponse",
  "type": "object",
  "properties": {
    "DurableExecutionArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the durable execution."
    },
    "DurableExecutionName": {
      "type": "string",
      "description": "The name of the durable execution. This is either the name you provided when invoking the function, or a system-generated unique identifier if no name was provided."
    },
    "FunctionArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the Lambda function that was invoked to start this durable execution."
    },
    "InputPayload": {
      "type": "string",
      "description": "The JSON input payload that you provided when you started the durable execution. Asynchronous invocations support up to 1 MB, and synchronous invocations support up to 6 MB."
    },
    "Result": {
      "type": "string",
      "description": "The JSON result returned by the durable execution if it completed successfully. This field is only present when the execution status is SUCCEEDED. Asynchronous invocations support up to 1 MB, and synchronous invocations support up to 6 MB."
    },
    "Error": {
      "$ref": "#/$defs/ErrorObject"
    },
    "StartTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the durable execution started, in Unix timestamp format."
    },
    "Status": {
      "type": "string",
      "enum": [
        "RUNNING",
        "SUCCEEDED",
        "FAILED",
        "TIMED_OUT",
        "STOPPED"
      ],
      "description": "The current status of the durable execution. Valid values are RUNNING, SUCCEEDED, FAILED, TIMED_OUT, and STOPPED."
    },
    "EndTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the durable execution ended, in Unix timestamp format. This field is only present if the execution has completed (status is SUCCEEDED, FAILED, TIMED_OUT, or STOPPED)."
    },
    "Version": {
      "type": "string",
      "description": "The version of the Lambda function that was invoked for this durable execution. This ensures that all replays during the execution use the same function version."
    },
    "TraceHeader": {
      "$ref": "#/$defs/TraceHeader"
    },
    "ExecutionDataIncluded": {
      "type": "boolean",
      "description": "Indicates whether execution data is included in this response. Returns false when IncludeExecutionData is set to false in the request."
    },
    "DurableConfig": {
      "$ref": "#/$defs/DurableConfig"
    }
  },
  "required": [
    "DurableExecutionArn",
    "DurableExecutionName",
    "FunctionArn",
    "StartTimestamp",
    "Status"
  ],
  "$defs": {
    "DurableConfig": {
      "type": "object",
      "properties": {
        "KMSKeyArn": {
          "type": "string",
          "description": "The ARN of the Key Management Service (KMS) customer managed key that is used to encrypt your durable execution's payload data, including input, output, and error payloads."
        },
        "RetentionPeriodInDays": {
          "type": "integer",
          "description": "The number of days to retain execution history after a durable execution completes. After this period, execution history is no longer available through the GetDurableExecutionHistory API."
        },
        "ExecutionTimeout": {
          "type": "integer",
          "description": "The maximum time (in seconds) that a durable execution can run before timing out. This timeout applies to the entire durable execution, not individual function invocations."
        }
      }
    },
    "ErrorObject": {
      "type": "object",
      "properties": {
        "ErrorMessage": {
          "type": "string",
          "description": "A human-readable error message."
        },
        "ErrorType": {
          "type": "string",
          "description": "The error type."
        },
        "ErrorData": {
          "type": "string",
          "description": "Machine-readable error data."
        },
        "StackTrace": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Stack trace information for the error."
        }
      }
    },
    "TraceHeader": {
      "type": "object",
      "properties": {
        "XAmznTraceId": {
          "type": "string",
          "description": "The X-Ray trace header associated with the durable execution."
        }
      }
    }
  }
}