Class Session
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.
Inherited Members
Namespace: Oci.BastionService.Models
Assembly: OCI.DotNetSDK.Bastion.dll
Syntax
public class Session
Properties
BastionId
Declaration
[Required(ErrorMessage = "BastionId is required.")]
[JsonProperty(PropertyName = "bastionId")]
public string BastionId { get; set; }
Property Value
Type | Description |
---|---|
string | The unique identifier (OCID) of the bastion that is hosting this session. |
Remarks
Required
BastionName
Declaration
[Required(ErrorMessage = "BastionName is required.")]
[JsonProperty(PropertyName = "bastionName")]
public string BastionName { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the bastion that is hosting this session. |
Remarks
Required
BastionPublicHostKeyInfo
Declaration
[JsonProperty(PropertyName = "bastionPublicHostKeyInfo")]
public string BastionPublicHostKeyInfo { get; set; }
Property Value
Type | Description |
---|---|
string | The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion. |
BastionUserName
Declaration
[JsonProperty(PropertyName = "bastionUserName")]
public string BastionUserName { get; set; }
Property Value
Type | Description |
---|---|
string | The username that the session uses to connect to the target resource. |
DisplayName
Declaration
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the session. |
Id
Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The unique identifier (OCID) of the session, which can't be changed after creation. |
Remarks
Required
KeyDetails
Declaration
[Required(ErrorMessage = "KeyDetails is required.")]
[JsonProperty(PropertyName = "keyDetails")]
public PublicKeyDetails KeyDetails { get; set; }
Property Value
Type | Description |
---|---|
PublicKeyDetails |
Remarks
Required
KeyType
Declaration
[JsonProperty(PropertyName = "keyType")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Session.KeyTypeEnum? KeyType { get; set; }
Property Value
Type | Description |
---|---|
Session.KeyTypeEnum? | The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format. |
LifecycleDetails
Declaration
[JsonProperty(PropertyName = "lifecycleDetails")]
public string LifecycleDetails { get; set; }
Property Value
Type | Description |
---|---|
string | A message describing the current session state in more detail. |
LifecycleState
Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public SessionLifecycleState? LifecycleState { get; set; }
Property Value
Type | Description |
---|---|
SessionLifecycleState? | The current state of the session. |
Remarks
Required
SessionTtlInSeconds
Declaration
[Required(ErrorMessage = "SessionTtlInSeconds is required.")]
[JsonProperty(PropertyName = "sessionTtlInSeconds")]
public int? SessionTtlInSeconds { get; set; }
Property Value
Type | Description |
---|---|
int? | The amount of time the session can remain active. |
Remarks
Required
SshMetadata
Declaration
[JsonProperty(PropertyName = "sshMetadata")]
public Dictionary<string, string> SshMetadata { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | The connection message for the session. |
TargetResourceDetails
Declaration
[Required(ErrorMessage = "TargetResourceDetails is required.")]
[JsonProperty(PropertyName = "targetResourceDetails")]
public TargetResourceDetails TargetResourceDetails { get; set; }
Property Value
Type | Description |
---|---|
TargetResourceDetails |
Remarks
Required
TimeCreated
Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
Remarks
Required
TimeUpdated
Declaration
[JsonProperty(PropertyName = "timeUpdated")]
public DateTime? TimeUpdated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |