1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getExternalMySqlDatabase
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.DatabaseManagement.getExternalMySqlDatabase

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

    This data source provides details about a specific External My Sql Database resource in Oracle Cloud Infrastructure Database Management service.

    Retrieves the external MySQL database information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testExternalMySqlDatabase = oci.DatabaseManagement.getExternalMySqlDatabase({
        externalMySqlDatabaseId: testExternalMySqlDatabaseOciDatabaseManagementExternalMySqlDatabase.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_external_my_sql_database = oci.DatabaseManagement.get_external_my_sql_database(external_my_sql_database_id=test_external_my_sql_database_oci_database_management_external_my_sql_database["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/databasemanagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databasemanagement.GetExternalMySqlDatabase(ctx, &databasemanagement.GetExternalMySqlDatabaseArgs{
    			ExternalMySqlDatabaseId: testExternalMySqlDatabaseOciDatabaseManagementExternalMySqlDatabase.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 testExternalMySqlDatabase = Oci.DatabaseManagement.GetExternalMySqlDatabase.Invoke(new()
        {
            ExternalMySqlDatabaseId = testExternalMySqlDatabaseOciDatabaseManagementExternalMySqlDatabase.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
    import com.pulumi.oci.DatabaseManagement.inputs.GetExternalMySqlDatabaseArgs;
    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 testExternalMySqlDatabase = DatabaseManagementFunctions.getExternalMySqlDatabase(GetExternalMySqlDatabaseArgs.builder()
                .externalMySqlDatabaseId(testExternalMySqlDatabaseOciDatabaseManagementExternalMySqlDatabase.id())
                .build());
    
        }
    }
    
    variables:
      testExternalMySqlDatabase:
        fn::invoke:
          function: oci:DatabaseManagement:getExternalMySqlDatabase
          arguments:
            externalMySqlDatabaseId: ${testExternalMySqlDatabaseOciDatabaseManagementExternalMySqlDatabase.id}
    

    Using getExternalMySqlDatabase

    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 getExternalMySqlDatabase(args: GetExternalMySqlDatabaseArgs, opts?: InvokeOptions): Promise<GetExternalMySqlDatabaseResult>
    function getExternalMySqlDatabaseOutput(args: GetExternalMySqlDatabaseOutputArgs, opts?: InvokeOptions): Output<GetExternalMySqlDatabaseResult>
    def get_external_my_sql_database(external_my_sql_database_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetExternalMySqlDatabaseResult
    def get_external_my_sql_database_output(external_my_sql_database_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetExternalMySqlDatabaseResult]
    func GetExternalMySqlDatabase(ctx *Context, args *GetExternalMySqlDatabaseArgs, opts ...InvokeOption) (*GetExternalMySqlDatabaseResult, error)
    func GetExternalMySqlDatabaseOutput(ctx *Context, args *GetExternalMySqlDatabaseOutputArgs, opts ...InvokeOption) GetExternalMySqlDatabaseResultOutput

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

    public static class GetExternalMySqlDatabase 
    {
        public static Task<GetExternalMySqlDatabaseResult> InvokeAsync(GetExternalMySqlDatabaseArgs args, InvokeOptions? opts = null)
        public static Output<GetExternalMySqlDatabaseResult> Invoke(GetExternalMySqlDatabaseInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExternalMySqlDatabaseResult> getExternalMySqlDatabase(GetExternalMySqlDatabaseArgs args, InvokeOptions options)
    public static Output<GetExternalMySqlDatabaseResult> getExternalMySqlDatabase(GetExternalMySqlDatabaseArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:DatabaseManagement/getExternalMySqlDatabase:getExternalMySqlDatabase
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ExternalMySqlDatabaseId string
    The OCID of the External MySQL Database.
    ExternalMySqlDatabaseId string
    The OCID of the External MySQL Database.
    externalMySqlDatabaseId String
    The OCID of the External MySQL Database.
    externalMySqlDatabaseId string
    The OCID of the External MySQL Database.
    external_my_sql_database_id str
    The OCID of the External MySQL Database.
    externalMySqlDatabaseId String
    The OCID of the External MySQL Database.

    getExternalMySqlDatabase Result

    The following output properties are available:

    CompartmentId string
    OCID of compartment for the External MySQL Database.
    DbName string
    Display Name of the External MySQL Database.
    ExternalDatabaseId string
    OCID of External MySQL Database.
    ExternalMySqlDatabaseId string
    Id string
    CompartmentId string
    OCID of compartment for the External MySQL Database.
    DbName string
    Display Name of the External MySQL Database.
    ExternalDatabaseId string
    OCID of External MySQL Database.
    ExternalMySqlDatabaseId string
    Id string
    compartmentId String
    OCID of compartment for the External MySQL Database.
    dbName String
    Display Name of the External MySQL Database.
    externalDatabaseId String
    OCID of External MySQL Database.
    externalMySqlDatabaseId String
    id String
    compartmentId string
    OCID of compartment for the External MySQL Database.
    dbName string
    Display Name of the External MySQL Database.
    externalDatabaseId string
    OCID of External MySQL Database.
    externalMySqlDatabaseId string
    id string
    compartment_id str
    OCID of compartment for the External MySQL Database.
    db_name str
    Display Name of the External MySQL Database.
    external_database_id str
    OCID of External MySQL Database.
    external_my_sql_database_id str
    id str
    compartmentId String
    OCID of compartment for the External MySQL Database.
    dbName String
    Display Name of the External MySQL Database.
    externalDatabaseId String
    OCID of External MySQL Database.
    externalMySqlDatabaseId String
    id 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.28.0 published on Thursday, Mar 27, 2025 by Pulumi