{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-instance-agent-command-schema.json",
  "title": "InstanceAgentCommand",
  "description": "The command payload.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-computeinstanceagent-api-openapi.yml#/components/schemas/InstanceAgentCommand",
  "properties": {
    "compartmentId": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment containing the command.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "content": {
      "$ref": "#/$defs/InstanceAgentCommandContent",
      "description": "The contents of the command."
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique. Avoid entering confidential information.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "executionTimeOutInSeconds": {
      "description": "The amount of time that Oracle Cloud Agent is given to run the command on the instance before timing\nout. The timer starts when Oracle Cloud Agent starts the command. Zero means no timeout.\n",
      "maximum": 86400,
      "minimum": 0,
      "type": "integer"
    },
    "id": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the command.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "isCanceled": {
      "default": false,
      "description": "Whether a request was made to cancel the command. Canceling a command is a best-effort attempt.",
      "type": "boolean"
    },
    "target": {
      "$ref": "#/$defs/InstanceAgentCommandTarget",
      "description": "The target instance that the command runs on."
    },
    "timeCreated": {
      "description": "The date and time the command was created, in the format defined by\n[RFC3339](https://tools.ietf.org/html/rfc3339).\n",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The date and time the command was last updated, in the format defined by\n[RFC3339](https://tools.ietf.org/html/rfc3339).\n",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "compartmentId",
    "target",
    "content"
  ],
  "type": "object",
  "$defs": {
    "InstanceAgentCommandContent": {
      "description": "The contents of the command.",
      "properties": {
        "output": {
          "$ref": "#/$defs/InstanceAgentCommandOutputDetails",
          "description": "The output destination for the command."
        },
        "source": {
          "$ref": "#/$defs/InstanceAgentCommandSourceDetails",
          "description": "The source of the command."
        }
      },
      "required": [
        "source"
      ],
      "type": "object"
    },
    "InstanceAgentCommandOutputDetails": {
      "description": "The output destination for the command.",
      "properties": {
        "outputType": {
          "default": "TEXT",
          "description": "The output 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"
      ],
      "type": "object"
    },
    "InstanceAgentCommandSourceDetails": {
      "description": "The source of the command.",
      "properties": {
        "sourceType": {
          "default": "TEXT",
          "description": "The source type for the command. The following values are supported:\n\n- `TEXT` - uses a plain text command that is specified inline with the request.\n- `OBJECT_STORAGE_URI` - imports a command from an Object Storage URL.\n- `OBJECT_STORAGE_TUPLE` - imports a command from 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": [
        "sourceType"
      ],
      "type": "object"
    },
    "InstanceAgentCommandTarget": {
      "description": "The target instance that the command runs on.",
      "properties": {
        "instanceId": {
          "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the target instance.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}