oci.Bastion.Session
Explore with Pulumi AI
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={
"public_key_content": session_key_details_public_key_content,
},
target_resource_details={
"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
This property is required. string - The unique name of the resource.
- args
This property is required. SessionArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. SessionArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SessionArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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={
"public_key_content": "string",
},
target_resource_details={
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Session resource accepts the following input properties:
- Bastion
Id This property is required. Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- Key
Details This property is required. Changes to this property will trigger replacement.
Key Details - Public key details for a bastion session.
- Target
Resource Details This property is required. Changes to this property will trigger replacement.
Target Resource Details - Details about a bastion session's target resource.
- Display
Name string - (Updatable) The name of the session.
- Key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- Session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- Bastion
Id This property is required. Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- Key
Details This property is required. Changes to this property will trigger replacement.
Key Details Args - Public key details for a bastion session.
- Target
Resource Details This property is required. Changes to this property will trigger replacement.
Target Resource Details Args - Details about a bastion session's target resource.
- Display
Name string - (Updatable) The name of the session.
- Key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- Session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- bastion
Id This property is required. Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- key
Details This property is required. Changes to this property will trigger replacement.
Key Details - Public key details for a bastion session.
- target
Resource Details This property is required. Changes to this property will trigger replacement.
Target Resource Details - Details about a bastion session's target resource.
- display
Name String - (Updatable) The name of the session.
- key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- bastion
Id This property is required. Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- key
Details This property is required. Changes to this property will trigger replacement.
Key Details - Public key details for a bastion session.
- target
Resource Details This property is required. Changes to this property will trigger replacement.
Target Resource Details - Details about a bastion session's target resource.
- display
Name string - (Updatable) The name of the session.
- key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- bastion_
id This property is required. Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- key_
details This property is required. Changes to this property will trigger replacement.
Session Key Details Args - Public key details for a bastion session.
- target_
resource_ details This property is required. Changes to this property will trigger replacement.
Session Target Resource Details Args - Details about a bastion session's target resource.
- display_
name str - (Updatable) The name of the session.
- key_
type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session_
ttl_ in_ seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- bastion
Id This property is required. Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- key
Details This property is required. Changes to this property will trigger replacement.
- Public key details for a bastion session.
- target
Resource Details This property is required. Changes to this property will trigger replacement.
- Details about a bastion session's target resource.
- display
Name String - (Updatable) The name of the session.
- key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session
Ttl In Seconds Changes to this property will trigger replacement.
- 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:
- Bastion
Name string - The name of the bastion that is hosting this session.
- Bastion
Public stringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- Bastion
User stringName - The username that the session uses to connect to the target resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - A message describing the current session state in more detail.
- Ssh
Metadata Dictionary<string, string> - The connection message for the session.
- State string
- The current state of the session.
- Time
Created string - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Bastion
Name string - The name of the bastion that is hosting this session.
- Bastion
Public stringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- Bastion
User stringName - The username that the session uses to connect to the target resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - A message describing the current session state in more detail.
- Ssh
Metadata map[string]string - The connection message for the session.
- State string
- The current state of the session.
- Time
Created string - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Name String - The name of the bastion that is hosting this session.
- bastion
Public StringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion
User StringName - The username that the session uses to connect to the target resource.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - A message describing the current session state in more detail.
- ssh
Metadata Map<String,String> - The connection message for the session.
- state String
- The current state of the session.
- time
Created String - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Name string - The name of the bastion that is hosting this session.
- bastion
Public stringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion
User stringName - The username that the session uses to connect to the target resource.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details string - A message describing the current session state in more detail.
- ssh
Metadata {[key: string]: string} - The connection message for the session.
- state string
- The current state of the session.
- time
Created string - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated 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_ strhost_ key_ info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion_
user_ strname - 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, str] - 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
- bastion
Name String - The name of the bastion that is hosting this session.
- bastion
Public StringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion
User StringName - The username that the session uses to connect to the target resource.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - A message describing the current session state in more detail.
- ssh
Metadata Map<String> - The connection message for the session.
- state String
- The current state of the session.
- time
Created String - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated 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, str]] = 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)
resources: _: type: oci:Bastion:Session get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Bastion
Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- Bastion
Name string - The name of the bastion that is hosting this session.
- Bastion
Public stringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- Bastion
User stringName - The username that the session uses to connect to the target resource.
- Display
Name string - (Updatable) The name of the session.
- Key
Details Changes to this property will trigger replacement.
Key Details - Public key details for a bastion session.
- Key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- Lifecycle
Details string - A message describing the current session state in more detail.
- Session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- Ssh
Metadata Dictionary<string, string> - The connection message for the session.
- State string
- The current state of the session.
- Target
Resource Details Changes to this property will trigger replacement.
Target Resource Details - Details about a bastion session's target resource.
- Time
Created string - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Bastion
Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- Bastion
Name string - The name of the bastion that is hosting this session.
- Bastion
Public stringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- Bastion
User stringName - The username that the session uses to connect to the target resource.
- Display
Name string - (Updatable) The name of the session.
- Key
Details Changes to this property will trigger replacement.
Key Details Args - Public key details for a bastion session.
- Key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- Lifecycle
Details string - A message describing the current session state in more detail.
- Session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- Ssh
Metadata map[string]string - The connection message for the session.
- State string
- The current state of the session.
- Target
Resource Details Changes to this property will trigger replacement.
Target Resource Details Args - Details about a bastion session's target resource.
- Time
Created string - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- bastion
Name String - The name of the bastion that is hosting this session.
- bastion
Public StringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion
User StringName - The username that the session uses to connect to the target resource.
- display
Name String - (Updatable) The name of the session.
- key
Details Changes to this property will trigger replacement.
Key Details - Public key details for a bastion session.
- key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- lifecycle
Details String - A message describing the current session state in more detail.
- session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- ssh
Metadata Map<String,String> - The connection message for the session.
- state String
- The current state of the session.
- target
Resource Details Changes to this property will trigger replacement.
Target Resource Details - Details about a bastion session's target resource.
- time
Created String - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- bastion
Name string - The name of the bastion that is hosting this session.
- bastion
Public stringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion
User stringName - The username that the session uses to connect to the target resource.
- display
Name string - (Updatable) The name of the session.
- key
Details Changes to this property will trigger replacement.
Key Details - Public key details for a bastion session.
- key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- lifecycle
Details string - A message describing the current session state in more detail.
- session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- ssh
Metadata {[key: string]: string} - The connection message for the session.
- state string
- The current state of the session.
- target
Resource Details Changes to this property will trigger replacement.
Target Resource Details - Details about a bastion session's target resource.
- time
Created string - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated string - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion_
id Changes to this property will trigger replacement.
- 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_ strhost_ key_ info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion_
user_ strname - The username that the session uses to connect to the target resource.
- display_
name str - (Updatable) The name of the session.
- key_
details Changes to this property will trigger replacement.
Session Key Details Args - Public key details for a bastion session.
- key_
type Changes to this property will trigger replacement.
- 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 Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- ssh_
metadata Mapping[str, str] - The connection message for the session.
- state str
- The current state of the session.
- target_
resource_ details Changes to this property will trigger replacement.
Session Target Resource Details Args - 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
- bastion
Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the bastion on which to create this session.
- bastion
Name String - The name of the bastion that is hosting this session.
- bastion
Public StringHost Key Info - The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.
- bastion
User StringName - The username that the session uses to connect to the target resource.
- display
Name String - (Updatable) The name of the session.
- key
Details Changes to this property will trigger replacement.
- Public key details for a bastion session.
- key
Type Changes to this property will trigger replacement.
- The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- lifecycle
Details String - A message describing the current session state in more detail.
- session
Ttl In Seconds Changes to this property will trigger replacement.
- The amount of time the session can remain active.
- ssh
Metadata Map<String> - The connection message for the session.
- state String
- The current state of the session.
- target
Resource Details Changes to this property will trigger replacement.
- Details about a bastion session's target resource.
- time
Created String - The time the session was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the session was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
Supporting Types
SessionKeyDetails, SessionKeyDetailsArgs
- Public
Key Content This property is required. Changes to this property will trigger replacement.
- 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 This property is required. Changes to this property will trigger replacement.
- 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 This property is required. Changes to this property will trigger replacement.
- 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 This property is required. Changes to this property will trigger replacement.
- 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 This property is required. Changes to this property will trigger replacement.
- 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 This property is required. Changes to this property will trigger replacement.
- 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
- Session
Type This property is required. Changes to this property will trigger replacement.
- The session type.
- Target
Resource stringDisplay Name - The display name of the target Compute instance that the session connects to.
- Target
Resource Fqdn Changes to this property will trigger replacement.
- The Fully Qualified Domain Name of the target resource that the session connects to.
- Target
Resource Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- Target
Resource Operating System User Name Changes to this property will trigger replacement.
- The name of the user on the target resource operating system that the session uses for the connection.
- Target
Resource Port Changes to this property will trigger replacement.
- The port number to connect to on the target resource.
- Target
Resource Private Ip Address Changes to this property will trigger replacement.
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 This property is required. Changes to this property will trigger replacement.
- The session type.
- Target
Resource stringDisplay Name - The display name of the target Compute instance that the session connects to.
- Target
Resource Fqdn Changes to this property will trigger replacement.
- The Fully Qualified Domain Name of the target resource that the session connects to.
- Target
Resource Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- Target
Resource Operating System User Name Changes to this property will trigger replacement.
- The name of the user on the target resource operating system that the session uses for the connection.
- Target
Resource Port Changes to this property will trigger replacement.
- The port number to connect to on the target resource.
- Target
Resource Private Ip Address Changes to this property will trigger replacement.
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 This property is required. Changes to this property will trigger replacement.
- The session type.
- target
Resource StringDisplay Name - The display name of the target Compute instance that the session connects to.
- target
Resource Fqdn Changes to this property will trigger replacement.
- The Fully Qualified Domain Name of the target resource that the session connects to.
- target
Resource Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target
Resource Operating System User Name Changes to this property will trigger replacement.
- The name of the user on the target resource operating system that the session uses for the connection.
- target
Resource Port Changes to this property will trigger replacement.
- The port number to connect to on the target resource.
- target
Resource Private Ip Address Changes to this property will trigger replacement.
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 This property is required. Changes to this property will trigger replacement.
- The session type.
- target
Resource stringDisplay Name - The display name of the target Compute instance that the session connects to.
- target
Resource Fqdn Changes to this property will trigger replacement.
- The Fully Qualified Domain Name of the target resource that the session connects to.
- target
Resource Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target
Resource Operating System User Name Changes to this property will trigger replacement.
- The name of the user on the target resource operating system that the session uses for the connection.
- target
Resource Port Changes to this property will trigger replacement.
- The port number to connect to on the target resource.
- target
Resource Private Ip Address Changes to this property will trigger replacement.
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 This property is required. Changes to this property will trigger replacement.
- The session type.
- target_
resource_ strdisplay_ name - The display name of the target Compute instance that the session connects to.
- target_
resource_ fqdn Changes to this property will trigger replacement.
- The Fully Qualified Domain Name of the target resource that the session connects to.
- target_
resource_ id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target_
resource_ operating_ system_ user_ name Changes to this property will trigger replacement.
- The name of the user on the target resource operating system that the session uses for the connection.
- target_
resource_ port Changes to this property will trigger replacement.
- The port number to connect to on the target resource.
- target_
resource_ private_ ip_ address Changes to this property will trigger replacement.
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 This property is required. Changes to this property will trigger replacement.
- The session type.
- target
Resource StringDisplay Name - The display name of the target Compute instance that the session connects to.
- target
Resource Fqdn Changes to this property will trigger replacement.
- The Fully Qualified Domain Name of the target resource that the session connects to.
- target
Resource Id Changes to this property will trigger replacement.
- The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target
Resource Operating System User Name Changes to this property will trigger replacement.
- The name of the user on the target resource operating system that the session uses for the connection.
- target
Resource Port Changes to this property will trigger replacement.
- The port number to connect to on the target resource.
- target
Resource Private Ip Address Changes to this property will trigger replacement.
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.