1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseMigration
  5. getConnection
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.DatabaseMigration.getConnection

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testConnection = oci.DatabaseMigration.getConnection({
    connectionId: testConnectionOciDatabaseMigrationConnection.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_connection = oci.DatabaseMigration.get_connection(connection_id=test_connection_oci_database_migration_connection["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/databasemigration"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databasemigration.GetConnection(ctx, &databasemigration.GetConnectionArgs{
			ConnectionId: testConnectionOciDatabaseMigrationConnection.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testConnection = Oci.DatabaseMigration.GetConnection.Invoke(new()
    {
        ConnectionId = testConnectionOciDatabaseMigrationConnection.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DatabaseMigration.DatabaseMigrationFunctions;
import com.pulumi.oci.DatabaseMigration.inputs.GetConnectionArgs;
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) {
        final var testConnection = DatabaseMigrationFunctions.getConnection(GetConnectionArgs.builder()
            .connectionId(testConnectionOciDatabaseMigrationConnection.id())
            .build());

    }
}
Copy
variables:
  testConnection:
    fn::invoke:
      function: oci:DatabaseMigration:getConnection
      arguments:
        connectionId: ${testConnectionOciDatabaseMigrationConnection.id}
Copy

Using getConnection

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getConnection(args: GetConnectionArgs, opts?: InvokeOptions): Promise<GetConnectionResult>
function getConnectionOutput(args: GetConnectionOutputArgs, opts?: InvokeOptions): Output<GetConnectionResult>
Copy
def get_connection(connection_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetConnectionResult
def get_connection_output(connection_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetConnectionResult]
Copy
func GetConnection(ctx *Context, args *GetConnectionArgs, opts ...InvokeOption) (*GetConnectionResult, error)
func GetConnectionOutput(ctx *Context, args *GetConnectionOutputArgs, opts ...InvokeOption) GetConnectionResultOutput
Copy

> Note: This function is named GetConnection in the Go SDK.

public static class GetConnection 
{
    public static Task<GetConnectionResult> InvokeAsync(GetConnectionArgs args, InvokeOptions? opts = null)
    public static Output<GetConnectionResult> Invoke(GetConnectionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
public static Output<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DatabaseMigration/getConnection:getConnection
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ConnectionId This property is required. string
The OCID of the database connection.
ConnectionId This property is required. string
The OCID of the database connection.
connectionId This property is required. String
The OCID of the database connection.
connectionId This property is required. string
The OCID of the database connection.
connection_id This property is required. str
The OCID of the database connection.
connectionId This property is required. String
The OCID of the database connection.

getConnection Result

The following output properties are available:

AdditionalAttributes List<GetConnectionAdditionalAttribute>
An array of name-value pair attribute entries.
CompartmentId string
The OCID of the compartment.
ConnectionId string
ConnectionString string
Connect descriptor or Easy Connect Naming method used to connect to a database.
ConnectionType string
Defines the type of connection. For example, ORACLE.
DatabaseId string
The OCID of the database being referenced.
DatabaseName string
The name of the database being referenced.
DbSystemId string
The OCID of the database system being referenced.
DefinedTags Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
DisplayName string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
FreeformTags Dictionary<string, string>
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"}
Host string
The IP Address of the host.
Id string
The OCID of the connection being referenced.
IngressIps List<GetConnectionIngressIp>
List of ingress IP addresses from where to connect to this connection's privateIp.
KeyId string
The OCID of the key used in cryptographic operations.
LifecycleDetails string
The message describing the current state of the connection's lifecycle in detail. For example, can be used to provide actionable information for a connection in a Failed state.
NsgIds List<string>
An array of Network Security Group OCIDs used to define network access for Connections.
Password string
The password (credential) used when creating or updating this resource.
Port int
The port to be used for the connection.
PrivateEndpointId string
The OCID of the resource being referenced.
ReplicationPassword string
The password (credential) used when creating or updating this resource.
ReplicationUsername string
The username (credential) used when creating or updating this resource.
SecretId string
The OCID of the resource being referenced.
SecurityProtocol string
Security Protocol to be used for the connection.
SshHost string
Name of the host the SSH key is valid for.
SshKey string
Private SSH key string.
SshSudoLocation string
Sudo location
SshUser string
The username (credential) used when creating or updating this resource.
SslCa string
SslCert string
SslCrl string
SslKey string
SslMode string
SSL mode to be used for the connection.
State string
The Connection's current lifecycle state.
SubnetId string
Oracle Cloud Infrastructure resource ID.
SystemTags Dictionary<string, string>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TechnologyType string
The type of MySQL source or target connection. Example: OCI_MYSQL represents Oracle Cloud Infrastructure MySQL HeatWave Database Service
TimeCreated string
The time when this resource was created. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
TimeUpdated string
The time when this resource was updated. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
Username string
The username (credential) used when creating or updating this resource.
VaultId string
Oracle Cloud Infrastructure resource ID.
Wallet string
AdditionalAttributes []GetConnectionAdditionalAttribute
An array of name-value pair attribute entries.
CompartmentId string
The OCID of the compartment.
ConnectionId string
ConnectionString string
Connect descriptor or Easy Connect Naming method used to connect to a database.
ConnectionType string
Defines the type of connection. For example, ORACLE.
DatabaseId string
The OCID of the database being referenced.
DatabaseName string
The name of the database being referenced.
DbSystemId string
The OCID of the database system being referenced.
DefinedTags map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
DisplayName string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
FreeformTags map[string]string
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"}
Host string
The IP Address of the host.
Id string
The OCID of the connection being referenced.
IngressIps []GetConnectionIngressIp
List of ingress IP addresses from where to connect to this connection's privateIp.
KeyId string
The OCID of the key used in cryptographic operations.
LifecycleDetails string
The message describing the current state of the connection's lifecycle in detail. For example, can be used to provide actionable information for a connection in a Failed state.
NsgIds []string
An array of Network Security Group OCIDs used to define network access for Connections.
Password string
The password (credential) used when creating or updating this resource.
Port int
The port to be used for the connection.
PrivateEndpointId string
The OCID of the resource being referenced.
ReplicationPassword string
The password (credential) used when creating or updating this resource.
ReplicationUsername string
The username (credential) used when creating or updating this resource.
SecretId string
The OCID of the resource being referenced.
SecurityProtocol string
Security Protocol to be used for the connection.
SshHost string
Name of the host the SSH key is valid for.
SshKey string
Private SSH key string.
SshSudoLocation string
Sudo location
SshUser string
The username (credential) used when creating or updating this resource.
SslCa string
SslCert string
SslCrl string
SslKey string
SslMode string
SSL mode to be used for the connection.
State string
The Connection's current lifecycle state.
SubnetId string
Oracle Cloud Infrastructure resource ID.
SystemTags map[string]string
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TechnologyType string
The type of MySQL source or target connection. Example: OCI_MYSQL represents Oracle Cloud Infrastructure MySQL HeatWave Database Service
TimeCreated string
The time when this resource was created. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
TimeUpdated string
The time when this resource was updated. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
Username string
The username (credential) used when creating or updating this resource.
VaultId string
Oracle Cloud Infrastructure resource ID.
Wallet string
additionalAttributes List<GetConnectionAdditionalAttribute>
An array of name-value pair attribute entries.
compartmentId String
The OCID of the compartment.
connectionId String
connectionString String
Connect descriptor or Easy Connect Naming method used to connect to a database.
connectionType String
Defines the type of connection. For example, ORACLE.
databaseId String
The OCID of the database being referenced.
databaseName String
The name of the database being referenced.
dbSystemId String
The OCID of the database system being referenced.
definedTags Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
displayName String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTags Map<String,String>
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"}
host String
The IP Address of the host.
id String
The OCID of the connection being referenced.
ingressIps List<GetConnectionIngressIp>
List of ingress IP addresses from where to connect to this connection's privateIp.
keyId String
The OCID of the key used in cryptographic operations.
lifecycleDetails String
The message describing the current state of the connection's lifecycle in detail. For example, can be used to provide actionable information for a connection in a Failed state.
nsgIds List<String>
An array of Network Security Group OCIDs used to define network access for Connections.
password String
The password (credential) used when creating or updating this resource.
port Integer
The port to be used for the connection.
privateEndpointId String
The OCID of the resource being referenced.
replicationPassword String
The password (credential) used when creating or updating this resource.
replicationUsername String
The username (credential) used when creating or updating this resource.
secretId String
The OCID of the resource being referenced.
securityProtocol String
Security Protocol to be used for the connection.
sshHost String
Name of the host the SSH key is valid for.
sshKey String
Private SSH key string.
sshSudoLocation String
Sudo location
sshUser String
The username (credential) used when creating or updating this resource.
sslCa String
sslCert String
sslCrl String
sslKey String
sslMode String
SSL mode to be used for the connection.
state String
The Connection's current lifecycle state.
subnetId String
Oracle Cloud Infrastructure resource ID.
systemTags Map<String,String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
technologyType String
The type of MySQL source or target connection. Example: OCI_MYSQL represents Oracle Cloud Infrastructure MySQL HeatWave Database Service
timeCreated String
The time when this resource was created. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
timeUpdated String
The time when this resource was updated. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
username String
The username (credential) used when creating or updating this resource.
vaultId String
Oracle Cloud Infrastructure resource ID.
wallet String
additionalAttributes GetConnectionAdditionalAttribute[]
An array of name-value pair attribute entries.
compartmentId string
The OCID of the compartment.
connectionId string
connectionString string
Connect descriptor or Easy Connect Naming method used to connect to a database.
connectionType string
Defines the type of connection. For example, ORACLE.
databaseId string
The OCID of the database being referenced.
databaseName string
The name of the database being referenced.
dbSystemId string
The OCID of the database system being referenced.
definedTags {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description string
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
displayName string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTags {[key: string]: string}
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"}
host string
The IP Address of the host.
id string
The OCID of the connection being referenced.
ingressIps GetConnectionIngressIp[]
List of ingress IP addresses from where to connect to this connection's privateIp.
keyId string
The OCID of the key used in cryptographic operations.
lifecycleDetails string
The message describing the current state of the connection's lifecycle in detail. For example, can be used to provide actionable information for a connection in a Failed state.
nsgIds string[]
An array of Network Security Group OCIDs used to define network access for Connections.
password string
The password (credential) used when creating or updating this resource.
port number
The port to be used for the connection.
privateEndpointId string
The OCID of the resource being referenced.
replicationPassword string
The password (credential) used when creating or updating this resource.
replicationUsername string
The username (credential) used when creating or updating this resource.
secretId string
The OCID of the resource being referenced.
securityProtocol string
Security Protocol to be used for the connection.
sshHost string
Name of the host the SSH key is valid for.
sshKey string
Private SSH key string.
sshSudoLocation string
Sudo location
sshUser string
The username (credential) used when creating or updating this resource.
sslCa string
sslCert string
sslCrl string
sslKey string
sslMode string
SSL mode to be used for the connection.
state string
The Connection's current lifecycle state.
subnetId string
Oracle Cloud Infrastructure resource ID.
systemTags {[key: string]: string}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
technologyType string
The type of MySQL source or target connection. Example: OCI_MYSQL represents Oracle Cloud Infrastructure MySQL HeatWave Database Service
timeCreated string
The time when this resource was created. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
timeUpdated string
The time when this resource was updated. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
username string
The username (credential) used when creating or updating this resource.
vaultId string
Oracle Cloud Infrastructure resource ID.
wallet string
additional_attributes Sequence[databasemigration.GetConnectionAdditionalAttribute]
An array of name-value pair attribute entries.
compartment_id str
The OCID of the compartment.
connection_id str
connection_string str
Connect descriptor or Easy Connect Naming method used to connect to a database.
connection_type str
Defines the type of connection. For example, ORACLE.
database_id str
The OCID of the database being referenced.
database_name str
The name of the database being referenced.
db_system_id str
The OCID of the database system being referenced.
defined_tags Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description str
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
display_name str
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeform_tags Mapping[str, str]
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"}
host str
The IP Address of the host.
id str
The OCID of the connection being referenced.
ingress_ips Sequence[databasemigration.GetConnectionIngressIp]
List of ingress IP addresses from where to connect to this connection's privateIp.
key_id str
The OCID of the key used in cryptographic operations.
lifecycle_details str
The message describing the current state of the connection's lifecycle in detail. For example, can be used to provide actionable information for a connection in a Failed state.
nsg_ids Sequence[str]
An array of Network Security Group OCIDs used to define network access for Connections.
password str
The password (credential) used when creating or updating this resource.
port int
The port to be used for the connection.
private_endpoint_id str
The OCID of the resource being referenced.
replication_password str
The password (credential) used when creating or updating this resource.
replication_username str
The username (credential) used when creating or updating this resource.
secret_id str
The OCID of the resource being referenced.
security_protocol str
Security Protocol to be used for the connection.
ssh_host str
Name of the host the SSH key is valid for.
ssh_key str
Private SSH key string.
ssh_sudo_location str
Sudo location
ssh_user str
The username (credential) used when creating or updating this resource.
ssl_ca str
ssl_cert str
ssl_crl str
ssl_key str
ssl_mode str
SSL mode to be used for the connection.
state str
The Connection's current lifecycle state.
subnet_id str
Oracle Cloud Infrastructure resource ID.
system_tags Mapping[str, str]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
technology_type str
The type of MySQL source or target connection. Example: OCI_MYSQL represents Oracle Cloud Infrastructure MySQL HeatWave Database Service
time_created str
The time when this resource was created. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
time_updated str
The time when this resource was updated. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
username str
The username (credential) used when creating or updating this resource.
vault_id str
Oracle Cloud Infrastructure resource ID.
wallet str
additionalAttributes List<Property Map>
An array of name-value pair attribute entries.
compartmentId String
The OCID of the compartment.
connectionId String
connectionString String
Connect descriptor or Easy Connect Naming method used to connect to a database.
connectionType String
Defines the type of connection. For example, ORACLE.
databaseId String
The OCID of the database being referenced.
databaseName String
The name of the database being referenced.
dbSystemId String
The OCID of the database system being referenced.
definedTags Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
displayName String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTags Map<String>
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"}
host String
The IP Address of the host.
id String
The OCID of the connection being referenced.
ingressIps List<Property Map>
List of ingress IP addresses from where to connect to this connection's privateIp.
keyId String
The OCID of the key used in cryptographic operations.
lifecycleDetails String
The message describing the current state of the connection's lifecycle in detail. For example, can be used to provide actionable information for a connection in a Failed state.
nsgIds List<String>
An array of Network Security Group OCIDs used to define network access for Connections.
password String
The password (credential) used when creating or updating this resource.
port Number
The port to be used for the connection.
privateEndpointId String
The OCID of the resource being referenced.
replicationPassword String
The password (credential) used when creating or updating this resource.
replicationUsername String
The username (credential) used when creating or updating this resource.
secretId String
The OCID of the resource being referenced.
securityProtocol String
Security Protocol to be used for the connection.
sshHost String
Name of the host the SSH key is valid for.
sshKey String
Private SSH key string.
sshSudoLocation String
Sudo location
sshUser String
The username (credential) used when creating or updating this resource.
sslCa String
sslCert String
sslCrl String
sslKey String
sslMode String
SSL mode to be used for the connection.
state String
The Connection's current lifecycle state.
subnetId String
Oracle Cloud Infrastructure resource ID.
systemTags Map<String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
technologyType String
The type of MySQL source or target connection. Example: OCI_MYSQL represents Oracle Cloud Infrastructure MySQL HeatWave Database Service
timeCreated String
The time when this resource was created. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
timeUpdated String
The time when this resource was updated. An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
username String
The username (credential) used when creating or updating this resource.
vaultId String
Oracle Cloud Infrastructure resource ID.
wallet String

Supporting Types

GetConnectionAdditionalAttribute

Name This property is required. string
The name of the property entry.
Value This property is required. string
The value of the property entry.
Name This property is required. string
The name of the property entry.
Value This property is required. string
The value of the property entry.
name This property is required. String
The name of the property entry.
value This property is required. String
The value of the property entry.
name This property is required. string
The name of the property entry.
value This property is required. string
The value of the property entry.
name This property is required. str
The name of the property entry.
value This property is required. str
The value of the property entry.
name This property is required. String
The name of the property entry.
value This property is required. String
The value of the property entry.

GetConnectionIngressIp

IngressIp This property is required. string
A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
IngressIp This property is required. string
A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
ingressIp This property is required. String
A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
ingressIp This property is required. string
A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
ingress_ip This property is required. str
A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
ingressIp This property is required. String
A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi