{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-instance-agent-command-execution-schema.json",
  "title": "InstanceAgentCommandExecution",
  "description": "A command's execution summary.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-computeinstanceagent-api-openapi.yml#/components/schemas/InstanceAgentCommandExecution",
  "properties": {
    "content": {
      "$ref": "#/$defs/InstanceAgentCommandExecutionOutputContent"
    },
    "deliveryState": {
      "description": "Specifies the command delivery state.\n * `VISIBLE` - The command is visible to instance.\n * `PENDING` - The command is pending ack from the instance.\n * `ACKED` - The command has been received and acked by the instance.\n * `ACKED_CANCELED` - The canceled command has been received and acked by the instance.\n * `EXPIRED` - The instance has not requested for commands and its delivery has expired.\n",
      "enum": [
        "VISIBLE",
        "PENDING",
        "ACKED",
        "ACKED_CANCELED",
        "EXPIRED"
      ],
      "type": "string"
    },
    "displayName": {
      "description": "The user friendly display name of the command.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "instanceAgentCommandId": {
      "description": "The OCID of the command",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "instanceId": {
      "description": "The OCID of the instance",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleState": {
      "description": "command execution life cycle state.\n* `ACCEPTED` - The command execution has been accepted to run.\n* `IN_PROGRESS` - The command execution is in progress.\n* `SUCCEEDED` - The command execution is successful.\n* `FAILED` - The command execution has failed.\n* `TIMED_OUT` - The command execution has timedout.\n* `CANCELED` - The command execution has canceled.\n",
      "enum": [
        "ACCEPTED",
        "IN_PROGRESS",
        "SUCCEEDED",
        "FAILED",
        "TIMED_OUT",
        "CANCELED"
      ],
      "type": "string"
    },
    "sequenceNumber": {
      "description": "The large non-consecutive number that Run Command Service assigns to each created command.",
      "format": "int64",
      "type": "integer"
    },
    "timeCreated": {
      "description": "The command creation date",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The command last updated at date.",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "instanceAgentCommandId",
    "instanceId",
    "deliveryState",
    "lifecycleState",
    "content",
    "timeCreated",
    "timeUpdated",
    "sequenceNumber"
  ],
  "type": "object",
  "$defs": {
    "InstanceAgentCommandExecutionOutputContent": {
      "description": "The execution output from a command.",
      "properties": {
        "exitCode": {
          "default": 0,
          "description": "The exit code for the command. Exit code `0` indicates success.",
          "type": "integer"
        },
        "message": {
          "description": "An optional status message that Oracle Cloud Agent can populate for additional troubleshooting.\n",
          "maxLength": 255,
          "type": "string"
        },
        "outputType": {
          "description": "The output destination type for the command. The following values are supported:\n\n- TEXT - the command output is returned as plain text.\n- OBJECT_STORAGE_URI - the command output is saved to an Object Storage URL.\n- OBJECT_STORAGE_TUPLE - the command output is saved to an Object Storage bucket.\n\nFor background information about Object Storage buckets and URLs, see\n[Overview of Object Storage](/Content/Object/Concepts/objectstorageoverview.htm).\n",
          "enum": [
            "TEXT",
            "OBJECT_STORAGE_URI",
            "OBJECT_STORAGE_TUPLE"
          ],
          "type": "string"
        }
      },
      "required": [
        "outputType",
        "exitCode"
      ],
      "type": "object"
    }
  }
}