{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-create-instance-agent-command-details-schema.json",
  "title": "CreateInstanceAgentCommandDetails",
  "description": "Creation details for an Oracle Cloud Agent command.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-computeinstanceagent-api-openapi.yml#/components/schemas/CreateInstanceAgentCommandDetails",
  "properties": {
    "compartmentId": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment to create the command in.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "content": {
      "$ref": "#/$defs/InstanceAgentCommandContent",
      "description": "The contents of the command."
    },
    "displayName": {
      "description": "A user-friendly name for the command. It does not have to be unique.\nAvoid entering confidential information.\n\nExample: `Database Backup Script`\n",
      "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"
    },
    "target": {
      "$ref": "#/$defs/InstanceAgentCommandTarget",
      "description": "The target instance to run the command on."
    }
  },
  "required": [
    "compartmentId",
    "executionTimeOutInSeconds",
    "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"
    }
  }
}