Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DatabaseManagement.getManagedDatabaseSqlPlanBaseline
Explore with Pulumi AI
This data source provides details about a specific Managed Database Sql Plan Baseline resource in Oracle Cloud Infrastructure Database Management service.
Gets the SQL plan baseline details for the specified planName.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabaseSqlPlanBaseline = oci.DatabaseManagement.getManagedDatabaseSqlPlanBaseline({
    managedDatabaseId: testManagedDatabase.id,
    planName: managedDatabaseSqlPlanBaselinePlanName,
    opcNamedCredentialId: managedDatabaseSqlPlanBaselineOpcNamedCredentialId,
});
import pulumi
import pulumi_oci as oci
test_managed_database_sql_plan_baseline = oci.DatabaseManagement.get_managed_database_sql_plan_baseline(managed_database_id=test_managed_database["id"],
    plan_name=managed_database_sql_plan_baseline_plan_name,
    opc_named_credential_id=managed_database_sql_plan_baseline_opc_named_credential_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.GetManagedDatabaseSqlPlanBaseline(ctx, &databasemanagement.GetManagedDatabaseSqlPlanBaselineArgs{
			ManagedDatabaseId:    testManagedDatabase.Id,
			PlanName:             managedDatabaseSqlPlanBaselinePlanName,
			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseSqlPlanBaselineOpcNamedCredentialId),
		}, 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 testManagedDatabaseSqlPlanBaseline = Oci.DatabaseManagement.GetManagedDatabaseSqlPlanBaseline.Invoke(new()
    {
        ManagedDatabaseId = testManagedDatabase.Id,
        PlanName = managedDatabaseSqlPlanBaselinePlanName,
        OpcNamedCredentialId = managedDatabaseSqlPlanBaselineOpcNamedCredentialId,
    });
});
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.GetManagedDatabaseSqlPlanBaselineArgs;
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 testManagedDatabaseSqlPlanBaseline = DatabaseManagementFunctions.getManagedDatabaseSqlPlanBaseline(GetManagedDatabaseSqlPlanBaselineArgs.builder()
            .managedDatabaseId(testManagedDatabase.id())
            .planName(managedDatabaseSqlPlanBaselinePlanName)
            .opcNamedCredentialId(managedDatabaseSqlPlanBaselineOpcNamedCredentialId)
            .build());
    }
}
variables:
  testManagedDatabaseSqlPlanBaseline:
    fn::invoke:
      function: oci:DatabaseManagement:getManagedDatabaseSqlPlanBaseline
      arguments:
        managedDatabaseId: ${testManagedDatabase.id}
        planName: ${managedDatabaseSqlPlanBaselinePlanName}
        opcNamedCredentialId: ${managedDatabaseSqlPlanBaselineOpcNamedCredentialId}
Using getManagedDatabaseSqlPlanBaseline
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 getManagedDatabaseSqlPlanBaseline(args: GetManagedDatabaseSqlPlanBaselineArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlPlanBaselineResult>
function getManagedDatabaseSqlPlanBaselineOutput(args: GetManagedDatabaseSqlPlanBaselineOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlPlanBaselineResult>def get_managed_database_sql_plan_baseline(managed_database_id: Optional[str] = None,
                                           opc_named_credential_id: Optional[str] = None,
                                           plan_name: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlPlanBaselineResult
def get_managed_database_sql_plan_baseline_output(managed_database_id: Optional[pulumi.Input[str]] = None,
                                           opc_named_credential_id: Optional[pulumi.Input[str]] = None,
                                           plan_name: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlPlanBaselineResult]func GetManagedDatabaseSqlPlanBaseline(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlPlanBaselineResult, error)
func GetManagedDatabaseSqlPlanBaselineOutput(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlPlanBaselineResultOutput> Note: This function is named GetManagedDatabaseSqlPlanBaseline in the Go SDK.
public static class GetManagedDatabaseSqlPlanBaseline 
{
    public static Task<GetManagedDatabaseSqlPlanBaselineResult> InvokeAsync(GetManagedDatabaseSqlPlanBaselineArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseSqlPlanBaselineResult> Invoke(GetManagedDatabaseSqlPlanBaselineInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedDatabaseSqlPlanBaselineResult> getManagedDatabaseSqlPlanBaseline(GetManagedDatabaseSqlPlanBaselineArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseSqlPlanBaselineResult> getManagedDatabaseSqlPlanBaseline(GetManagedDatabaseSqlPlanBaselineArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseSqlPlanBaseline:getManagedDatabaseSqlPlanBaseline
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- PlanName string
- The plan name of the SQL plan baseline.
- OpcNamed stringCredential Id 
- The OCID of the Named Credential.
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- PlanName string
- The plan name of the SQL plan baseline.
- OpcNamed stringCredential Id 
- The OCID of the Named Credential.
- managedDatabase StringId 
- The OCID of the Managed Database.
- planName String
- The plan name of the SQL plan baseline.
- opcNamed StringCredential Id 
- The OCID of the Named Credential.
- managedDatabase stringId 
- The OCID of the Managed Database.
- planName string
- The plan name of the SQL plan baseline.
- opcNamed stringCredential Id 
- The OCID of the Named Credential.
- managed_database_ strid 
- The OCID of the Managed Database.
- plan_name str
- The plan name of the SQL plan baseline.
- opc_named_ strcredential_ id 
- The OCID of the Named Credential.
- managedDatabase StringId 
- The OCID of the Managed Database.
- planName String
- The plan name of the SQL plan baseline.
- opcNamed StringCredential Id 
- The OCID of the Named Credential.
getManagedDatabaseSqlPlanBaseline Result
The following output properties are available:
- Accepted string
- Indicates whether the plan baseline is accepted (YES) or not (NO).
- Action string
- The application action.
- Adaptive string
- Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
- AutoPurge string
- Indicates whether the plan baseline is auto-purged (YES) or not (NO).
- Enabled string
- Indicates whether the plan baseline is enabled (YES) or disabled (NO).
- ExecutionPlan string
- The execution plan for the SQL statement.
- Fixed string
- Indicates whether the plan baseline is fixed (YES) or not (NO).
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- Module string
- The application module name.
- Origin string
- The origin of the SQL plan baseline.
- PlanName string
- The unique plan identifier.
- Reproduced string
- Indicates whether the optimizer was able to reproduce the plan (YES) or not (NO). The value is set toYESwhen a plan is initially added to the plan baseline.
- SqlHandle string
- The unique SQL identifier.
- SqlText string
- The SQL text.
- TimeCreated string
- The date and time when the plan baseline was created.
- TimeLast stringExecuted 
- The date and time when the plan baseline was last executed.
- TimeLast stringModified 
- The date and time when the plan baseline was last modified.
- OpcNamed stringCredential Id 
- Accepted string
- Indicates whether the plan baseline is accepted (YES) or not (NO).
- Action string
- The application action.
- Adaptive string
- Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
- AutoPurge string
- Indicates whether the plan baseline is auto-purged (YES) or not (NO).
- Enabled string
- Indicates whether the plan baseline is enabled (YES) or disabled (NO).
- ExecutionPlan string
- The execution plan for the SQL statement.
- Fixed string
- Indicates whether the plan baseline is fixed (YES) or not (NO).
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- Module string
- The application module name.
- Origin string
- The origin of the SQL plan baseline.
- PlanName string
- The unique plan identifier.
- Reproduced string
- Indicates whether the optimizer was able to reproduce the plan (YES) or not (NO). The value is set toYESwhen a plan is initially added to the plan baseline.
- SqlHandle string
- The unique SQL identifier.
- SqlText string
- The SQL text.
- TimeCreated string
- The date and time when the plan baseline was created.
- TimeLast stringExecuted 
- The date and time when the plan baseline was last executed.
- TimeLast stringModified 
- The date and time when the plan baseline was last modified.
- OpcNamed stringCredential Id 
- accepted String
- Indicates whether the plan baseline is accepted (YES) or not (NO).
- action String
- The application action.
- adaptive String
- Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
- autoPurge String
- Indicates whether the plan baseline is auto-purged (YES) or not (NO).
- enabled String
- Indicates whether the plan baseline is enabled (YES) or disabled (NO).
- executionPlan String
- The execution plan for the SQL statement.
- fixed String
- Indicates whether the plan baseline is fixed (YES) or not (NO).
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- module String
- The application module name.
- origin String
- The origin of the SQL plan baseline.
- planName String
- The unique plan identifier.
- reproduced String
- Indicates whether the optimizer was able to reproduce the plan (YES) or not (NO). The value is set toYESwhen a plan is initially added to the plan baseline.
- sqlHandle String
- The unique SQL identifier.
- sqlText String
- The SQL text.
- timeCreated String
- The date and time when the plan baseline was created.
- timeLast StringExecuted 
- The date and time when the plan baseline was last executed.
- timeLast StringModified 
- The date and time when the plan baseline was last modified.
- opcNamed StringCredential Id 
- accepted string
- Indicates whether the plan baseline is accepted (YES) or not (NO).
- action string
- The application action.
- adaptive string
- Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
- autoPurge string
- Indicates whether the plan baseline is auto-purged (YES) or not (NO).
- enabled string
- Indicates whether the plan baseline is enabled (YES) or disabled (NO).
- executionPlan string
- The execution plan for the SQL statement.
- fixed string
- Indicates whether the plan baseline is fixed (YES) or not (NO).
- id string
- The provider-assigned unique ID for this managed resource.
- managedDatabase stringId 
- module string
- The application module name.
- origin string
- The origin of the SQL plan baseline.
- planName string
- The unique plan identifier.
- reproduced string
- Indicates whether the optimizer was able to reproduce the plan (YES) or not (NO). The value is set toYESwhen a plan is initially added to the plan baseline.
- sqlHandle string
- The unique SQL identifier.
- sqlText string
- The SQL text.
- timeCreated string
- The date and time when the plan baseline was created.
- timeLast stringExecuted 
- The date and time when the plan baseline was last executed.
- timeLast stringModified 
- The date and time when the plan baseline was last modified.
- opcNamed stringCredential Id 
- accepted str
- Indicates whether the plan baseline is accepted (YES) or not (NO).
- action str
- The application action.
- adaptive str
- Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
- auto_purge str
- Indicates whether the plan baseline is auto-purged (YES) or not (NO).
- enabled str
- Indicates whether the plan baseline is enabled (YES) or disabled (NO).
- execution_plan str
- The execution plan for the SQL statement.
- fixed str
- Indicates whether the plan baseline is fixed (YES) or not (NO).
- id str
- The provider-assigned unique ID for this managed resource.
- managed_database_ strid 
- module str
- The application module name.
- origin str
- The origin of the SQL plan baseline.
- plan_name str
- The unique plan identifier.
- reproduced str
- Indicates whether the optimizer was able to reproduce the plan (YES) or not (NO). The value is set toYESwhen a plan is initially added to the plan baseline.
- sql_handle str
- The unique SQL identifier.
- sql_text str
- The SQL text.
- time_created str
- The date and time when the plan baseline was created.
- time_last_ strexecuted 
- The date and time when the plan baseline was last executed.
- time_last_ strmodified 
- The date and time when the plan baseline was last modified.
- opc_named_ strcredential_ id 
- accepted String
- Indicates whether the plan baseline is accepted (YES) or not (NO).
- action String
- The application action.
- adaptive String
- Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
- autoPurge String
- Indicates whether the plan baseline is auto-purged (YES) or not (NO).
- enabled String
- Indicates whether the plan baseline is enabled (YES) or disabled (NO).
- executionPlan String
- The execution plan for the SQL statement.
- fixed String
- Indicates whether the plan baseline is fixed (YES) or not (NO).
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- module String
- The application module name.
- origin String
- The origin of the SQL plan baseline.
- planName String
- The unique plan identifier.
- reproduced String
- Indicates whether the optimizer was able to reproduce the plan (YES) or not (NO). The value is set toYESwhen a plan is initially added to the plan baseline.
- sqlHandle String
- The unique SQL identifier.
- sqlText String
- The SQL text.
- timeCreated String
- The date and time when the plan baseline was created.
- timeLast StringExecuted 
- The date and time when the plan baseline was last executed.
- timeLast StringModified 
- The date and time when the plan baseline was last modified.
- opcNamed StringCredential Id 
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.