{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/oracle/main/json-schema/oracle-session-schema.json", "title": "Session", "description": "A bastion session resource. A bastion session lets authorized users connect to a target resource using a Secure Shell (SSH) for a predetermined amount of time.", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/oracle-bastion-api-openapi.yml#/components/schemas/Session", "properties": { "bastionId": { "description": "The unique identifier (OCID) of the bastion that is hosting this session.", "type": "string" }, "bastionName": { "description": "The name of the bastion that is hosting this session.", "type": "string" }, "bastionPublicHostKeyInfo": { "description": "The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.", "type": "string" }, "bastionUserName": { "description": "The username that the session uses to connect to the target resource.", "type": "string" }, "displayName": { "description": "The name of the session.", "type": "string" }, "id": { "description": "The unique identifier (OCID) of the session, which can't be changed after creation.", "type": "string" }, "keyDetails": { "$ref": "#/$defs/PublicKeyDetails" }, "keyType": { "default": "PUB", "description": "The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.", "enum": [ "PUB" ], "type": "string" }, "lifecycleDetails": { "description": "A message describing the current session state in more detail.", "type": "string", "x-default-description": "null" }, "lifecycleState": { "description": "The current state of the session.", "enum": [ "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED" ], "type": "string", "x-obmcs-top-level-enum": "#/definitions/SessionLifecycleState" }, "sessionTtlInSeconds": { "description": "The amount of time the session can remain active.", "type": "integer" }, "sshMetadata": { "additionalProperties": { "type": "string" }, "description": "The connection message for the session.", "type": "object" }, "targetResourceDetails": { "$ref": "#/$defs/TargetResourceDetails" }, "timeCreated": { "description": "The time the session was created. Format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339).\nExample: `2020-01-25T21:10:29.600Z`\n", "format": "date-time", "type": "string" }, "timeUpdated": { "description": "The time the session was updated. Format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339).\nExample: `2020-01-25T21:10:29.600Z`\n", "format": "date-time", "type": "string", "x-default-description": "null" } }, "required": [ "id", "bastionId", "bastionName", "keyDetails", "lifecycleState", "timeCreated", "sessionTtlInSeconds", "targetResourceDetails" ], "type": "object", "$defs": { "PublicKeyDetails": { "description": "Public key details for a bastion session.", "properties": { "publicKeyContent": { "description": "The public key in OpenSSH format of the SSH key pair for the session. When you connect to the session, you must provide the private key of the same SSH key pair.", "type": "string" } }, "required": [ "publicKeyContent" ], "type": "object" }, "TargetResourceDetails": { "description": "Details about a bastion session's target resource.", "properties": { "sessionType": { "description": "The Bastion service recognizes three types of sessions, managed SSH sessions, SSH port forwarding sessions, and Dynamic SSH port forwarding sessions. Managed SSH sessions require that the target resource has an OpenSSH server and the Oracle Cloud Agent both running.", "enum": [ "MANAGED_SSH", "PORT_FORWARDING", "DYNAMIC_PORT_FORWARDING" ], "type": "string", "x-obmcs-top-level-enum": "#/definitions/SessionType" } }, "required": [ "sessionType" ], "type": "object" } } }