TargetResourceDetails

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

Bases: object

Details about a bastion session’s target resource.

Attributes

SESSION_TYPE_MANAGED_SSH A constant which can be used with the session_type property of a TargetResourceDetails.
SESSION_TYPE_PORT_FORWARDING A constant which can be used with the session_type property of a TargetResourceDetails.
session_type [Required] Gets the session_type of this TargetResourceDetails.
target_resource_port [Required] Gets the target_resource_port of this TargetResourceDetails.

Methods

__init__(**kwargs) Initializes a new TargetResourceDetails object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
SESSION_TYPE_MANAGED_SSH = 'MANAGED_SSH'

A constant which can be used with the session_type property of a TargetResourceDetails. This constant has a value of “MANAGED_SSH”

SESSION_TYPE_PORT_FORWARDING = 'PORT_FORWARDING'

A constant which can be used with the session_type property of a TargetResourceDetails. This constant has a value of “PORT_FORWARDING”

__init__(**kwargs)

Initializes a new TargetResourceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:

The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • session_type (str) – The value to assign to the session_type property of this TargetResourceDetails. Allowed values for this property are: “MANAGED_SSH”, “PORT_FORWARDING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • target_resource_port (int) – The value to assign to the target_resource_port property of this TargetResourceDetails.
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

session_type

[Required] Gets the session_type of this TargetResourceDetails. 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.

Allowed values for this property are: “MANAGED_SSH”, “PORT_FORWARDING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The session_type of this TargetResourceDetails.
Return type:str
target_resource_port

[Required] Gets the target_resource_port of this TargetResourceDetails. The port number to connect to on the target resource.

Returns:The target_resource_port of this TargetResourceDetails.
Return type:int