Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi
oci.DatabaseManagement.getExternalMySqlDatabase
Explore with Pulumi AI
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:
- External
My stringSql Database Id - The OCID of the External MySQL Database.
- External
My stringSql Database Id - The OCID of the External MySQL Database.
- external
My StringSql Database Id - The OCID of the External MySQL Database.
- external
My stringSql Database Id - The OCID of the External MySQL Database.
- external_
my_ strsql_ database_ id - The OCID of the External MySQL Database.
- external
My StringSql Database Id - The OCID of the External MySQL Database.
getExternalMySqlDatabase Result
The following output properties are available:
- Compartment
Id string - OCID of compartment for the External MySQL Database.
- Db
Name string - Display Name of the External MySQL Database.
- External
Database stringId - OCID of External MySQL Database.
- External
My stringSql Database Id - Id string
- Compartment
Id string - OCID of compartment for the External MySQL Database.
- Db
Name string - Display Name of the External MySQL Database.
- External
Database stringId - OCID of External MySQL Database.
- External
My stringSql Database Id - Id string
- compartment
Id String - OCID of compartment for the External MySQL Database.
- db
Name String - Display Name of the External MySQL Database.
- external
Database StringId - OCID of External MySQL Database.
- external
My StringSql Database Id - id String
- compartment
Id string - OCID of compartment for the External MySQL Database.
- db
Name string - Display Name of the External MySQL Database.
- external
Database stringId - OCID of External MySQL Database.
- external
My stringSql Database Id - 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_ strid - OCID of External MySQL Database.
- external_
my_ strsql_ database_ id - id str
- compartment
Id String - OCID of compartment for the External MySQL Database.
- db
Name String - Display Name of the External MySQL Database.
- external
Database StringId - OCID of External MySQL Database.
- external
My StringSql Database Id - id String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.