1. Packages
  2. Ibm Provider
  3. API Docs
  4. getDb2ConnectionInfo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getDb2ConnectionInfo

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about connection info of an existing IBM Db2 Instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const db2ConnectionInfo = ibm.getDb2ConnectionInfo({
        deploymentId: "<encoded_crn>",
        xDeploymentId: "<crn>",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    db2_connection_info = ibm.get_db2_connection_info(deployment_id="<encoded_crn>",
        x_deployment_id="<crn>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetDb2ConnectionInfo(ctx, &ibm.GetDb2ConnectionInfoArgs{
    			DeploymentId:  "<encoded_crn>",
    			XDeploymentId: "<crn>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var db2ConnectionInfo = Ibm.GetDb2ConnectionInfo.Invoke(new()
        {
            DeploymentId = "<encoded_crn>",
            XDeploymentId = "<crn>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetDb2ConnectionInfoArgs;
    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 db2ConnectionInfo = IbmFunctions.getDb2ConnectionInfo(GetDb2ConnectionInfoArgs.builder()
                .deploymentId("<encoded_crn>")
                .xDeploymentId("<crn>")
                .build());
    
        }
    }
    
    variables:
      db2ConnectionInfo:
        fn::invoke:
          function: ibm:getDb2ConnectionInfo
          arguments:
            deploymentId: <encoded_crn>
            xDeploymentId: <crn>
    

    Using getDb2ConnectionInfo

    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 getDb2ConnectionInfo(args: GetDb2ConnectionInfoArgs, opts?: InvokeOptions): Promise<GetDb2ConnectionInfoResult>
    function getDb2ConnectionInfoOutput(args: GetDb2ConnectionInfoOutputArgs, opts?: InvokeOptions): Output<GetDb2ConnectionInfoResult>
    def get_db2_connection_info(deployment_id: Optional[str] = None,
                                id: Optional[str] = None,
                                x_deployment_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetDb2ConnectionInfoResult
    def get_db2_connection_info_output(deployment_id: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                x_deployment_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetDb2ConnectionInfoResult]
    func GetDb2ConnectionInfo(ctx *Context, args *GetDb2ConnectionInfoArgs, opts ...InvokeOption) (*GetDb2ConnectionInfoResult, error)
    func GetDb2ConnectionInfoOutput(ctx *Context, args *GetDb2ConnectionInfoOutputArgs, opts ...InvokeOption) GetDb2ConnectionInfoResultOutput

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

    public static class GetDb2ConnectionInfo 
    {
        public static Task<GetDb2ConnectionInfoResult> InvokeAsync(GetDb2ConnectionInfoArgs args, InvokeOptions? opts = null)
        public static Output<GetDb2ConnectionInfoResult> Invoke(GetDb2ConnectionInfoInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDb2ConnectionInfoResult> getDb2ConnectionInfo(GetDb2ConnectionInfoArgs args, InvokeOptions options)
    public static Output<GetDb2ConnectionInfoResult> getDb2ConnectionInfo(GetDb2ConnectionInfoArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getDb2ConnectionInfo:getDb2ConnectionInfo
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeploymentId string
    Encoded CRN of the instance this connection info relates to.
    XDeploymentId string
    CRN of the instance this connection info relates to.
    Id string
    DeploymentId string
    Encoded CRN of the instance this connection info relates to.
    XDeploymentId string
    CRN of the instance this connection info relates to.
    Id string
    deploymentId String
    Encoded CRN of the instance this connection info relates to.
    xDeploymentId String
    CRN of the instance this connection info relates to.
    id String
    deploymentId string
    Encoded CRN of the instance this connection info relates to.
    xDeploymentId string
    CRN of the instance this connection info relates to.
    id string
    deployment_id str
    Encoded CRN of the instance this connection info relates to.
    x_deployment_id str
    CRN of the instance this connection info relates to.
    id str
    deploymentId String
    Encoded CRN of the instance this connection info relates to.
    xDeploymentId String
    CRN of the instance this connection info relates to.
    id String

    getDb2ConnectionInfo Result

    The following output properties are available:

    DeploymentId string
    Id string
    Privates List<GetDb2ConnectionInfoPrivate>
    (String) An array of private connections. Nested scheme for private:
    Publics List<GetDb2ConnectionInfoPublic>
    (String) An array of public connections. Nested scheme for public:
    XDeploymentId string
    DeploymentId string
    Id string
    Privates []GetDb2ConnectionInfoPrivate
    (String) An array of private connections. Nested scheme for private:
    Publics []GetDb2ConnectionInfoPublic
    (String) An array of public connections. Nested scheme for public:
    XDeploymentId string
    deploymentId String
    id String
    privates List<GetDb2ConnectionInfoPrivate>
    (String) An array of private connections. Nested scheme for private:
    publics List<GetDb2ConnectionInfoPublic>
    (String) An array of public connections. Nested scheme for public:
    xDeploymentId String
    deploymentId string
    id string
    privates GetDb2ConnectionInfoPrivate[]
    (String) An array of private connections. Nested scheme for private:
    publics GetDb2ConnectionInfoPublic[]
    (String) An array of public connections. Nested scheme for public:
    xDeploymentId string
    deployment_id str
    id str
    privates Sequence[GetDb2ConnectionInfoPrivate]
    (String) An array of private connections. Nested scheme for private:
    publics Sequence[GetDb2ConnectionInfoPublic]
    (String) An array of public connections. Nested scheme for public:
    x_deployment_id str
    deploymentId String
    id String
    privates List<Property Map>
    (String) An array of private connections. Nested scheme for private:
    publics List<Property Map>
    (String) An array of public connections. Nested scheme for public:
    xDeploymentId String

    Supporting Types

    GetDb2ConnectionInfoPrivate

    CloudServiceOffering string
    (String) The type of cloud service offering, specifying the DB2 instance as part of a managed service.
    DatabaseName string
    DatabaseVersion string
    DbVpcEndpointService string
    (String) The endpoint service that facilitates secure communication within a VPC for the DB2 instance.
    Hostname string
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    PrivateServiceName string
    Ssl bool
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    SslPort string
    VpeServiceCrn string
    (String) The CRN that uniquely identifies the Virtual Private Endpoint (VPE) service used for secure access to the DB2 instance.
    CloudServiceOffering string
    (String) The type of cloud service offering, specifying the DB2 instance as part of a managed service.
    DatabaseName string
    DatabaseVersion string
    DbVpcEndpointService string
    (String) The endpoint service that facilitates secure communication within a VPC for the DB2 instance.
    Hostname string
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    PrivateServiceName string
    Ssl bool
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    SslPort string
    VpeServiceCrn string
    (String) The CRN that uniquely identifies the Virtual Private Endpoint (VPE) service used for secure access to the DB2 instance.
    cloudServiceOffering String
    (String) The type of cloud service offering, specifying the DB2 instance as part of a managed service.
    databaseName String
    databaseVersion String
    dbVpcEndpointService String
    (String) The endpoint service that facilitates secure communication within a VPC for the DB2 instance.
    hostname String
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    privateServiceName String
    ssl Boolean
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    sslPort String
    vpeServiceCrn String
    (String) The CRN that uniquely identifies the Virtual Private Endpoint (VPE) service used for secure access to the DB2 instance.
    cloudServiceOffering string
    (String) The type of cloud service offering, specifying the DB2 instance as part of a managed service.
    databaseName string
    databaseVersion string
    dbVpcEndpointService string
    (String) The endpoint service that facilitates secure communication within a VPC for the DB2 instance.
    hostname string
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    privateServiceName string
    ssl boolean
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    sslPort string
    vpeServiceCrn string
    (String) The CRN that uniquely identifies the Virtual Private Endpoint (VPE) service used for secure access to the DB2 instance.
    cloud_service_offering str
    (String) The type of cloud service offering, specifying the DB2 instance as part of a managed service.
    database_name str
    database_version str
    db_vpc_endpoint_service str
    (String) The endpoint service that facilitates secure communication within a VPC for the DB2 instance.
    hostname str
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    private_service_name str
    ssl bool
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    ssl_port str
    vpe_service_crn str
    (String) The CRN that uniquely identifies the Virtual Private Endpoint (VPE) service used for secure access to the DB2 instance.
    cloudServiceOffering String
    (String) The type of cloud service offering, specifying the DB2 instance as part of a managed service.
    databaseName String
    databaseVersion String
    dbVpcEndpointService String
    (String) The endpoint service that facilitates secure communication within a VPC for the DB2 instance.
    hostname String
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    privateServiceName String
    ssl Boolean
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    sslPort String
    vpeServiceCrn String
    (String) The CRN that uniquely identifies the Virtual Private Endpoint (VPE) service used for secure access to the DB2 instance.

    GetDb2ConnectionInfoPublic

    DatabaseName string
    DatabaseVersion string
    Hostname string
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    Ssl bool
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    SslPort string
    DatabaseName string
    DatabaseVersion string
    Hostname string
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    Ssl bool
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    SslPort string
    databaseName String
    databaseVersion String
    hostname String
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    ssl Boolean
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    sslPort String
    databaseName string
    databaseVersion string
    hostname string
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    ssl boolean
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    sslPort string
    database_name str
    database_version str
    hostname str
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    ssl bool
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    ssl_port str
    databaseName String
    databaseVersion String
    hostname String
    (String) The public-facing hostname of the DB2 instance.

    • databaseName - (String) The name of the specific DB2 database instance.
    • sslPort - (String) The port number used for SSL communication to the DB2 instance.
    ssl Boolean
    (Boolean) A boolean value indicating whether SSL is enabled for the connection.

    • databaseVersion - (String) The version of the DB2 database software running on the instance.
    • private_serviceName - (String) The service name used for private access to the DB2 instance.
    sslPort String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud