Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DataCatalog.getConnection
Explore with Pulumi AI
This data source provides details about a specific Connection resource in Oracle Cloud Infrastructure Data Catalog service.
Gets a specific data asset connection by key.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testConnection = oci.DataCatalog.getConnection({
    catalogId: testCatalog.id,
    connectionKey: connectionConnectionKey,
    dataAssetKey: connectionDataAssetKey,
    fields: connectionFields,
});
import pulumi
import pulumi_oci as oci
test_connection = oci.DataCatalog.get_connection(catalog_id=test_catalog["id"],
    connection_key=connection_connection_key,
    data_asset_key=connection_data_asset_key,
    fields=connection_fields)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/datacatalog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datacatalog.GetConnection(ctx, &datacatalog.GetConnectionArgs{
			CatalogId:     testCatalog.Id,
			ConnectionKey: connectionConnectionKey,
			DataAssetKey:  connectionDataAssetKey,
			Fields:        connectionFields,
		}, 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.DataCatalog.GetConnection.Invoke(new()
    {
        CatalogId = testCatalog.Id,
        ConnectionKey = connectionConnectionKey,
        DataAssetKey = connectionDataAssetKey,
        Fields = connectionFields,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataCatalog.DataCatalogFunctions;
import com.pulumi.oci.DataCatalog.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 = DataCatalogFunctions.getConnection(GetConnectionArgs.builder()
            .catalogId(testCatalog.id())
            .connectionKey(connectionConnectionKey)
            .dataAssetKey(connectionDataAssetKey)
            .fields(connectionFields)
            .build());
    }
}
variables:
  testConnection:
    fn::invoke:
      function: oci:DataCatalog:getConnection
      arguments:
        catalogId: ${testCatalog.id}
        connectionKey: ${connectionConnectionKey}
        dataAssetKey: ${connectionDataAssetKey}
        fields: ${connectionFields}
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(catalog_id: Optional[str] = None,
                   connection_key: Optional[str] = None,
                   data_asset_key: Optional[str] = None,
                   fields: Optional[Sequence[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetConnectionResult
def get_connection_output(catalog_id: Optional[pulumi.Input[str]] = None,
                   connection_key: Optional[pulumi.Input[str]] = None,
                   data_asset_key: Optional[pulumi.Input[str]] = None,
                   fields: Optional[pulumi.Input[Sequence[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:DataCatalog/getConnection:getConnection
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CatalogId string
- Unique catalog identifier.
- ConnectionKey string
- Unique connection key.
- DataAsset stringKey 
- Unique data asset key.
- Fields List<string>
- Specifies the fields to return in a connection response.
- CatalogId string
- Unique catalog identifier.
- ConnectionKey string
- Unique connection key.
- DataAsset stringKey 
- Unique data asset key.
- Fields []string
- Specifies the fields to return in a connection response.
- catalogId String
- Unique catalog identifier.
- connectionKey String
- Unique connection key.
- dataAsset StringKey 
- Unique data asset key.
- fields List<String>
- Specifies the fields to return in a connection response.
- catalogId string
- Unique catalog identifier.
- connectionKey string
- Unique connection key.
- dataAsset stringKey 
- Unique data asset key.
- fields string[]
- Specifies the fields to return in a connection response.
- catalog_id str
- Unique catalog identifier.
- connection_key str
- Unique connection key.
- data_asset_ strkey 
- Unique data asset key.
- fields Sequence[str]
- Specifies the fields to return in a connection response.
- catalogId String
- Unique catalog identifier.
- connectionKey String
- Unique connection key.
- dataAsset StringKey 
- Unique data asset key.
- fields List<String>
- Specifies the fields to return in a connection response.
getConnection Result
The following output properties are available:
- CatalogId string
- ConnectionKey string
- CreatedBy stringId 
- OCID of the user who created the connection.
- DataAsset stringKey 
- Unique key of the parent data asset.
- Description string
- A description of the connection.
- DisplayName string
- A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- EncProperties Dictionary<string, string>
- ExternalKey string
- Unique external key of this object from the source system.
- Id string
- IsDefault bool
- Indicates whether this connection is the default connection.
- Key string
- Unique connection key that is immutable.
- Properties Dictionary<string, string>
- A map of maps that contains the properties which are specific to the connection type. Each connection type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most connections have required properties within the "default" category. Example: {"properties": { "default": { "username": "user1"}}}
- State string
- The current state of the connection.
- TimeCreated string
- The date and time the connection was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
- TimeStatus stringUpdated 
- Time that the connections status was last updated. An RFC3339 formatted datetime string.
- TimeUpdated string
- The last time that any change was made to the connection. An RFC3339 formatted datetime string.
- TypeKey string
- The key of the object type. Type key's can be found via the '/types' endpoint.
- UpdatedBy stringId 
- OCID of the user who modified the connection.
- Uri string
- URI to the connection instance in the API.
- Fields List<string>
- CatalogId string
- ConnectionKey string
- CreatedBy stringId 
- OCID of the user who created the connection.
- DataAsset stringKey 
- Unique key of the parent data asset.
- Description string
- A description of the connection.
- DisplayName string
- A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- EncProperties map[string]string
- ExternalKey string
- Unique external key of this object from the source system.
- Id string
- IsDefault bool
- Indicates whether this connection is the default connection.
- Key string
- Unique connection key that is immutable.
- Properties map[string]string
- A map of maps that contains the properties which are specific to the connection type. Each connection type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most connections have required properties within the "default" category. Example: {"properties": { "default": { "username": "user1"}}}
- State string
- The current state of the connection.
- TimeCreated string
- The date and time the connection was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
- TimeStatus stringUpdated 
- Time that the connections status was last updated. An RFC3339 formatted datetime string.
- TimeUpdated string
- The last time that any change was made to the connection. An RFC3339 formatted datetime string.
- TypeKey string
- The key of the object type. Type key's can be found via the '/types' endpoint.
- UpdatedBy stringId 
- OCID of the user who modified the connection.
- Uri string
- URI to the connection instance in the API.
- Fields []string
- catalogId String
- connectionKey String
- createdBy StringId 
- OCID of the user who created the connection.
- dataAsset StringKey 
- Unique key of the parent data asset.
- description String
- A description of the connection.
- displayName String
- A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- encProperties Map<String,String>
- externalKey String
- Unique external key of this object from the source system.
- id String
- isDefault Boolean
- Indicates whether this connection is the default connection.
- key String
- Unique connection key that is immutable.
- properties Map<String,String>
- A map of maps that contains the properties which are specific to the connection type. Each connection type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most connections have required properties within the "default" category. Example: {"properties": { "default": { "username": "user1"}}}
- state String
- The current state of the connection.
- timeCreated String
- The date and time the connection was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
- timeStatus StringUpdated 
- Time that the connections status was last updated. An RFC3339 formatted datetime string.
- timeUpdated String
- The last time that any change was made to the connection. An RFC3339 formatted datetime string.
- typeKey String
- The key of the object type. Type key's can be found via the '/types' endpoint.
- updatedBy StringId 
- OCID of the user who modified the connection.
- uri String
- URI to the connection instance in the API.
- fields List<String>
- catalogId string
- connectionKey string
- createdBy stringId 
- OCID of the user who created the connection.
- dataAsset stringKey 
- Unique key of the parent data asset.
- description string
- A description of the connection.
- displayName string
- A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- encProperties {[key: string]: string}
- externalKey string
- Unique external key of this object from the source system.
- id string
- isDefault boolean
- Indicates whether this connection is the default connection.
- key string
- Unique connection key that is immutable.
- properties {[key: string]: string}
- A map of maps that contains the properties which are specific to the connection type. Each connection type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most connections have required properties within the "default" category. Example: {"properties": { "default": { "username": "user1"}}}
- state string
- The current state of the connection.
- timeCreated string
- The date and time the connection was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
- timeStatus stringUpdated 
- Time that the connections status was last updated. An RFC3339 formatted datetime string.
- timeUpdated string
- The last time that any change was made to the connection. An RFC3339 formatted datetime string.
- typeKey string
- The key of the object type. Type key's can be found via the '/types' endpoint.
- updatedBy stringId 
- OCID of the user who modified the connection.
- uri string
- URI to the connection instance in the API.
- fields string[]
- catalog_id str
- connection_key str
- created_by_ strid 
- OCID of the user who created the connection.
- data_asset_ strkey 
- Unique key of the parent data asset.
- description str
- A description of the connection.
- display_name str
- A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- enc_properties Mapping[str, str]
- external_key str
- Unique external key of this object from the source system.
- id str
- is_default bool
- Indicates whether this connection is the default connection.
- key str
- Unique connection key that is immutable.
- properties Mapping[str, str]
- A map of maps that contains the properties which are specific to the connection type. Each connection type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most connections have required properties within the "default" category. Example: {"properties": { "default": { "username": "user1"}}}
- state str
- The current state of the connection.
- time_created str
- The date and time the connection was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
- time_status_ strupdated 
- Time that the connections status was last updated. An RFC3339 formatted datetime string.
- time_updated str
- The last time that any change was made to the connection. An RFC3339 formatted datetime string.
- type_key str
- The key of the object type. Type key's can be found via the '/types' endpoint.
- updated_by_ strid 
- OCID of the user who modified the connection.
- uri str
- URI to the connection instance in the API.
- fields Sequence[str]
- catalogId String
- connectionKey String
- createdBy StringId 
- OCID of the user who created the connection.
- dataAsset StringKey 
- Unique key of the parent data asset.
- description String
- A description of the connection.
- displayName String
- A user-friendly display name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- encProperties Map<String>
- externalKey String
- Unique external key of this object from the source system.
- id String
- isDefault Boolean
- Indicates whether this connection is the default connection.
- key String
- Unique connection key that is immutable.
- properties Map<String>
- A map of maps that contains the properties which are specific to the connection type. Each connection type definition defines it's set of required and optional properties. The map keys are category names and the values are maps of property name to property value. Every property is contained inside of a category. Most connections have required properties within the "default" category. Example: {"properties": { "default": { "username": "user1"}}}
- state String
- The current state of the connection.
- timeCreated String
- The date and time the connection was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
- timeStatus StringUpdated 
- Time that the connections status was last updated. An RFC3339 formatted datetime string.
- timeUpdated String
- The last time that any change was made to the connection. An RFC3339 formatted datetime string.
- typeKey String
- The key of the object type. Type key's can be found via the '/types' endpoint.
- updatedBy StringId 
- OCID of the user who modified the connection.
- uri String
- URI to the connection instance in the API.
- fields List<String>
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.