import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Session resource in Oracle Cloud Infrastructure Bastion service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/bastion/latest/Session * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/bastion * * 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 * * ```typescript * 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: Number(sessionTargetResourceDetailsTargetResourcePort), * targetResourcePrivateIpAddress: sessionTargetResourceDetailsTargetResourcePrivateIpAddress, * }, * displayName: sessionDisplayName, * keyType: sessionKeyType, * sessionTtlInSeconds: Number(sessionSessionTtlInSeconds), * }); * ``` * * ## Import * * Sessions can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Bastion/session:Session test_session "id" * ``` */ export declare class Session extends pulumi.CustomResource { /** * Get an existing Session resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SessionState, opts?: pulumi.CustomResourceOptions): Session; /** * Returns true if the given object is an instance of Session. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Session; /** * The unique identifier (OCID) of the bastion on which to create this session. */ readonly bastionId: pulumi.Output; /** * The name of the bastion that is hosting this session. */ readonly bastionName: pulumi.Output; /** * The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion. */ readonly bastionPublicHostKeyInfo: pulumi.Output; /** * The username that the session uses to connect to the target resource. */ readonly bastionUserName: pulumi.Output; /** * (Updatable) The name of the session. */ readonly displayName: pulumi.Output; /** * Public key details for a bastion session. */ readonly keyDetails: pulumi.Output; /** * The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format. */ readonly keyType: pulumi.Output; /** * A message describing the current session state in more detail. */ readonly lifecycleDetails: pulumi.Output; /** * The amount of time the session can remain active. */ readonly sessionTtlInSeconds: pulumi.Output; /** * The connection message for the session. */ readonly sshMetadata: pulumi.Output<{ [key: string]: string; }>; /** * The current state of the session. */ readonly state: pulumi.Output; /** * Details about a bastion session's target resource. */ readonly targetResourceDetails: pulumi.Output; /** * The time the session was created. Format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2020-01-25T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * The time the session was updated. Format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2020-01-25T21:10:29.600Z` */ readonly timeUpdated: pulumi.Output; /** * Create a Session resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SessionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Session resources. */ export interface SessionState { /** * The unique identifier (OCID) of the bastion on which to create this session. */ bastionId?: pulumi.Input; /** * The name of the bastion that is hosting this session. */ bastionName?: pulumi.Input; /** * The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion. */ bastionPublicHostKeyInfo?: pulumi.Input; /** * The username that the session uses to connect to the target resource. */ bastionUserName?: pulumi.Input; /** * (Updatable) The name of the session. */ displayName?: pulumi.Input; /** * Public key details for a bastion session. */ keyDetails?: pulumi.Input; /** * The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format. */ keyType?: pulumi.Input; /** * A message describing the current session state in more detail. */ lifecycleDetails?: pulumi.Input; /** * The amount of time the session can remain active. */ sessionTtlInSeconds?: pulumi.Input; /** * The connection message for the session. */ sshMetadata?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The current state of the session. */ state?: pulumi.Input; /** * Details about a bastion session's target resource. */ targetResourceDetails?: pulumi.Input; /** * The time the session was created. Format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2020-01-25T21:10:29.600Z` */ timeCreated?: pulumi.Input; /** * The time the session was updated. Format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2020-01-25T21:10:29.600Z` */ timeUpdated?: pulumi.Input; } /** * The set of arguments for constructing a Session resource. */ export interface SessionArgs { /** * The unique identifier (OCID) of the bastion on which to create this session. */ bastionId: pulumi.Input; /** * (Updatable) The name of the session. */ displayName?: pulumi.Input; /** * Public key details for a bastion session. */ keyDetails: pulumi.Input; /** * The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format. */ keyType?: pulumi.Input; /** * The amount of time the session can remain active. */ sessionTtlInSeconds?: pulumi.Input; /** * Details about a bastion session's target resource. */ targetResourceDetails: pulumi.Input; } //# sourceMappingURL=session.d.ts.map