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 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:
- Bastion
Id string - The unique identifier (OCID) of the bastion on which to create this session.
- Key
Details SessionKey Details - Public key details for a bastion session.
- Target
Resource SessionDetails Target Resource Details - Details about a bastion session's target resource.
- Display
Name string - (Updatable) The name of the session.
- Key
Type string - The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- Session
Ttl intIn Seconds - The amount of time the session can remain active.
- Bastion
Id string - The unique identifier (OCID) of the bastion on which to create this session.
- Key
Details SessionKey Details Args - Public key details for a bastion session.
- Target
Resource SessionDetails Target Resource Details Args - Details about a bastion session's target resource.
- Display
Name string - (Updatable) The name of the session.
- Key
Type string - The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- Session
Ttl intIn Seconds - The amount of time the session can remain active.
- bastion
Id String - The unique identifier (OCID) of the bastion on which to create this session.
- key
Details SessionKey Details - Public key details for a bastion session.
- target
Resource SessionDetails Target Resource Details - Details about a bastion session's target resource.
- display
Name String - (Updatable) The name of the session.
- key
Type String - The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session
Ttl IntegerIn Seconds - The amount of time the session can remain active.
- bastion
Id string - The unique identifier (OCID) of the bastion on which to create this session.
- key
Details SessionKey Details - Public key details for a bastion session.
- target
Resource SessionDetails Target Resource Details - Details about a bastion session's target resource.
- display
Name string - (Updatable) The name of the session.
- key
Type string - The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session
Ttl numberIn Seconds - 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.Session Key Details Args - Public key details for a bastion session.
- target_
resource_ bastion.details Session Target Resource Details Args - 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_ intin_ seconds - The amount of time the session can remain active.
- bastion
Id String - The unique identifier (OCID) of the bastion on which to create this session.
- key
Details Property Map - Public key details for a bastion session.
- target
Resource Property MapDetails - Details about a bastion session's target resource.
- display
Name String - (Updatable) The name of the session.
- key
Type String - The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.
- session
Ttl NumberIn Seconds - 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)
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.
- Bastion
Id string - 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 SessionKey Details - Public key details for a bastion session.
- Key
Type string - 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 intIn Seconds - 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 SessionDetails 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 string - 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 SessionKey Details Args - Public key details for a bastion session.
- Key
Type string - 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 intIn Seconds - 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 SessionDetails 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 String - 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 SessionKey Details - Public key details for a bastion session.
- key
Type String - 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 IntegerIn Seconds - 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 SessionDetails 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 string - 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 SessionKey Details - Public key details for a bastion session.
- key
Type string - 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 numberIn Seconds - 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 SessionDetails 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 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_ 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 bastion.Session Key Details Args - 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_ intin_ seconds - 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_ bastion.details 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 String - 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 Property Map - Public key details for a bastion session.
- key
Type String - 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 NumberIn Seconds - 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 Property MapDetails - 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 stringContent - 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 stringContent - 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 StringContent - 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 stringContent - 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_ strcontent - 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 StringContent - 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 string - The session type.
- Target
Resource stringDisplay Name - The display name of the target Compute instance that the session connects to.
- Target
Resource stringFqdn - The Fully Qualified Domain Name of the target resource that the session connects to.
- Target
Resource stringId - The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- Target
Resource stringOperating System User Name - The name of the user on the target resource operating system that the session uses for the connection.
- Target
Resource intPort - The port number to connect to on the target resource.
- Target
Resource stringPrivate Ip Address 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 string - The session type.
- Target
Resource stringDisplay Name - The display name of the target Compute instance that the session connects to.
- Target
Resource stringFqdn - The Fully Qualified Domain Name of the target resource that the session connects to.
- Target
Resource stringId - The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- Target
Resource stringOperating System User Name - The name of the user on the target resource operating system that the session uses for the connection.
- Target
Resource intPort - The port number to connect to on the target resource.
- Target
Resource stringPrivate Ip Address 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 String - The session type.
- target
Resource StringDisplay Name - The display name of the target Compute instance that the session connects to.
- target
Resource StringFqdn - The Fully Qualified Domain Name of the target resource that the session connects to.
- target
Resource StringId - The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target
Resource StringOperating System User Name - The name of the user on the target resource operating system that the session uses for the connection.
- target
Resource IntegerPort - The port number to connect to on the target resource.
- target
Resource StringPrivate Ip Address 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 string - The session type.
- target
Resource stringDisplay Name - The display name of the target Compute instance that the session connects to.
- target
Resource stringFqdn - The Fully Qualified Domain Name of the target resource that the session connects to.
- target
Resource stringId - The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target
Resource stringOperating System User Name - The name of the user on the target resource operating system that the session uses for the connection.
- target
Resource numberPort - The port number to connect to on the target resource.
- target
Resource stringPrivate Ip Address 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_ strdisplay_ name - The display name of the target Compute instance that the session connects to.
- target_
resource_ strfqdn - The Fully Qualified Domain Name of the target resource that the session connects to.
- target_
resource_ strid - The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target_
resource_ stroperating_ system_ user_ name - The name of the user on the target resource operating system that the session uses for the connection.
- target_
resource_ intport - The port number to connect to on the target resource.
- target_
resource_ strprivate_ ip_ address 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 String - The session type.
- target
Resource StringDisplay Name - The display name of the target Compute instance that the session connects to.
- target
Resource StringFqdn - The Fully Qualified Domain Name of the target resource that the session connects to.
- target
Resource StringId - The unique identifier (OCID) of the target resource (a Compute instance, for example) that the session connects to.
- target
Resource StringOperating System User Name - The name of the user on the target resource operating system that the session uses for the connection.
- target
Resource NumberPort - The port number to connect to on the target resource.
- target
Resource StringPrivate Ip Address 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.