Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DatabaseMigration.getConnection
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testConnection = oci.DatabaseMigration.getConnection({
    connectionId: testConnectionOciDatabaseMigrationConnection.id,
});
import pulumi
import pulumi_oci as oci
test_connection = oci.DatabaseMigration.get_connection(connection_id=test_connection_oci_database_migration_connection["id"])
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
	})
}
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,
    });
});
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());
    }
}
variables:
  testConnection:
    fn::invoke:
      function: oci:DatabaseMigration:getConnection
      arguments:
        connectionId: ${testConnectionOciDatabaseMigrationConnection.id}
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>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]func LookupConnection(ctx *Context, args *LookupConnectionArgs, opts ...InvokeOption) (*LookupConnectionResult, error)
func LookupConnectionOutput(ctx *Context, args *LookupConnectionOutputArgs, opts ...InvokeOption) LookupConnectionResultOutput> Note: This function is named LookupConnection 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)
}public static CompletableFuture<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
public static Output<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DatabaseMigration/getConnection:getConnection
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ConnectionId string
- The OCID of the database connection.
- ConnectionId string
- The OCID of the database connection.
- connectionId String
- The OCID of the database connection.
- connectionId string
- The OCID of the database connection.
- connection_id str
- The OCID of the database connection.
- connectionId String
- The OCID of the database connection.
getConnection Result
The following output properties are available:
- AdditionalAttributes List<GetConnection Additional Attribute> 
- 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.
- DbSystem stringId 
- The OCID of the database system being referenced.
- 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.
- 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<GetConnection Ingress Ip> 
- 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.
- PrivateEndpoint stringId 
- 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.
- SshSudo stringLocation 
- 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.
- 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 []GetConnection Additional Attribute 
- 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.
- DbSystem stringId 
- The OCID of the database system being referenced.
- 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.
- 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 []GetConnection Ingress Ip 
- 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.
- PrivateEndpoint stringId 
- 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.
- SshSudo stringLocation 
- 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.
- 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<GetConnection Additional Attribute> 
- 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.
- dbSystem StringId 
- The OCID of the database system being referenced.
- 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.
- 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<GetConnection Ingress Ip> 
- 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.
- privateEndpoint StringId 
- 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.
- sshSudo StringLocation 
- 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.
- 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 GetConnection Additional Attribute[] 
- 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.
- dbSystem stringId 
- The OCID of the database system being referenced.
- {[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.
- {[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 GetConnection Ingress Ip[] 
- 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.
- privateEndpoint stringId 
- 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.
- sshSudo stringLocation 
- 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.
- {[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[GetConnection Additional Attribute] 
- 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_ strid 
- The OCID of the database system being referenced.
- 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.
- 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[GetConnection Ingress Ip] 
- 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_ strid 
- 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_ strlocation 
- 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.
- 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.
- dbSystem StringId 
- The OCID of the database system being referenced.
- 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.
- 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.
- privateEndpoint StringId 
- 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.
- sshSudo StringLocation 
- 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.
- 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   
GetConnectionIngressIp   
- IngressIp string
- A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
- IngressIp string
- A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
- ingressIp String
- A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
- ingressIp string
- A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
- ingress_ip str
- A Private Endpoint IPv4 or IPv6 Address created in the customer's subnet.
- ingressIp 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 ociTerraform Provider.