1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataCatalog
  5. getConnection
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.DataCatalog.getConnection

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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 GetConnection(ctx *Context, args *GetConnectionArgs, opts ...InvokeOption) (*GetConnectionResult, error)
    func GetConnectionOutput(ctx *Context, args *GetConnectionOutputArgs, opts ...InvokeOption) GetConnectionResultOutput

    > 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)
    }
    public static CompletableFuture<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataCatalog/getConnection:getConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CatalogId string
    Unique catalog identifier.
    ConnectionKey string
    Unique connection key.
    DataAssetKey string
    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.
    DataAssetKey string
    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.
    dataAssetKey String
    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.
    dataAssetKey string
    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_key str
    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.
    dataAssetKey String
    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
    CreatedById string
    OCID of the user who created the connection.
    DataAssetKey string
    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
    TimeStatusUpdated string
    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.
    UpdatedById string
    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
    CreatedById string
    OCID of the user who created the connection.
    DataAssetKey string
    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
    TimeStatusUpdated string
    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.
    UpdatedById string
    OCID of the user who modified the connection.
    Uri string
    URI to the connection instance in the API.
    Fields []string
    catalogId String
    connectionKey String
    createdById String
    OCID of the user who created the connection.
    dataAssetKey String
    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
    timeStatusUpdated String
    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.
    updatedById String
    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
    createdById string
    OCID of the user who created the connection.
    dataAssetKey string
    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
    timeStatusUpdated string
    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.
    updatedById string
    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_id str
    OCID of the user who created the connection.
    data_asset_key str
    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_updated str
    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_id str
    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
    createdById String
    OCID of the user who created the connection.
    dataAssetKey String
    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
    timeStatusUpdated String
    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.
    updatedById String
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi