Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi
oci.DatabaseManagement.getExternalMySqlDatabases
Explore with Pulumi AI
This data source provides the list of External My Sql Databases in Oracle Cloud Infrastructure Database Management service.
Gets the list of External MySQL Databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testExternalMySqlDatabases = oci.DatabaseManagement.getExternalMySqlDatabases({
compartmentId: compartmentId,
name: externalMySqlDatabaseName,
});
import pulumi
import pulumi_oci as oci
test_external_my_sql_databases = oci.DatabaseManagement.get_external_my_sql_databases(compartment_id=compartment_id,
name=external_my_sql_database_name)
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.GetExternalMySqlDatabases(ctx, &databasemanagement.GetExternalMySqlDatabasesArgs{
CompartmentId: compartmentId,
Name: pulumi.StringRef(externalMySqlDatabaseName),
}, 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 testExternalMySqlDatabases = Oci.DatabaseManagement.GetExternalMySqlDatabases.Invoke(new()
{
CompartmentId = compartmentId,
Name = externalMySqlDatabaseName,
});
});
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.GetExternalMySqlDatabasesArgs;
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 testExternalMySqlDatabases = DatabaseManagementFunctions.getExternalMySqlDatabases(GetExternalMySqlDatabasesArgs.builder()
.compartmentId(compartmentId)
.name(externalMySqlDatabaseName)
.build());
}
}
variables:
testExternalMySqlDatabases:
fn::invoke:
function: oci:DatabaseManagement:getExternalMySqlDatabases
arguments:
compartmentId: ${compartmentId}
name: ${externalMySqlDatabaseName}
Using getExternalMySqlDatabases
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 getExternalMySqlDatabases(args: GetExternalMySqlDatabasesArgs, opts?: InvokeOptions): Promise<GetExternalMySqlDatabasesResult>
function getExternalMySqlDatabasesOutput(args: GetExternalMySqlDatabasesOutputArgs, opts?: InvokeOptions): Output<GetExternalMySqlDatabasesResult>
def get_external_my_sql_databases(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_databasemanagement.GetExternalMySqlDatabasesFilter]] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetExternalMySqlDatabasesResult
def get_external_my_sql_databases_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetExternalMySqlDatabasesFilterArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetExternalMySqlDatabasesResult]
func GetExternalMySqlDatabases(ctx *Context, args *GetExternalMySqlDatabasesArgs, opts ...InvokeOption) (*GetExternalMySqlDatabasesResult, error)
func GetExternalMySqlDatabasesOutput(ctx *Context, args *GetExternalMySqlDatabasesOutputArgs, opts ...InvokeOption) GetExternalMySqlDatabasesResultOutput
> Note: This function is named GetExternalMySqlDatabases
in the Go SDK.
public static class GetExternalMySqlDatabases
{
public static Task<GetExternalMySqlDatabasesResult> InvokeAsync(GetExternalMySqlDatabasesArgs args, InvokeOptions? opts = null)
public static Output<GetExternalMySqlDatabasesResult> Invoke(GetExternalMySqlDatabasesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetExternalMySqlDatabasesResult> getExternalMySqlDatabases(GetExternalMySqlDatabasesArgs args, InvokeOptions options)
public static Output<GetExternalMySqlDatabasesResult> getExternalMySqlDatabases(GetExternalMySqlDatabasesArgs args, InvokeOptions options)
fn::invoke:
function: oci:DatabaseManagement/getExternalMySqlDatabases:getExternalMySqlDatabases
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Filters
List<Get
External My Sql Databases Filter> - Name string
- The parameter to filter by MySQL Database System type.
- Compartment
Id string - The OCID of the compartment.
- Filters
[]Get
External My Sql Databases Filter - Name string
- The parameter to filter by MySQL Database System type.
- compartment
Id String - The OCID of the compartment.
- filters
List<Get
External My Sql Databases Filter> - name String
- The parameter to filter by MySQL Database System type.
- compartment
Id string - The OCID of the compartment.
- filters
Get
External My Sql Databases Filter[] - name string
- The parameter to filter by MySQL Database System type.
- compartment_
id str - The OCID of the compartment.
- filters
Sequence[databasemanagement.
Get External My Sql Databases Filter] - name str
- The parameter to filter by MySQL Database System type.
- compartment
Id String - The OCID of the compartment.
- filters List<Property Map>
- name String
- The parameter to filter by MySQL Database System type.
getExternalMySqlDatabases Result
The following output properties are available:
- Compartment
Id string - OCID of compartment for the External MySQL Database.
- External
My List<GetSql Database Collections External My Sql Databases External My Sql Database Collection> - The list of external_my_sql_database_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
External My Sql Databases Filter> - Name string
- Compartment
Id string - OCID of compartment for the External MySQL Database.
- External
My []GetSql Database Collections External My Sql Databases External My Sql Database Collection - The list of external_my_sql_database_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
External My Sql Databases Filter - Name string
- compartment
Id String - OCID of compartment for the External MySQL Database.
- external
My List<GetSql Database Collections External My Sql Databases External My Sql Database Collection> - The list of external_my_sql_database_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
External My Sql Databases Filter> - name String
- compartment
Id string - OCID of compartment for the External MySQL Database.
- external
My GetSql Database Collections External My Sql Databases External My Sql Database Collection[] - The list of external_my_sql_database_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
External My Sql Databases Filter[] - name string
- compartment_
id str - OCID of compartment for the External MySQL Database.
- external_
my_ Sequence[databasemanagement.sql_ database_ collections Get External My Sql Databases External My Sql Database Collection] - The list of external_my_sql_database_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[databasemanagement.
Get External My Sql Databases Filter] - name str
- compartment
Id String - OCID of compartment for the External MySQL Database.
- external
My List<Property Map>Sql Database Collections - The list of external_my_sql_database_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
- name String
Supporting Types
GetExternalMySqlDatabasesExternalMySqlDatabaseCollection
GetExternalMySqlDatabasesExternalMySqlDatabaseCollectionItem
- Compartment
Id string - The OCID of the compartment.
- Db
Name string - Display Name of the External MySQL Database.
- External
Database stringId - OCID of External MySQL Database.
- Compartment
Id string - The OCID of the compartment.
- Db
Name string - Display Name of the External MySQL Database.
- External
Database stringId - OCID of External MySQL Database.
- compartment
Id String - The OCID of the compartment.
- db
Name String - Display Name of the External MySQL Database.
- external
Database StringId - OCID of External MySQL Database.
- compartment
Id string - The OCID of the compartment.
- db
Name string - Display Name of the External MySQL Database.
- external
Database stringId - OCID of External MySQL Database.
- compartment_
id str - The OCID of the compartment.
- db_
name str - Display Name of the External MySQL Database.
- external_
database_ strid - OCID of External MySQL Database.
- compartment
Id String - The OCID of the compartment.
- db
Name String - Display Name of the External MySQL Database.
- external
Database StringId - OCID of External MySQL Database.
GetExternalMySqlDatabasesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.