CreateSessionDetails

class oci.bastion.models.CreateSessionDetails(**kwargs)

Bases: object

The configuration details for a new bastion session. A session lets authorized users connect to a target resource for a predetermined amount of time. The Bastion service recognizes two types of sessions, managed SSH sessions and SSH port forwarding sessions. Managed SSH sessions require that the target resource has an OpenSSH server and the Oracle Cloud Agent both running.

Attributes

KEY_TYPE_PUB A constant which can be used with the key_type property of a CreateSessionDetails.
bastion_id [Required] Gets the bastion_id of this CreateSessionDetails.
display_name Gets the display_name of this CreateSessionDetails.
key_details [Required] Gets the key_details of this CreateSessionDetails.
key_type Gets the key_type of this CreateSessionDetails.
session_ttl_in_seconds Gets the session_ttl_in_seconds of this CreateSessionDetails.
target_resource_details [Required] Gets the target_resource_details of this CreateSessionDetails.

Methods

__init__(**kwargs) Initializes a new CreateSessionDetails object with values from keyword arguments.
KEY_TYPE_PUB = 'PUB'

A constant which can be used with the key_type property of a CreateSessionDetails. This constant has a value of “PUB”

__init__(**kwargs)

Initializes a new CreateSessionDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • display_name (str) – The value to assign to the display_name property of this CreateSessionDetails.
  • bastion_id (str) – The value to assign to the bastion_id property of this CreateSessionDetails.
  • target_resource_details (oci.bastion.models.CreateSessionTargetResourceDetails) – The value to assign to the target_resource_details property of this CreateSessionDetails.
  • key_type (str) – The value to assign to the key_type property of this CreateSessionDetails. Allowed values for this property are: “PUB”
  • key_details (oci.bastion.models.PublicKeyDetails) – The value to assign to the key_details property of this CreateSessionDetails.
  • session_ttl_in_seconds (int) – The value to assign to the session_ttl_in_seconds property of this CreateSessionDetails.
bastion_id

[Required] Gets the bastion_id of this CreateSessionDetails. The unique identifier (OCID) of the bastion on which to create this session.

Returns:The bastion_id of this CreateSessionDetails.
Return type:str
display_name

Gets the display_name of this CreateSessionDetails. The name of the session.

Returns:The display_name of this CreateSessionDetails.
Return type:str
key_details

[Required] Gets the key_details of this CreateSessionDetails.

Returns:The key_details of this CreateSessionDetails.
Return type:oci.bastion.models.PublicKeyDetails
key_type

Gets the key_type of this CreateSessionDetails. The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.

Allowed values for this property are: “PUB”

Returns:The key_type of this CreateSessionDetails.
Return type:str
session_ttl_in_seconds

Gets the session_ttl_in_seconds of this CreateSessionDetails. The amount of time the session can remain active.

Returns:The session_ttl_in_seconds of this CreateSessionDetails.
Return type:int
target_resource_details

[Required] Gets the target_resource_details of this CreateSessionDetails.

Returns:The target_resource_details of this CreateSessionDetails.
Return type:oci.bastion.models.CreateSessionTargetResourceDetails