1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Bastion
  5. Session
Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi

oci.Bastion.Session

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi

    This resource provides the Session resource in Oracle Cloud Infrastructure Bastion service.

    Creates a new session in a bastion. A bastion 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.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSession = new oci.bastion.Session("test_session", {
        bastionId: testBastion.id,
        keyDetails: {
            publicKeyContent: sessionKeyDetailsPublicKeyContent,
        },
        targetResourceDetails: {
            sessionType: sessionTargetResourceDetailsSessionType,
            targetResourceFqdn: sessionTargetResourceDetailsTargetResourceFqdn,
            targetResourceId: testTargetResource.id,
            targetResourceOperatingSystemUserName: testUser.name,
            targetResourcePort: sessionTargetResourceDetailsTargetResourcePort,
            targetResourcePrivateIpAddress: sessionTargetResourceDetailsTargetResourcePrivateIpAddress,
        },
        displayName: sessionDisplayName,
        keyType: sessionKeyType,
        sessionTtlInSeconds: sessionSessionTtlInSeconds,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_session = oci.bastion.Session("test_session",
        bastion_id=test_bastion["id"],
        key_details=oci.bastion.SessionKeyDetailsArgs(
            public_key_content=session_key_details_public_key_content,
        ),
        target_resource_details=oci.bastion.SessionTargetResourceDetailsArgs(
            session_type=session_target_resource_details_session_type,
            target_resource_fqdn=session_target_resource_details_target_resource_fqdn,
            target_resource_id=test_target_resource["id"],
            target_resource_operating_system_user_name=test_user["name"],
            target_resource_port=session_target_resource_details_target_resource_port,
            target_resource_private_ip_address=session_target_resource_details_target_resource_private_ip_address,
        ),
        display_name=session_display_name,
        key_type=session_key_type,
        session_ttl_in_seconds=session_session_ttl_in_seconds)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Bastion"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Bastion.NewSession(ctx, "test_session", &Bastion.SessionArgs{
    			BastionId: pulumi.Any(testBastion.Id),
    			KeyDetails: &bastion.SessionKeyDetailsArgs{
    				PublicKeyContent: pulumi.Any(sessionKeyDetailsPublicKeyContent),
    			},
    			TargetResourceDetails: &bastion.SessionTargetResourceDetailsArgs{
    				SessionType:                           pulumi.Any(sessionTargetResourceDetailsSessionType),
    				TargetResourceFqdn:                    pulumi.Any(sessionTargetResourceDetailsTargetResourceFqdn),
    				TargetResourceId:                      pulumi.Any(testTargetResource.Id),
    				TargetResourceOperatingSystemUserName: pulumi.Any(testUser.Name),
    				TargetResourcePort:                    pulumi.Any(sessionTargetResourceDetailsTargetResourcePort),
    				TargetResourcePrivateIpAddress:        pulumi.Any(sessionTargetResourceDetailsTargetResourcePrivateIpAddress),
    			},
    			DisplayName:         pulumi.Any(sessionDisplayName),
    			KeyType:             pulumi.Any(sessionKeyType),
    			SessionTtlInSeconds: pulumi.Any(sessionSessionTtlInSeconds),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testSession = new Oci.Bastion.Session("test_session", new()
        {
            BastionId = testBastion.Id,
            KeyDetails = new Oci.Bastion.Inputs.SessionKeyDetailsArgs
            {
                PublicKeyContent = sessionKeyDetailsPublicKeyContent,
            },
            TargetResourceDetails = new Oci.Bastion.Inputs.SessionTargetResourceDetailsArgs
            {
                SessionType = sessionTargetResourceDetailsSessionType,
                TargetResourceFqdn = sessionTargetResourceDetailsTargetResourceFqdn,
                TargetResourceId = testTargetResource.Id,
                TargetResourceOperatingSystemUserName = testUser.Name,
                TargetResourcePort = sessionTargetResourceDetailsTargetResourcePort,
                TargetResourcePrivateIpAddress = sessionTargetResourceDetailsTargetResourcePrivateIpAddress,
            },
            DisplayName = sessionDisplayName,
            KeyType = sessionKeyType,
            SessionTtlInSeconds = sessionSessionTtlInSeconds,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Bastion.Session;
    import com.pulumi.oci.Bastion.SessionArgs;
    import com.pulumi.oci.Bastion.inputs.SessionKeyDetailsArgs;
    import com.pulumi.oci.Bastion.inputs.SessionTargetResourceDetailsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testSession = new Session("testSession", SessionArgs.builder()
                .bastionId(testBastion.id())
                .keyDetails(SessionKeyDetailsArgs.builder()
                    .publicKeyContent(sessionKeyDetailsPublicKeyContent)
                    .build())
                .targetResourceDetails(SessionTargetResourceDetailsArgs.builder()
                    .sessionType(sessionTargetResourceDetailsSessionType)
                    .targetResourceFqdn(sessionTargetResourceDetailsTargetResourceFqdn)
                    .targetResourceId(testTargetResource.id())
                    .targetResourceOperatingSystemUserName(testUser.name())
                    .targetResourcePort(sessionTargetResourceDetailsTargetResourcePort)
                    .targetResourcePrivateIpAddress(sessionTargetResourceDetailsTargetResourcePrivateIpAddress)
                    .build())
                .displayName(sessionDisplayName)
                .keyType(sessionKeyType)
                .sessionTtlInSeconds(sessionSessionTtlInSeconds)
                .build());
    
        }
    }
    
    resources:
      testSession:
        type: oci:Bastion:Session
        name: test_session
        properties:
          bastionId: ${testBastion.id}
          keyDetails:
            publicKeyContent: ${sessionKeyDetailsPublicKeyContent}
          targetResourceDetails:
            sessionType: ${sessionTargetResourceDetailsSessionType}
            targetResourceFqdn: ${sessionTargetResourceDetailsTargetResourceFqdn}
            targetResourceId: ${testTargetResource.id}
            targetResourceOperatingSystemUserName: ${testUser.name}
            targetResourcePort: ${sessionTargetResourceDetailsTargetResourcePort}
            targetResourcePrivateIpAddress: ${sessionTargetResourceDetailsTargetResourcePrivateIpAddress}
          displayName: ${sessionDisplayName}
          keyType: ${sessionKeyType}
          sessionTtlInSeconds: ${sessionSessionTtlInSeconds}
    

    Create Session Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Session(name: string, args: SessionArgs, opts?: CustomResourceOptions);
    @overload
    def Session(resource_name: str,
                args: SessionArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Session(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                bastion_id: Optional[str] = None,
                key_details: Optional[_bastion.SessionKeyDetailsArgs] = None,
                target_resource_details: Optional[_bastion.SessionTargetResourceDetailsArgs] = None,
                display_name: Optional[str] = None,
                key_type: Optional[str] = None,
                session_ttl_in_seconds: Optional[int] = None)
    func NewSession(ctx *Context, name string, args SessionArgs, opts ...ResourceOption) (*Session, error)
    public Session(string name, SessionArgs args, CustomResourceOptions? opts = null)
    public Session(String name, SessionArgs args)
    public Session(String name, SessionArgs args, CustomResourceOptions options)
    
    type: oci:Bastion:Session
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SessionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SessionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SessionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SessionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SessionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sessionResource = new Oci.Bastion.Session("sessionResource", new()
    {
        BastionId = "string",
        KeyDetails = new Oci.Bastion.Inputs.SessionKeyDetailsArgs
        {
            PublicKeyContent = "string",
        },
        TargetResourceDetails = new Oci.Bastion.Inputs.SessionTargetResourceDetailsArgs
        {
            SessionType = "string",
            TargetResourceDisplayName = "string",
            TargetResourceFqdn = "string",
            TargetResourceId = "string",
            TargetResourceOperatingSystemUserName = "string",
            TargetResourcePort = 0,
            TargetResourcePrivateIpAddress = "string",
        },
        DisplayName = "string",
        KeyType = "string",
        SessionTtlInSeconds = 0,
    });
    
    example, err := Bastion.NewSession(ctx, "sessionResource", &Bastion.SessionArgs{
    	BastionId: pulumi.String("string"),
    	KeyDetails: &bastion.SessionKeyDetailsArgs{
    		PublicKeyContent: pulumi.String("string"),
    	},
    	TargetResourceDetails: &bastion.SessionTargetResourceDetailsArgs{
    		SessionType:                           pulumi.String("string"),
    		TargetResourceDisplayName:             pulumi.String("string"),
    		TargetResourceFqdn:                    pulumi.String("string"),
    		TargetResourceId:                      pulumi.String("string"),
    		TargetResourceOperatingSystemUserName: pulumi.String("string"),
    		TargetResourcePort:                    pulumi.Int(0),
    		TargetResourcePrivateIpAddress:        pulumi.String("string"),
    	},
    	DisplayName:         pulumi.String("string"),
    	KeyType:             pulumi.String("string"),
    	SessionTtlInSeconds: pulumi.Int(0),
    })
    
    var sessionResource = new Session("sessionResource", SessionArgs.builder()
        .bastionId("string")
        .keyDetails(SessionKeyDetailsArgs.builder()
            .publicKeyContent("string")
            .build())
        .targetResourceDetails(SessionTargetResourceDetailsArgs.builder()
            .sessionType("string")
            .targetResourceDisplayName("string")
            .targetResourceFqdn("string")
            .targetResourceId("string")
            .targetResourceOperatingSystemUserName("string")
            .targetResourcePort(0)
            .targetResourcePrivateIpAddress("string")
            .build())
        .displayName("string")
        .keyType("string")
        .sessionTtlInSeconds(0)
        .build());
    
    session_resource = oci.bastion.Session("sessionResource",
        bastion_id="string",
        key_details=oci.bastion.SessionKeyDetailsArgs(
            public_key_content="string",
        ),
        target_resource_details=oci.bastion.SessionTargetResourceDetailsArgs(
            session_type="string",
            target_resource_display_name="string",
            target_resource_fqdn="string",
            target_resource_id="string",
            target_resource_operating_system_user_name="string",
            target_resource_port=0,
            target_resource_private_ip_address="string",
        ),
        display_name="string",
        key_type="string",
        session_ttl_in_seconds=0)
    
    const sessionResource = new oci.bastion.Session("sessionResource", {
        bastionId: "string",
        keyDetails: {
            publicKeyContent: "string",
        },
        targetResourceDetails: {
            sessionType: "string",
            targetResourceDisplayName: "string",
            targetResourceFqdn: "string",
            targetResourceId: "string",
            targetResourceOperatingSystemUserName: "string",
            targetResourcePort: 0,
            targetResourcePrivateIpAddress: "string",
        },
        displayName: "string",
        keyType: "string",
        sessionTtlInSeconds: 0,
    });
    
    type: oci:Bastion:Session
    properties:
        bastionId: string
        displayName: string
        keyDetails:
            publicKeyContent: string
        keyType: string
        sessionTtlInSeconds: 0
        targetResourceDetails:
            sessionType: string
            targetResourceDisplayName: string
            targetResourceFqdn: string
            targetResourceId: string
            targetResourceOperatingSystemUserName: string
            targetResourcePort: 0
            targetResourcePrivateIpAddress: string
    

    Session Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Session resource accepts the following input properties:

    BastionId string
    The unique identifier (OCID) of the bastion on which to create this session.
    KeyDetails SessionKeyDetails
    Public key details for a bastion session.
    TargetResourceDetails SessionTargetResourceDetails
    Details about a bastion session's target resource.
    DisplayName string
    (Updatable) The name of the session.
    KeyType string
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    SessionTtlInSeconds int
    The amount of time the session can remain active.
    BastionId string
    The unique identifier (OCID) of the bastion on which to create this session.
    KeyDetails SessionKeyDetailsArgs
    Public key details for a bastion session.
    TargetResourceDetails SessionTargetResourceDetailsArgs
    Details about a bastion session's target resource.
    DisplayName string
    (Updatable) The name of the session.
    KeyType string
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    SessionTtlInSeconds int
    The amount of time the session can remain active.
    bastionId String
    The unique identifier (OCID) of the bastion on which to create this session.
    keyDetails SessionKeyDetails
    Public key details for a bastion session.
    targetResourceDetails SessionTargetResourceDetails
    Details about a bastion session's target resource.
    displayName String
    (Updatable) The name of the session.
    keyType String
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    sessionTtlInSeconds Integer
    The amount of time the session can remain active.
    bastionId string
    The unique identifier (OCID) of the bastion on which to create this session.
    keyDetails SessionKeyDetails
    Public key details for a bastion session.
    targetResourceDetails SessionTargetResourceDetails
    Details about a bastion session's target resource.
    displayName string
    (Updatable) The name of the session.
    keyType string
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    sessionTtlInSeconds number
    The amount of time the session can remain active.
    bastion_id str
    The unique identifier (OCID) of the bastion on which to create this session.
    key_details bastion.SessionKeyDetailsArgs
    Public key details for a bastion session.
    target_resource_details bastion.SessionTargetResourceDetailsArgs
    Details about a bastion session's target resource.
    display_name str
    (Updatable) The name of the session.
    key_type str
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    session_ttl_in_seconds int
    The amount of time the session can remain active.
    bastionId String
    The unique identifier (OCID) of the bastion on which to create this session.
    keyDetails Property Map
    Public key details for a bastion session.
    targetResourceDetails Property Map
    Details about a bastion session's target resource.
    displayName String
    (Updatable) The name of the session.
    keyType String
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    sessionTtlInSeconds Number
    The amount of time the session can remain active.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Session resource produces the following output properties:

    BastionName string
    The name of the bastion that is hosting this session.
    BastionPublicHostKeyInfo string
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    BastionUserName string
    The username that the session uses to connect to the target resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails string
    A message describing the current session state in more detail.
    SshMetadata Dictionary<string, object>
    The connection message for the session.
    State string
    The current state of the session.
    TimeCreated string
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated string
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    BastionName string
    The name of the bastion that is hosting this session.
    BastionPublicHostKeyInfo string
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    BastionUserName string
    The username that the session uses to connect to the target resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails string
    A message describing the current session state in more detail.
    SshMetadata map[string]interface{}
    The connection message for the session.
    State string
    The current state of the session.
    TimeCreated string
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated string
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionName String
    The name of the bastion that is hosting this session.
    bastionPublicHostKeyInfo String
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastionUserName String
    The username that the session uses to connect to the target resource.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails String
    A message describing the current session state in more detail.
    sshMetadata Map<String,Object>
    The connection message for the session.
    state String
    The current state of the session.
    timeCreated String
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated String
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionName string
    The name of the bastion that is hosting this session.
    bastionPublicHostKeyInfo string
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastionUserName string
    The username that the session uses to connect to the target resource.
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails string
    A message describing the current session state in more detail.
    sshMetadata {[key: string]: any}
    The connection message for the session.
    state string
    The current state of the session.
    timeCreated string
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated string
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastion_name str
    The name of the bastion that is hosting this session.
    bastion_public_host_key_info str
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastion_user_name str
    The username that the session uses to connect to the target resource.
    id str
    The provider-assigned unique ID for this managed resource.
    lifecycle_details str
    A message describing the current session state in more detail.
    ssh_metadata Mapping[str, Any]
    The connection message for the session.
    state str
    The current state of the session.
    time_created str
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    time_updated str
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionName String
    The name of the bastion that is hosting this session.
    bastionPublicHostKeyInfo String
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastionUserName String
    The username that the session uses to connect to the target resource.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails String
    A message describing the current session state in more detail.
    sshMetadata Map<Any>
    The connection message for the session.
    state String
    The current state of the session.
    timeCreated String
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated String
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

    Look up Existing Session Resource

    Get an existing Session resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SessionState, opts?: CustomResourceOptions): Session
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bastion_id: Optional[str] = None,
            bastion_name: Optional[str] = None,
            bastion_public_host_key_info: Optional[str] = None,
            bastion_user_name: Optional[str] = None,
            display_name: Optional[str] = None,
            key_details: Optional[_bastion.SessionKeyDetailsArgs] = None,
            key_type: Optional[str] = None,
            lifecycle_details: Optional[str] = None,
            session_ttl_in_seconds: Optional[int] = None,
            ssh_metadata: Optional[Mapping[str, Any]] = None,
            state: Optional[str] = None,
            target_resource_details: Optional[_bastion.SessionTargetResourceDetailsArgs] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> Session
    func GetSession(ctx *Context, name string, id IDInput, state *SessionState, opts ...ResourceOption) (*Session, error)
    public static Session Get(string name, Input<string> id, SessionState? state, CustomResourceOptions? opts = null)
    public static Session get(String name, Output<String> id, SessionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BastionId string
    The unique identifier (OCID) of the bastion on which to create this session.
    BastionName string
    The name of the bastion that is hosting this session.
    BastionPublicHostKeyInfo string
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    BastionUserName string
    The username that the session uses to connect to the target resource.
    DisplayName string
    (Updatable) The name of the session.
    KeyDetails SessionKeyDetails
    Public key details for a bastion session.
    KeyType string
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    LifecycleDetails string
    A message describing the current session state in more detail.
    SessionTtlInSeconds int
    The amount of time the session can remain active.
    SshMetadata Dictionary<string, object>
    The connection message for the session.
    State string
    The current state of the session.
    TargetResourceDetails SessionTargetResourceDetails
    Details about a bastion session's target resource.
    TimeCreated string
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated string
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    BastionId string
    The unique identifier (OCID) of the bastion on which to create this session.
    BastionName string
    The name of the bastion that is hosting this session.
    BastionPublicHostKeyInfo string
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    BastionUserName string
    The username that the session uses to connect to the target resource.
    DisplayName string
    (Updatable) The name of the session.
    KeyDetails SessionKeyDetailsArgs
    Public key details for a bastion session.
    KeyType string
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    LifecycleDetails string
    A message describing the current session state in more detail.
    SessionTtlInSeconds int
    The amount of time the session can remain active.
    SshMetadata map[string]interface{}
    The connection message for the session.
    State string
    The current state of the session.
    TargetResourceDetails SessionTargetResourceDetailsArgs
    Details about a bastion session's target resource.
    TimeCreated string
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated string
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionId String
    The unique identifier (OCID) of the bastion on which to create this session.
    bastionName String
    The name of the bastion that is hosting this session.
    bastionPublicHostKeyInfo String
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastionUserName String
    The username that the session uses to connect to the target resource.
    displayName String
    (Updatable) The name of the session.
    keyDetails SessionKeyDetails
    Public key details for a bastion session.
    keyType String
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    lifecycleDetails String
    A message describing the current session state in more detail.
    sessionTtlInSeconds Integer
    The amount of time the session can remain active.
    sshMetadata Map<String,Object>
    The connection message for the session.
    state String
    The current state of the session.
    targetResourceDetails SessionTargetResourceDetails
    Details about a bastion session's target resource.
    timeCreated String
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated String
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionId string
    The unique identifier (OCID) of the bastion on which to create this session.
    bastionName string
    The name of the bastion that is hosting this session.
    bastionPublicHostKeyInfo string
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastionUserName string
    The username that the session uses to connect to the target resource.
    displayName string
    (Updatable) The name of the session.
    keyDetails SessionKeyDetails
    Public key details for a bastion session.
    keyType string
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    lifecycleDetails string
    A message describing the current session state in more detail.
    sessionTtlInSeconds number
    The amount of time the session can remain active.
    sshMetadata {[key: string]: any}
    The connection message for the session.
    state string
    The current state of the session.
    targetResourceDetails SessionTargetResourceDetails
    Details about a bastion session's target resource.
    timeCreated string
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated string
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastion_id str
    The unique identifier (OCID) of the bastion on which to create this session.
    bastion_name str
    The name of the bastion that is hosting this session.
    bastion_public_host_key_info str
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastion_user_name str
    The username that the session uses to connect to the target resource.
    display_name str
    (Updatable) The name of the session.
    key_details bastion.SessionKeyDetailsArgs
    Public key details for a bastion session.
    key_type str
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    lifecycle_details str
    A message describing the current session state in more detail.
    session_ttl_in_seconds int
    The amount of time the session can remain active.
    ssh_metadata Mapping[str, Any]
    The connection message for the session.
    state str
    The current state of the session.
    target_resource_details bastion.SessionTargetResourceDetailsArgs
    Details about a bastion session's target resource.
    time_created str
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    time_updated str
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionId String
    The unique identifier (OCID) of the bastion on which to create this session.
    bastionName String
    The name of the bastion that is hosting this session.
    bastionPublicHostKeyInfo String
    The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
    bastionUserName String
    The username that the session uses to connect to the target resource.
    displayName String
    (Updatable) The name of the session.
    keyDetails Property Map
    Public key details for a bastion session.
    keyType String
    The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
    lifecycleDetails String
    A message describing the current session state in more detail.
    sessionTtlInSeconds Number
    The amount of time the session can remain active.
    sshMetadata Map<Any>
    The connection message for the session.
    state String
    The current state of the session.
    targetResourceDetails Property Map
    Details about a bastion session's target resource.
    timeCreated String
    The time the session was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated String
    The time the session was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

    Supporting Types

    SessionKeyDetails, SessionKeyDetailsArgs

    PublicKeyContent string
    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.
    PublicKeyContent string
    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.
    publicKeyContent String
    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.
    publicKeyContent string
    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.
    public_key_content str
    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.
    publicKeyContent String
    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.

    SessionTargetResourceDetails, SessionTargetResourceDetailsArgs

    SessionType string
    The session type.
    TargetResourceDisplayName string
    The display name of the target Compute instance that the session connects to.
    TargetResourceFqdn string
    The Fully Qualified Domain Name of the target resource that the session connects to.
    TargetResourceId string
    The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
    TargetResourceOperatingSystemUserName string
    The name of the user on the target resource operating system that the session uses for the connection.
    TargetResourcePort int
    The port number to connect to on the target resource.
    TargetResourcePrivateIpAddress string

    The private IP address of the target resource that the session connects to.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    SessionType string
    The session type.
    TargetResourceDisplayName string
    The display name of the target Compute instance that the session connects to.
    TargetResourceFqdn string
    The Fully Qualified Domain Name of the target resource that the session connects to.
    TargetResourceId string
    The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
    TargetResourceOperatingSystemUserName string
    The name of the user on the target resource operating system that the session uses for the connection.
    TargetResourcePort int
    The port number to connect to on the target resource.
    TargetResourcePrivateIpAddress string

    The private IP address of the target resource that the session connects to.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    sessionType String
    The session type.
    targetResourceDisplayName String
    The display name of the target Compute instance that the session connects to.
    targetResourceFqdn String
    The Fully Qualified Domain Name of the target resource that the session connects to.
    targetResourceId String
    The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
    targetResourceOperatingSystemUserName String
    The name of the user on the target resource operating system that the session uses for the connection.
    targetResourcePort Integer
    The port number to connect to on the target resource.
    targetResourcePrivateIpAddress String

    The private IP address of the target resource that the session connects to.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    sessionType string
    The session type.
    targetResourceDisplayName string
    The display name of the target Compute instance that the session connects to.
    targetResourceFqdn string
    The Fully Qualified Domain Name of the target resource that the session connects to.
    targetResourceId string
    The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
    targetResourceOperatingSystemUserName string
    The name of the user on the target resource operating system that the session uses for the connection.
    targetResourcePort number
    The port number to connect to on the target resource.
    targetResourcePrivateIpAddress string

    The private IP address of the target resource that the session connects to.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    session_type str
    The session type.
    target_resource_display_name str
    The display name of the target Compute instance that the session connects to.
    target_resource_fqdn str
    The Fully Qualified Domain Name of the target resource that the session connects to.
    target_resource_id str
    The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
    target_resource_operating_system_user_name str
    The name of the user on the target resource operating system that the session uses for the connection.
    target_resource_port int
    The port number to connect to on the target resource.
    target_resource_private_ip_address str

    The private IP address of the target resource that the session connects to.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    sessionType String
    The session type.
    targetResourceDisplayName String
    The display name of the target Compute instance that the session connects to.
    targetResourceFqdn String
    The Fully Qualified Domain Name of the target resource that the session connects to.
    targetResourceId String
    The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
    targetResourceOperatingSystemUserName String
    The name of the user on the target resource operating system that the session uses for the connection.
    targetResourcePort Number
    The port number to connect to on the target resource.
    targetResourcePrivateIpAddress String

    The private IP address of the target resource that the session connects to.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    Sessions can be imported using the id, e.g.

    $ pulumi import oci:Bastion/session:Session test_session "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi