1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseSqlPlanBaseline
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DatabaseManagement.getManagedDatabaseSqlPlanBaseline

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    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/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedDatabaseSqlPlanBaseline:getManagedDatabaseSqlPlanBaseline
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    PlanName string
    The plan name of the SQL plan baseline.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    PlanName string
    The plan name of the SQL plan baseline.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    managedDatabaseId String
    The OCID of the Managed Database.
    planName String
    The plan name of the SQL plan baseline.
    opcNamedCredentialId String
    The OCID of the Named Credential.
    managedDatabaseId string
    The OCID of the Managed Database.
    planName string
    The plan name of the SQL plan baseline.
    opcNamedCredentialId string
    The OCID of the Named Credential.
    managed_database_id str
    The OCID of the Managed Database.
    plan_name str
    The plan name of the SQL plan baseline.
    opc_named_credential_id str
    The OCID of the Named Credential.
    managedDatabaseId String
    The OCID of the Managed Database.
    planName String
    The plan name of the SQL plan baseline.
    opcNamedCredentialId String
    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.
    ManagedDatabaseId string
    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 to YES when 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.
    TimeLastExecuted string
    The date and time when the plan baseline was last executed.
    TimeLastModified string
    The date and time when the plan baseline was last modified.
    OpcNamedCredentialId string
    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.
    ManagedDatabaseId string
    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 to YES when 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.
    TimeLastExecuted string
    The date and time when the plan baseline was last executed.
    TimeLastModified string
    The date and time when the plan baseline was last modified.
    OpcNamedCredentialId string
    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.
    managedDatabaseId String
    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 to YES when 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.
    timeLastExecuted String
    The date and time when the plan baseline was last executed.
    timeLastModified String
    The date and time when the plan baseline was last modified.
    opcNamedCredentialId String
    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.
    managedDatabaseId string
    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 to YES when 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.
    timeLastExecuted string
    The date and time when the plan baseline was last executed.
    timeLastModified string
    The date and time when the plan baseline was last modified.
    opcNamedCredentialId string
    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_id str
    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 to YES when 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_executed str
    The date and time when the plan baseline was last executed.
    time_last_modified str
    The date and time when the plan baseline was last modified.
    opc_named_credential_id str
    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.
    managedDatabaseId String
    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 to YES when 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.
    timeLastExecuted String
    The date and time when the plan baseline was last executed.
    timeLastModified String
    The date and time when the plan baseline was last modified.
    opcNamedCredentialId String

    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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi