Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison

This data source provides details about a specific Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparision resource in Oracle Cloud Infrastructure Database Management service.

Retrieves a comparison of the existing SQL execution plan and a new plan. A SQL tuning task may suggest a new execution plan for a SQL, and this API retrieves the comparison report of the statistics of the two plans.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison.Invoke(new()
    {
        ExecutionId = oci_database_management_execution.Test_execution.Id,
        ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
        SqlObjectId = oci_objectstorage_object.Test_object.Id,
        SqlTuningAdvisorTaskId = oci_database_management_sql_tuning_advisor_task.Test_sql_tuning_advisor_task.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/DatabaseManagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(ctx, &databasemanagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs{
			ExecutionId:            oci_database_management_execution.Test_execution.Id,
			ManagedDatabaseId:      oci_database_management_managed_database.Test_managed_database.Id,
			SqlObjectId:            oci_objectstorage_object.Test_object.Id,
			SqlTuningAdvisorTaskId: oci_database_management_sql_tuning_advisor_task.Test_sql_tuning_advisor_task.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs;
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 testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = DatabaseManagementFunctions.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs.builder()
            .executionId(oci_database_management_execution.test_execution().id())
            .managedDatabaseId(oci_database_management_managed_database.test_managed_database().id())
            .sqlObjectId(oci_objectstorage_object.test_object().id())
            .sqlTuningAdvisorTaskId(oci_database_management_sql_tuning_advisor_task.test_sql_tuning_advisor_task().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparision = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison(execution_id=oci_database_management_execution["test_execution"]["id"],
    managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
    sql_object_id=oci_objectstorage_object["test_object"]["id"],
    sql_tuning_advisor_task_id=oci_database_management_sql_tuning_advisor_task["test_sql_tuning_advisor_task"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison({
    executionId: oci_database_management_execution.test_execution.id,
    managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
    sqlObjectId: oci_objectstorage_object.test_object.id,
    sqlTuningAdvisorTaskId: oci_database_management_sql_tuning_advisor_task.test_sql_tuning_advisor_task.id,
});
variables:
  testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision:
    Fn::Invoke:
      Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
      Arguments:
        executionId: ${oci_database_management_execution.test_execution.id}
        managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}
        sqlObjectId: ${oci_objectstorage_object.test_object.id}
        sqlTuningAdvisorTaskId: ${oci_database_management_sql_tuning_advisor_task.test_sql_tuning_advisor_task.id}

Using getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison

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 getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(args: GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult>
function getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutput(args: GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult>
def get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison(execution_id: Optional[str] = None,
                                                                                  managed_database_id: Optional[str] = None,
                                                                                  sql_object_id: Optional[str] = None,
                                                                                  sql_tuning_advisor_task_id: Optional[str] = None,
                                                                                  opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult
def get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison_output(execution_id: Optional[pulumi.Input[str]] = None,
                                                                                  managed_database_id: Optional[pulumi.Input[str]] = None,
                                                                                  sql_object_id: Optional[pulumi.Input[str]] = None,
                                                                                  sql_tuning_advisor_task_id: Optional[pulumi.Input[str]] = None,
                                                                                  opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult]
func GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult, error)
func GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutput(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResultOutput

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

public static class GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison 
{
    public static Task<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> InvokeAsync(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> Invoke(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
  arguments:
    # arguments dictionary

The following arguments are supported:

ExecutionId string

The execution ID for an execution of a SQL tuning task. This is not the OCID.

ManagedDatabaseId string

The OCID of the Managed Database.

SqlObjectId string

The SQL object ID for the SQL tuning task. This is not the OCID.

SqlTuningAdvisorTaskId string

The SQL tuning task identifier. This is not the OCID.

ExecutionId string

The execution ID for an execution of a SQL tuning task. This is not the OCID.

ManagedDatabaseId string

The OCID of the Managed Database.

SqlObjectId string

The SQL object ID for the SQL tuning task. This is not the OCID.

SqlTuningAdvisorTaskId string

The SQL tuning task identifier. This is not the OCID.

executionId String

The execution ID for an execution of a SQL tuning task. This is not the OCID.

managedDatabaseId String

The OCID of the Managed Database.

sqlObjectId String

The SQL object ID for the SQL tuning task. This is not the OCID.

sqlTuningAdvisorTaskId String

The SQL tuning task identifier. This is not the OCID.

executionId string

The execution ID for an execution of a SQL tuning task. This is not the OCID.

managedDatabaseId string

The OCID of the Managed Database.

sqlObjectId string

The SQL object ID for the SQL tuning task. This is not the OCID.

sqlTuningAdvisorTaskId string

The SQL tuning task identifier. This is not the OCID.

execution_id str

The execution ID for an execution of a SQL tuning task. This is not the OCID.

managed_database_id str

The OCID of the Managed Database.

sql_object_id str

The SQL object ID for the SQL tuning task. This is not the OCID.

sql_tuning_advisor_task_id str

The SQL tuning task identifier. This is not the OCID.

executionId String

The execution ID for an execution of a SQL tuning task. This is not the OCID.

managedDatabaseId String

The OCID of the Managed Database.

sqlObjectId String

The SQL object ID for the SQL tuning task. This is not the OCID.

sqlTuningAdvisorTaskId String

The SQL tuning task identifier. This is not the OCID.

getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison Result

The following output properties are available:

ExecutionId string
Id string

The provider-assigned unique ID for this managed resource.

ManagedDatabaseId string
Modifieds List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified>

The statistics of a SQL execution plan.

Originals List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal>

The statistics of a SQL execution plan.

SqlObjectId string
SqlTuningAdvisorTaskId string
ExecutionId string
Id string

The provider-assigned unique ID for this managed resource.

ManagedDatabaseId string
Modifieds []GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified

The statistics of a SQL execution plan.

Originals []GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal

The statistics of a SQL execution plan.

SqlObjectId string
SqlTuningAdvisorTaskId string
executionId String
id String

The provider-assigned unique ID for this managed resource.

managedDatabaseId String
modifieds List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified>

The statistics of a SQL execution plan.

originals List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal>

The statistics of a SQL execution plan.

sqlObjectId String
sqlTuningAdvisorTaskId String
executionId string
id string

The provider-assigned unique ID for this managed resource.

managedDatabaseId string
modifieds GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified[]

The statistics of a SQL execution plan.

originals GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal[]

The statistics of a SQL execution plan.

sqlObjectId string
sqlTuningAdvisorTaskId string
executionId String
id String

The provider-assigned unique ID for this managed resource.

managedDatabaseId String
modifieds List<Property Map>

The statistics of a SQL execution plan.

originals List<Property Map>

The statistics of a SQL execution plan.

sqlObjectId String
sqlTuningAdvisorTaskId String

Supporting Types

GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified

PlanStats Dictionary<string, object>

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

PlanStatus string

The status of the execution using the plan.

PlanType string

The type of the original or modified plan with profile, index, and so on.

PlanStats map[string]interface{}

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

PlanStatus string

The status of the execution using the plan.

PlanType string

The type of the original or modified plan with profile, index, and so on.

planStats Map<String,Object>

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

planStatus String

The status of the execution using the plan.

planType String

The type of the original or modified plan with profile, index, and so on.

planStats {[key: string]: any}

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

planStatus string

The status of the execution using the plan.

planType string

The type of the original or modified plan with profile, index, and so on.

plan_stats Mapping[str, Any]

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

plan_status str

The status of the execution using the plan.

plan_type str

The type of the original or modified plan with profile, index, and so on.

planStats Map<Any>

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

planStatus String

The status of the execution using the plan.

planType String

The type of the original or modified plan with profile, index, and so on.

GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal

PlanStats Dictionary<string, object>

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

PlanStatus string

The status of the execution using the plan.

PlanType string

The type of the original or modified plan with profile, index, and so on.

PlanStats map[string]interface{}

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

PlanStatus string

The status of the execution using the plan.

PlanType string

The type of the original or modified plan with profile, index, and so on.

planStats Map<String,Object>

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

planStatus String

The status of the execution using the plan.

planType String

The type of the original or modified plan with profile, index, and so on.

planStats {[key: string]: any}

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

planStatus string

The status of the execution using the plan.

planType string

The type of the original or modified plan with profile, index, and so on.

plan_stats Mapping[str, Any]

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

plan_status str

The status of the execution using the plan.

plan_type str

The type of the original or modified plan with profile, index, and so on.

planStats Map<Any>

A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.

planStatus String

The status of the execution using the plan.

planType String

The type of the original or modified plan with profile, index, and so on.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.