1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedMySqlDatabaseQueryDetail
Oracle Cloud Infrastructure v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi

oci.DatabaseManagement.getManagedMySqlDatabaseQueryDetail

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi

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

    Retrieves query sample details, explain plan and potential warnings for a given digest.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedMySqlDatabaseQueryDetail = oci.DatabaseManagement.getManagedMySqlDatabaseQueryDetail({
        digest: managedMySqlDatabaseQueryDetailDigest,
        managedMySqlDatabaseId: testManagedMySqlDatabase.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_my_sql_database_query_detail = oci.DatabaseManagement.get_managed_my_sql_database_query_detail(digest=managed_my_sql_database_query_detail_digest,
        managed_my_sql_database_id=test_managed_my_sql_database["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/databasemanagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databasemanagement.GetManagedMySqlDatabaseQueryDetail(ctx, &databasemanagement.GetManagedMySqlDatabaseQueryDetailArgs{
    			Digest:                 managedMySqlDatabaseQueryDetailDigest,
    			ManagedMySqlDatabaseId: testManagedMySqlDatabase.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 testManagedMySqlDatabaseQueryDetail = Oci.DatabaseManagement.GetManagedMySqlDatabaseQueryDetail.Invoke(new()
        {
            Digest = managedMySqlDatabaseQueryDetailDigest,
            ManagedMySqlDatabaseId = testManagedMySqlDatabase.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.GetManagedMySqlDatabaseQueryDetailArgs;
    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 testManagedMySqlDatabaseQueryDetail = DatabaseManagementFunctions.getManagedMySqlDatabaseQueryDetail(GetManagedMySqlDatabaseQueryDetailArgs.builder()
                .digest(managedMySqlDatabaseQueryDetailDigest)
                .managedMySqlDatabaseId(testManagedMySqlDatabase.id())
                .build());
    
        }
    }
    
    variables:
      testManagedMySqlDatabaseQueryDetail:
        fn::invoke:
          function: oci:DatabaseManagement:getManagedMySqlDatabaseQueryDetail
          arguments:
            digest: ${managedMySqlDatabaseQueryDetailDigest}
            managedMySqlDatabaseId: ${testManagedMySqlDatabase.id}
    

    Using getManagedMySqlDatabaseQueryDetail

    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 getManagedMySqlDatabaseQueryDetail(args: GetManagedMySqlDatabaseQueryDetailArgs, opts?: InvokeOptions): Promise<GetManagedMySqlDatabaseQueryDetailResult>
    function getManagedMySqlDatabaseQueryDetailOutput(args: GetManagedMySqlDatabaseQueryDetailOutputArgs, opts?: InvokeOptions): Output<GetManagedMySqlDatabaseQueryDetailResult>
    def get_managed_my_sql_database_query_detail(digest: Optional[str] = None,
                                                 managed_my_sql_database_id: Optional[str] = None,
                                                 opts: Optional[InvokeOptions] = None) -> GetManagedMySqlDatabaseQueryDetailResult
    def get_managed_my_sql_database_query_detail_output(digest: Optional[pulumi.Input[str]] = None,
                                                 managed_my_sql_database_id: Optional[pulumi.Input[str]] = None,
                                                 opts: Optional[InvokeOptions] = None) -> Output[GetManagedMySqlDatabaseQueryDetailResult]
    func GetManagedMySqlDatabaseQueryDetail(ctx *Context, args *GetManagedMySqlDatabaseQueryDetailArgs, opts ...InvokeOption) (*GetManagedMySqlDatabaseQueryDetailResult, error)
    func GetManagedMySqlDatabaseQueryDetailOutput(ctx *Context, args *GetManagedMySqlDatabaseQueryDetailOutputArgs, opts ...InvokeOption) GetManagedMySqlDatabaseQueryDetailResultOutput

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

    public static class GetManagedMySqlDatabaseQueryDetail 
    {
        public static Task<GetManagedMySqlDatabaseQueryDetailResult> InvokeAsync(GetManagedMySqlDatabaseQueryDetailArgs args, InvokeOptions? opts = null)
        public static Output<GetManagedMySqlDatabaseQueryDetailResult> Invoke(GetManagedMySqlDatabaseQueryDetailInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagedMySqlDatabaseQueryDetailResult> getManagedMySqlDatabaseQueryDetail(GetManagedMySqlDatabaseQueryDetailArgs args, InvokeOptions options)
    public static Output<GetManagedMySqlDatabaseQueryDetailResult> getManagedMySqlDatabaseQueryDetail(GetManagedMySqlDatabaseQueryDetailArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedMySqlDatabaseQueryDetail:getManagedMySqlDatabaseQueryDetail
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Digest string
    The digest of a MySQL normalized query.
    ManagedMySqlDatabaseId string
    The OCID of the Managed MySQL Database.
    Digest string
    The digest of a MySQL normalized query.
    ManagedMySqlDatabaseId string
    The OCID of the Managed MySQL Database.
    digest String
    The digest of a MySQL normalized query.
    managedMySqlDatabaseId String
    The OCID of the Managed MySQL Database.
    digest string
    The digest of a MySQL normalized query.
    managedMySqlDatabaseId string
    The OCID of the Managed MySQL Database.
    digest str
    The digest of a MySQL normalized query.
    managed_my_sql_database_id str
    The OCID of the Managed MySQL Database.
    digest String
    The digest of a MySQL normalized query.
    managedMySqlDatabaseId String
    The OCID of the Managed MySQL Database.

    getManagedMySqlDatabaseQueryDetail Result

    The following output properties are available:

    Digest string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedMySqlDatabaseId string
    QueryExplainPlans List<GetManagedMySqlDatabaseQueryDetailQueryExplainPlan>
    The explain plan for a given MySQL query.
    QueryMessages List<GetManagedMySqlDatabaseQueryDetailQueryMessage>
    The errors, warnings and notes that could be raised by the execution of the query.
    QuerySampleDetails List<GetManagedMySqlDatabaseQueryDetailQuerySampleDetail>
    The details of a query sample including the query text, execution time and other details.
    Digest string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedMySqlDatabaseId string
    QueryExplainPlans []GetManagedMySqlDatabaseQueryDetailQueryExplainPlan
    The explain plan for a given MySQL query.
    QueryMessages []GetManagedMySqlDatabaseQueryDetailQueryMessage
    The errors, warnings and notes that could be raised by the execution of the query.
    QuerySampleDetails []GetManagedMySqlDatabaseQueryDetailQuerySampleDetail
    The details of a query sample including the query text, execution time and other details.
    digest String
    id String
    The provider-assigned unique ID for this managed resource.
    managedMySqlDatabaseId String
    queryExplainPlans List<GetManagedMySqlDatabaseQueryDetailQueryExplainPlan>
    The explain plan for a given MySQL query.
    queryMessages List<GetManagedMySqlDatabaseQueryDetailQueryMessage>
    The errors, warnings and notes that could be raised by the execution of the query.
    querySampleDetails List<GetManagedMySqlDatabaseQueryDetailQuerySampleDetail>
    The details of a query sample including the query text, execution time and other details.
    digest string
    id string
    The provider-assigned unique ID for this managed resource.
    managedMySqlDatabaseId string
    queryExplainPlans GetManagedMySqlDatabaseQueryDetailQueryExplainPlan[]
    The explain plan for a given MySQL query.
    queryMessages GetManagedMySqlDatabaseQueryDetailQueryMessage[]
    The errors, warnings and notes that could be raised by the execution of the query.
    querySampleDetails GetManagedMySqlDatabaseQueryDetailQuerySampleDetail[]
    The details of a query sample including the query text, execution time and other details.
    digest str
    id str
    The provider-assigned unique ID for this managed resource.
    managed_my_sql_database_id str
    query_explain_plans Sequence[GetManagedMySqlDatabaseQueryDetailQueryExplainPlan]
    The explain plan for a given MySQL query.
    query_messages Sequence[GetManagedMySqlDatabaseQueryDetailQueryMessage]
    The errors, warnings and notes that could be raised by the execution of the query.
    query_sample_details Sequence[GetManagedMySqlDatabaseQueryDetailQuerySampleDetail]
    The details of a query sample including the query text, execution time and other details.
    digest String
    id String
    The provider-assigned unique ID for this managed resource.
    managedMySqlDatabaseId String
    queryExplainPlans List<Property Map>
    The explain plan for a given MySQL query.
    queryMessages List<Property Map>
    The errors, warnings and notes that could be raised by the execution of the query.
    querySampleDetails List<Property Map>
    The details of a query sample including the query text, execution time and other details.

    Supporting Types

    GetManagedMySqlDatabaseQueryDetailQueryExplainPlan

    JsonExplain string
    The json format of the explain plan.
    JsonExplainVersion string
    The version of the Json format of MySQL Explain.
    JsonExplain string
    The json format of the explain plan.
    JsonExplainVersion string
    The version of the Json format of MySQL Explain.
    jsonExplain String
    The json format of the explain plan.
    jsonExplainVersion String
    The version of the Json format of MySQL Explain.
    jsonExplain string
    The json format of the explain plan.
    jsonExplainVersion string
    The version of the Json format of MySQL Explain.
    json_explain str
    The json format of the explain plan.
    json_explain_version str
    The version of the Json format of MySQL Explain.
    jsonExplain String
    The json format of the explain plan.
    jsonExplainVersion String
    The version of the Json format of MySQL Explain.

    GetManagedMySqlDatabaseQueryDetailQueryMessage

    Code int
    The MySQL code of the raised error, warning or note.
    Level string
    The level of severity of the MySQL message.
    MessageText string
    The MySQL message text of the raised error, warning or note.
    Code int
    The MySQL code of the raised error, warning or note.
    Level string
    The level of severity of the MySQL message.
    MessageText string
    The MySQL message text of the raised error, warning or note.
    code Integer
    The MySQL code of the raised error, warning or note.
    level String
    The level of severity of the MySQL message.
    messageText String
    The MySQL message text of the raised error, warning or note.
    code number
    The MySQL code of the raised error, warning or note.
    level string
    The level of severity of the MySQL message.
    messageText string
    The MySQL message text of the raised error, warning or note.
    code int
    The MySQL code of the raised error, warning or note.
    level str
    The level of severity of the MySQL message.
    message_text str
    The MySQL message text of the raised error, warning or note.
    code Number
    The MySQL code of the raised error, warning or note.
    level String
    The level of severity of the MySQL message.
    messageText String
    The MySQL message text of the raised error, warning or note.

    GetManagedMySqlDatabaseQueryDetailQuerySampleDetail

    ExecutionTime string
    The total amount of time that has been spent executing the query sample.
    Host string
    The host from which the query sample was run.
    MysqlInstance string
    The MySQL instance against which the query sample was run.
    QuerySampleText string
    The query sample mapped by MySQL to a given normalized query.
    ThreadId int
    The thread id of the connection.
    TimeQuerySampleSeen string
    The date and time the query sample was last seen.
    User string
    The user who ran the query sample.
    ExecutionTime string
    The total amount of time that has been spent executing the query sample.
    Host string
    The host from which the query sample was run.
    MysqlInstance string
    The MySQL instance against which the query sample was run.
    QuerySampleText string
    The query sample mapped by MySQL to a given normalized query.
    ThreadId int
    The thread id of the connection.
    TimeQuerySampleSeen string
    The date and time the query sample was last seen.
    User string
    The user who ran the query sample.
    executionTime String
    The total amount of time that has been spent executing the query sample.
    host String
    The host from which the query sample was run.
    mysqlInstance String
    The MySQL instance against which the query sample was run.
    querySampleText String
    The query sample mapped by MySQL to a given normalized query.
    threadId Integer
    The thread id of the connection.
    timeQuerySampleSeen String
    The date and time the query sample was last seen.
    user String
    The user who ran the query sample.
    executionTime string
    The total amount of time that has been spent executing the query sample.
    host string
    The host from which the query sample was run.
    mysqlInstance string
    The MySQL instance against which the query sample was run.
    querySampleText string
    The query sample mapped by MySQL to a given normalized query.
    threadId number
    The thread id of the connection.
    timeQuerySampleSeen string
    The date and time the query sample was last seen.
    user string
    The user who ran the query sample.
    execution_time str
    The total amount of time that has been spent executing the query sample.
    host str
    The host from which the query sample was run.
    mysql_instance str
    The MySQL instance against which the query sample was run.
    query_sample_text str
    The query sample mapped by MySQL to a given normalized query.
    thread_id int
    The thread id of the connection.
    time_query_sample_seen str
    The date and time the query sample was last seen.
    user str
    The user who ran the query sample.
    executionTime String
    The total amount of time that has been spent executing the query sample.
    host String
    The host from which the query sample was run.
    mysqlInstance String
    The MySQL instance against which the query sample was run.
    querySampleText String
    The query sample mapped by MySQL to a given normalized query.
    threadId Number
    The thread id of the connection.
    timeQuerySampleSeen String
    The date and time the query sample was last seen.
    user String
    The user who ran the query sample.

    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 v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi