{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-container-instance-schema.json",
  "title": "ContainerInstance",
  "description": "A container instance to host containers.\n\nIf you delete a container instance, the record remains visible for a short period\nof time before being permanently removed.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-containerinstance-api-openapi.yml#/components/schemas/ContainerInstance",
  "properties": {
    "availabilityDomain": {
      "description": "The availability domain to place the container instance.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "compartmentId": {
      "description": "The OCID of the compartment.",
      "maxLength": 255,
      "minLength": 1,
      "pattern": "^\\S+$",
      "type": "string"
    },
    "containerCount": {
      "description": "The number of containers on the container instance.",
      "type": "integer"
    },
    "containerRestartPolicy": {
      "description": "The container restart policy is applied for all containers in container instance.",
      "enum": [
        "ALWAYS",
        "NEVER",
        "ON_FAILURE"
      ],
      "type": "string"
    },
    "containers": {
      "description": "The containers on the container instance.",
      "items": {
        "$ref": "#/$defs/ContainerInstanceContainer"
      },
      "type": "array"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer, and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`.\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`.\n",
      "type": "object"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "dnsConfig": {
      "$ref": "#/$defs/ContainerDnsConfig"
    },
    "faultDomain": {
      "description": "The fault domain to place the container instance.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.\nExample: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "gracefulShutdownTimeoutInSeconds": {
      "description": "The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted.",
      "format": "int64",
      "maximum": 300,
      "minimum": 0,
      "type": "integer"
    },
    "id": {
      "description": "An OCID that cannot be changed.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "imagePullSecrets": {
      "description": "The image pulls secrets so you can access private registry to pull container images.",
      "items": {
        "$ref": "#/$defs/ImagePullSecret"
      },
      "type": "array"
    },
    "lifecycleDetails": {
      "description": "A message that describes the current state of the container in more detail. Can be used to provide\nactionable information.\n",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current state of the container instance.",
      "enum": [
        "CREATING",
        "UPDATING",
        "ACTIVE",
        "INACTIVE",
        "DELETING",
        "DELETED",
        "FAILED"
      ],
      "type": "string"
    },
    "securityContext": {
      "$ref": "#/$defs/ContainerInstanceSecurityContext"
    },
    "shape": {
      "description": "The shape of the container instance. The shape determines the number of OCPUs, amount of memory, and other resources that are allocated to a container instance.",
      "type": "string"
    },
    "shapeConfig": {
      "$ref": "#/$defs/ContainerInstanceShapeConfig"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer, and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Usage of system tag keys. These predefined keys are scoped to namespaces.\nExample: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`.\n",
      "type": "object"
    },
    "tenantId": {
      "description": "TenantId id of the container instance.",
      "type": "string"
    },
    "timeCreated": {
      "description": "The time the container instance was created, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339).",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The time the container instance was updated, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339).",
      "format": "date-time",
      "type": "string"
    },
    "vnics": {
      "description": "The virtual networks available to the containers in the container instance.",
      "items": {
        "$ref": "#/$defs/ContainerVnic"
      },
      "type": "array"
    },
    "volumeCount": {
      "description": "The number of volumes that are attached to the container instance.",
      "type": "integer"
    },
    "volumes": {
      "description": "A volume is a directory with data that is accessible across multiple containers in a\ncontainer instance.\n",
      "items": {
        "$ref": "#/$defs/ContainerVolume"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "displayName",
    "compartmentId",
    "availabilityDomain",
    "lifecycleState",
    "timeCreated",
    "shape",
    "shapeConfig",
    "vnics",
    "containers",
    "containerCount",
    "containerRestartPolicy"
  ],
  "type": "object",
  "$defs": {
    "ContainerDnsConfig": {
      "description": "DNS settings for containers.",
      "properties": {
        "nameservers": {
          "description": "IP address of the name server..",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "options": {
          "description": "Options allows certain internal resolver variables to be modified.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "searches": {
          "description": "Search list for hostname lookup.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ContainerInstanceContainer": {
      "description": "A container on a container instance.\n",
      "properties": {
        "containerId": {
          "description": "The OCID of the container.",
          "type": "string"
        },
        "displayName": {
          "description": "Display name for the Container.",
          "type": "string"
        }
      },
      "required": [
        "containerId"
      ],
      "type": "object"
    },
    "ContainerInstanceSecurityContext": {
      "description": "Security context for all containers in a container instance.",
      "properties": {
        "securityContextType": {
          "default": "LINUX",
          "description": "The type of security context",
          "enum": [
            "LINUX"
          ],
          "type": "string"
        }
      }
    },
    "ContainerInstanceShapeConfig": {
      "description": "The shape configuration for a container instance. The shape configuration determines\nthe resources thats are available to the container instance and its containers.\n",
      "properties": {
        "memoryInGBs": {
          "description": "The total amount of memory available to the container instance, in gigabytes.\n",
          "format": "float",
          "minimum": 0.0,
          "type": "number"
        },
        "networkingBandwidthInGbps": {
          "description": "The networking bandwidth available to the container instance, in gigabits per second.\n",
          "format": "float",
          "minimum": 0.0,
          "type": "number"
        },
        "ocpus": {
          "description": "The total number of OCPUs available to the container instance.\n",
          "format": "float",
          "minimum": 0.0,
          "type": "number",
          "x-default-description": "If you do not provide one, this is calculated from container resource configuration."
        },
        "processorDescription": {
          "description": "A short description of the container instance's processor (CPU).\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "ocpus",
        "memoryInGBs",
        "processorDescription",
        "networkingBandwidthInGbps"
      ],
      "type": "object"
    },
    "ContainerVnic": {
      "description": "An interface to a virtual network available to containers on a container instance.\n",
      "properties": {
        "vnicId": {
          "description": "The identifier of the virtual network interface card (VNIC) over which\nthe containers accessing this network can communicate with the\nlarger virtual cloud network.\n",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ContainerVolume": {
      "description": "A volume represents a directory with data that is accessible across multiple containers in a\ncontainer instance.\n",
      "properties": {
        "name": {
          "description": "The name of the volume. This must be unique within a single container instance.\n",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "volumeType": {
          "description": "The type of volume.",
          "enum": [
            "EMPTYDIR",
            "CONFIGFILE",
            "OCI_FSS_FILE_SYSTEM"
          ],
          "type": "string",
          "x-obmcs-top-level-enum": "#/definitions/ContainerVolumeType"
        }
      },
      "required": [
        "name",
        "volumeType"
      ]
    },
    "ImagePullSecret": {
      "description": "The image pull secrets for accessing private registry to pull images for containers\n",
      "properties": {
        "registryEndpoint": {
          "description": "The registry endpoint of the container image.",
          "type": "string"
        },
        "secretType": {
          "description": "The type of ImagePullSecret.",
          "enum": [
            "BASIC",
            "VAULT"
          ],
          "type": "string"
        }
      },
      "required": [
        "secretType",
        "registryEndpoint"
      ],
      "type": "object"
    }
  }
}