{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-connection-schema.json",
  "title": "Connection",
  "description": "Represents the common details required for creating a new connection.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-databasemigration-api-openapi.yml#/components/schemas/Connection",
  "properties": {
    "compartmentId": {
      "description": "The OCID of the compartment.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "connectionType": {
      "description": "Defines the type of connection. For example, ORACLE.",
      "enum": [
        "MYSQL",
        "ORACLE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/ConnectionType"
    },
    "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"
    },
    "description": {
      "description": "A user-friendly description. Does not have to be unique, and it's changeable. \nAvoid entering confidential information.\n",
      "maxLength": 400,
      "minLength": 0,
      "type": "string",
      "x-default-description": "null"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable. \nAvoid entering confidential information.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. \nFor more information, see Resource Tags. Example: {\"Department\": \"Finance\"}\n",
      "type": "object"
    },
    "id": {
      "description": "The OCID of the connection being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "ingressIps": {
      "description": "List of ingress IP addresses from where to connect to this connection's privateIp.",
      "items": {
        "$ref": "#/$defs/IngressIpDetails"
      },
      "type": "array"
    },
    "keyId": {
      "description": "The OCID of the key used in cryptographic operations.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleDetails": {
      "description": "The message describing the current state of the connection's lifecycle in detail.\nFor example, can be used to provide actionable information for a connection in a Failed state.\n",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The Connection's current lifecycle state.",
      "enum": [
        "CREATING",
        "UPDATING",
        "ACTIVE",
        "INACTIVE",
        "DELETING",
        "DELETED",
        "FAILED"
      ],
      "type": "string"
    },
    "nsgIds": {
      "description": "An array of Network Security Group OCIDs used to define network access for Connections.\n",
      "items": {
        "maxLength": 255,
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 5,
      "type": "array"
    },
    "password": {
      "description": "The password (credential) used when creating or updating this resource.\n",
      "format": "password",
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "privateEndpointId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "replicationPassword": {
      "description": "The password (credential) used when creating or updating this resource.\n",
      "format": "password",
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "replicationUsername": {
      "description": "The username (credential) used when creating or updating this resource.\n",
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "secretId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "subnetId": {
      "description": "OCI resource ID.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "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"
    },
    "timeCreated": {
      "description": "The time when this resource was created.\nAn RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.\n",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The time when this resource was updated.\nAn RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.\n",
      "format": "date-time",
      "type": "string"
    },
    "username": {
      "description": "The username (credential) used when creating or updating this resource.\n",
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "vaultId": {
      "description": "OCI resource ID.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "connectionType",
    "id",
    "displayName",
    "compartmentId",
    "lifecycleState",
    "timeCreated",
    "timeUpdated",
    "username"
  ],
  "type": "object",
  "$defs": {
    "IngressIpDetails": {
      "description": "Private Endpoint IP Addresses created in the customer's subnet.",
      "properties": {
        "ingressIp": {
          "description": "A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.",
          "maxLength": 46,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "ingressIp"
      ],
      "type": "object"
    }
  }
}