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

oci.DatabaseManagement.getExternalMySqlDatabases

Explore with Pulumi AI

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

    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:

    CompartmentId string
    The OCID of the compartment.
    Filters List<GetExternalMySqlDatabasesFilter>
    Name string
    The parameter to filter by MySQL Database System type.
    CompartmentId string
    The OCID of the compartment.
    Filters []GetExternalMySqlDatabasesFilter
    Name string
    The parameter to filter by MySQL Database System type.
    compartmentId String
    The OCID of the compartment.
    filters List<GetExternalMySqlDatabasesFilter>
    name String
    The parameter to filter by MySQL Database System type.
    compartmentId string
    The OCID of the compartment.
    filters GetExternalMySqlDatabasesFilter[]
    name string
    The parameter to filter by MySQL Database System type.
    compartment_id str
    The OCID of the compartment.
    filters Sequence[databasemanagement.GetExternalMySqlDatabasesFilter]
    name str
    The parameter to filter by MySQL Database System type.
    compartmentId 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:

    CompartmentId string
    OCID of compartment for the External MySQL Database.
    ExternalMySqlDatabaseCollections List<GetExternalMySqlDatabasesExternalMySqlDatabaseCollection>
    The list of external_my_sql_database_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters List<GetExternalMySqlDatabasesFilter>
    Name string
    CompartmentId string
    OCID of compartment for the External MySQL Database.
    ExternalMySqlDatabaseCollections []GetExternalMySqlDatabasesExternalMySqlDatabaseCollection
    The list of external_my_sql_database_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetExternalMySqlDatabasesFilter
    Name string
    compartmentId String
    OCID of compartment for the External MySQL Database.
    externalMySqlDatabaseCollections List<GetExternalMySqlDatabasesExternalMySqlDatabaseCollection>
    The list of external_my_sql_database_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetExternalMySqlDatabasesFilter>
    name String
    compartmentId string
    OCID of compartment for the External MySQL Database.
    externalMySqlDatabaseCollections GetExternalMySqlDatabasesExternalMySqlDatabaseCollection[]
    The list of external_my_sql_database_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetExternalMySqlDatabasesFilter[]
    name string
    compartment_id str
    OCID of compartment for the External MySQL Database.
    external_my_sql_database_collections Sequence[databasemanagement.GetExternalMySqlDatabasesExternalMySqlDatabaseCollection]
    The list of external_my_sql_database_collection.
    id str
    The provider-assigned unique ID for this managed resource.
    filters Sequence[databasemanagement.GetExternalMySqlDatabasesFilter]
    name str
    compartmentId String
    OCID of compartment for the External MySQL Database.
    externalMySqlDatabaseCollections List<Property Map>
    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

    CompartmentId string
    The OCID of the compartment.
    DbName string
    Display Name of the External MySQL Database.
    ExternalDatabaseId string
    OCID of External MySQL Database.
    CompartmentId string
    The OCID of the compartment.
    DbName string
    Display Name of the External MySQL Database.
    ExternalDatabaseId string
    OCID of External MySQL Database.
    compartmentId String
    The OCID of the compartment.
    dbName String
    Display Name of the External MySQL Database.
    externalDatabaseId String
    OCID of External MySQL Database.
    compartmentId string
    The OCID of the compartment.
    dbName string
    Display Name of the External MySQL Database.
    externalDatabaseId string
    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_id str
    OCID of External MySQL Database.
    compartmentId String
    The OCID of the compartment.
    dbName String
    Display Name of the External MySQL Database.
    externalDatabaseId String
    OCID of External MySQL Database.

    GetExternalMySqlDatabasesFilter

    Name string
    The parameter to filter by MySQL Database System type.
    Values List<string>
    Regex bool
    Name string
    The parameter to filter by MySQL Database System type.
    Values []string
    Regex bool
    name String
    The parameter to filter by MySQL Database System type.
    values List<String>
    regex Boolean
    name string
    The parameter to filter by MySQL Database System type.
    values string[]
    regex boolean
    name str
    The parameter to filter by MySQL Database System type.
    values Sequence[str]
    regex bool
    name String
    The parameter to filter by MySQL Database System type.
    values List<String>
    regex Boolean

    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