oci.Database.DbNodeConsoleConnection
Explore with Pulumi AI
This resource provides the Db Node Console Connection resource in Oracle Cloud Infrastructure Database service.
Creates a new console connection to the specified database node. After the console connection has been created and is available, you connect to the console using SSH.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDbNodeConsoleConnection = new oci.database.DbNodeConsoleConnection("test_db_node_console_connection", {
    dbNodeId: testDbNode.id,
    publicKey: dbNodeConsoleConnectionPublicKey,
    definedTags: dbNodeConsoleConnectionDefinedTags,
    freeformTags: {
        Department: "Finance",
    },
});
import pulumi
import pulumi_oci as oci
test_db_node_console_connection = oci.database.DbNodeConsoleConnection("test_db_node_console_connection",
    db_node_id=test_db_node["id"],
    public_key=db_node_console_connection_public_key,
    defined_tags=db_node_console_connection_defined_tags,
    freeform_tags={
        "Department": "Finance",
    })
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := database.NewDbNodeConsoleConnection(ctx, "test_db_node_console_connection", &database.DbNodeConsoleConnectionArgs{
			DbNodeId:    pulumi.Any(testDbNode.Id),
			PublicKey:   pulumi.Any(dbNodeConsoleConnectionPublicKey),
			DefinedTags: pulumi.Any(dbNodeConsoleConnectionDefinedTags),
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("Finance"),
			},
		})
		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 testDbNodeConsoleConnection = new Oci.Database.DbNodeConsoleConnection("test_db_node_console_connection", new()
    {
        DbNodeId = testDbNode.Id,
        PublicKey = dbNodeConsoleConnectionPublicKey,
        DefinedTags = dbNodeConsoleConnectionDefinedTags,
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DbNodeConsoleConnection;
import com.pulumi.oci.Database.DbNodeConsoleConnectionArgs;
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 testDbNodeConsoleConnection = new DbNodeConsoleConnection("testDbNodeConsoleConnection", DbNodeConsoleConnectionArgs.builder()
            .dbNodeId(testDbNode.id())
            .publicKey(dbNodeConsoleConnectionPublicKey)
            .definedTags(dbNodeConsoleConnectionDefinedTags)
            .freeformTags(Map.of("Department", "Finance"))
            .build());
    }
}
resources:
  testDbNodeConsoleConnection:
    type: oci:Database:DbNodeConsoleConnection
    name: test_db_node_console_connection
    properties:
      dbNodeId: ${testDbNode.id}
      publicKey: ${dbNodeConsoleConnectionPublicKey}
      definedTags: ${dbNodeConsoleConnectionDefinedTags}
      freeformTags:
        Department: Finance
Create DbNodeConsoleConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DbNodeConsoleConnection(name: string, args: DbNodeConsoleConnectionArgs, opts?: CustomResourceOptions);@overload
def DbNodeConsoleConnection(resource_name: str,
                            args: DbNodeConsoleConnectionArgs,
                            opts: Optional[ResourceOptions] = None)
@overload
def DbNodeConsoleConnection(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            db_node_id: Optional[str] = None,
                            public_key: Optional[str] = None,
                            defined_tags: Optional[Mapping[str, str]] = None,
                            freeform_tags: Optional[Mapping[str, str]] = None)func NewDbNodeConsoleConnection(ctx *Context, name string, args DbNodeConsoleConnectionArgs, opts ...ResourceOption) (*DbNodeConsoleConnection, error)public DbNodeConsoleConnection(string name, DbNodeConsoleConnectionArgs args, CustomResourceOptions? opts = null)
public DbNodeConsoleConnection(String name, DbNodeConsoleConnectionArgs args)
public DbNodeConsoleConnection(String name, DbNodeConsoleConnectionArgs args, CustomResourceOptions options)
type: oci:Database:DbNodeConsoleConnection
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 DbNodeConsoleConnectionArgs
- 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 DbNodeConsoleConnectionArgs
- 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 DbNodeConsoleConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DbNodeConsoleConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DbNodeConsoleConnectionArgs
- 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 dbNodeConsoleConnectionResource = new Oci.Database.DbNodeConsoleConnection("dbNodeConsoleConnectionResource", new()
{
    DbNodeId = "string",
    PublicKey = "string",
    DefinedTags = 
    {
        { "string", "string" },
    },
    FreeformTags = 
    {
        { "string", "string" },
    },
});
example, err := database.NewDbNodeConsoleConnection(ctx, "dbNodeConsoleConnectionResource", &database.DbNodeConsoleConnectionArgs{
	DbNodeId:  pulumi.String("string"),
	PublicKey: pulumi.String("string"),
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var dbNodeConsoleConnectionResource = new DbNodeConsoleConnection("dbNodeConsoleConnectionResource", DbNodeConsoleConnectionArgs.builder()
    .dbNodeId("string")
    .publicKey("string")
    .definedTags(Map.of("string", "string"))
    .freeformTags(Map.of("string", "string"))
    .build());
db_node_console_connection_resource = oci.database.DbNodeConsoleConnection("dbNodeConsoleConnectionResource",
    db_node_id="string",
    public_key="string",
    defined_tags={
        "string": "string",
    },
    freeform_tags={
        "string": "string",
    })
const dbNodeConsoleConnectionResource = new oci.database.DbNodeConsoleConnection("dbNodeConsoleConnectionResource", {
    dbNodeId: "string",
    publicKey: "string",
    definedTags: {
        string: "string",
    },
    freeformTags: {
        string: "string",
    },
});
type: oci:Database:DbNodeConsoleConnection
properties:
    dbNodeId: string
    definedTags:
        string: string
    freeformTags:
        string: string
    publicKey: string
DbNodeConsoleConnection 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 DbNodeConsoleConnection resource accepts the following input properties:
- DbNode stringId 
- The database node OCID.
- PublicKey string
- The SSH public key used to authenticate the console connection. - ** 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 
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- DbNode stringId 
- The database node OCID.
- PublicKey string
- The SSH public key used to authenticate the console connection. - ** 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 
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- dbNode StringId 
- The database node OCID.
- publicKey String
- The SSH public key used to authenticate the console connection. - ** 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 
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- dbNode stringId 
- The database node OCID.
- publicKey string
- The SSH public key used to authenticate the console connection. - ** 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 
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- db_node_ strid 
- The database node OCID.
- public_key str
- The SSH public key used to authenticate the console connection. - ** 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 
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- dbNode StringId 
- The database node OCID.
- publicKey String
- The SSH public key used to authenticate the console connection. - ** 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 
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Outputs
All input properties are implicitly available as output properties. Additionally, the DbNodeConsoleConnection resource produces the following output properties:
- CompartmentId string
- The OCID of the compartment to contain the console connection.
- ConnectionString string
- The SSH connection string for the console connection.
- Fingerprint string
- The SSH public key fingerprint for the console connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- LifecycleDetails string
- Information about the current lifecycle state.
- ServiceHost stringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- CompartmentId string
- The OCID of the compartment to contain the console connection.
- ConnectionString string
- The SSH connection string for the console connection.
- Fingerprint string
- The SSH public key fingerprint for the console connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- LifecycleDetails string
- Information about the current lifecycle state.
- ServiceHost stringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- compartmentId String
- The OCID of the compartment to contain the console connection.
- connectionString String
- The SSH connection string for the console connection.
- fingerprint String
- The SSH public key fingerprint for the console connection.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycleDetails String
- Information about the current lifecycle state.
- serviceHost StringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
- compartmentId string
- The OCID of the compartment to contain the console connection.
- connectionString string
- The SSH connection string for the console connection.
- fingerprint string
- The SSH public key fingerprint for the console connection.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycleDetails string
- Information about the current lifecycle state.
- serviceHost stringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state string
- The current state of the console connection.
- compartment_id str
- The OCID of the compartment to contain the console connection.
- connection_string str
- The SSH connection string for the console connection.
- fingerprint str
- The SSH public key fingerprint for the console connection.
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_details str
- Information about the current lifecycle state.
- service_host_ strkey_ fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state str
- The current state of the console connection.
- compartmentId String
- The OCID of the compartment to contain the console connection.
- connectionString String
- The SSH connection string for the console connection.
- fingerprint String
- The SSH public key fingerprint for the console connection.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycleDetails String
- Information about the current lifecycle state.
- serviceHost StringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
Look up Existing DbNodeConsoleConnection Resource
Get an existing DbNodeConsoleConnection 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?: DbNodeConsoleConnectionState, opts?: CustomResourceOptions): DbNodeConsoleConnection@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        connection_string: Optional[str] = None,
        db_node_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        fingerprint: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        lifecycle_details: Optional[str] = None,
        public_key: Optional[str] = None,
        service_host_key_fingerprint: Optional[str] = None,
        state: Optional[str] = None) -> DbNodeConsoleConnectionfunc GetDbNodeConsoleConnection(ctx *Context, name string, id IDInput, state *DbNodeConsoleConnectionState, opts ...ResourceOption) (*DbNodeConsoleConnection, error)public static DbNodeConsoleConnection Get(string name, Input<string> id, DbNodeConsoleConnectionState? state, CustomResourceOptions? opts = null)public static DbNodeConsoleConnection get(String name, Output<String> id, DbNodeConsoleConnectionState state, CustomResourceOptions options)resources:  _:    type: oci:Database:DbNodeConsoleConnection    get:      id: ${id}- 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.
- CompartmentId string
- The OCID of the compartment to contain the console connection.
- ConnectionString string
- The SSH connection string for the console connection.
- DbNode stringId 
- The database node OCID.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Fingerprint string
- The SSH public key fingerprint for the console connection.
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- LifecycleDetails string
- Information about the current lifecycle state.
- PublicKey string
- The SSH public key used to authenticate the console connection. - ** 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 
- ServiceHost stringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- CompartmentId string
- The OCID of the compartment to contain the console connection.
- ConnectionString string
- The SSH connection string for the console connection.
- DbNode stringId 
- The database node OCID.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Fingerprint string
- The SSH public key fingerprint for the console connection.
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- LifecycleDetails string
- Information about the current lifecycle state.
- PublicKey string
- The SSH public key used to authenticate the console connection. - ** 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 
- ServiceHost stringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- compartmentId String
- The OCID of the compartment to contain the console connection.
- connectionString String
- The SSH connection string for the console connection.
- dbNode StringId 
- The database node OCID.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fingerprint String
- The SSH public key fingerprint for the console connection.
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- lifecycleDetails String
- Information about the current lifecycle state.
- publicKey String
- The SSH public key used to authenticate the console connection. - ** 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 
- serviceHost StringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
- compartmentId string
- The OCID of the compartment to contain the console connection.
- connectionString string
- The SSH connection string for the console connection.
- dbNode stringId 
- The database node OCID.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fingerprint string
- The SSH public key fingerprint for the console connection.
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- lifecycleDetails string
- Information about the current lifecycle state.
- publicKey string
- The SSH public key used to authenticate the console connection. - ** 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 
- serviceHost stringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state string
- The current state of the console connection.
- compartment_id str
- The OCID of the compartment to contain the console connection.
- connection_string str
- The SSH connection string for the console connection.
- db_node_ strid 
- The database node OCID.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fingerprint str
- The SSH public key fingerprint for the console connection.
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- lifecycle_details str
- Information about the current lifecycle state.
- public_key str
- The SSH public key used to authenticate the console connection. - ** 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 
- service_host_ strkey_ fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state str
- The current state of the console connection.
- compartmentId String
- The OCID of the compartment to contain the console connection.
- connectionString String
- The SSH connection string for the console connection.
- dbNode StringId 
- The database node OCID.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fingerprint String
- The SSH public key fingerprint for the console connection.
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- lifecycleDetails String
- Information about the current lifecycle state.
- publicKey String
- The SSH public key used to authenticate the console connection. - ** 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 
- serviceHost StringKey Fingerprint 
- The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
Import
DbNodeConsoleConnections can be imported using the id, e.g.
$ pulumi import oci:Database/dbNodeConsoleConnection:DbNodeConsoleConnection test_db_node_console_connection "dbNodes/{dbNodeId}/consoleConnections/{consoleConnectionId}"
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 ociTerraform Provider.