Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DatabaseManagement/getManagedDatabaseSqlPlanBaseline:getManagedDatabaseSqlPlanBaseline
arguments:
# arguments dictionary
The following arguments are supported:
- Managed
Database stringId - The OCID of the Managed Database.
- Plan
Name string - The plan name of the SQL plan baseline.
- Opc
Named stringCredential Id - The OCID of the Named Credential.
- Managed
Database stringId - The OCID of the Managed Database.
- Plan
Name string - The plan name of the SQL plan baseline.
- Opc
Named stringCredential Id - The OCID of the Named Credential.
- managed
Database StringId - The OCID of the Managed Database.
- plan
Name String - The plan name of the SQL plan baseline.
- opc
Named StringCredential Id - The OCID of the Named Credential.
- managed
Database stringId - The OCID of the Managed Database.
- plan
Name string - The plan name of the SQL plan baseline.
- opc
Named 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.
- managed
Database StringId - The OCID of the Managed Database.
- plan
Name String - The plan name of the SQL plan baseline.
- opc
Named 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.
- Auto
Purge 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
). - Execution
Plan 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.
- Managed
Database stringId - Module string
- The application module name.
- Origin string
- The origin of the SQL plan baseline.
- Plan
Name 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 toYES
when a plan is initially added to the plan baseline. - Sql
Handle string - The unique SQL identifier.
- Sql
Text string - The SQL text.
- Time
Created string - The date and time when the plan baseline was created.
- Time
Last stringExecuted - The date and time when the plan baseline was last executed.
- Time
Last stringModified - The date and time when the plan baseline was last modified.
- Opc
Named 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.
- Auto
Purge 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
). - Execution
Plan 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.
- Managed
Database stringId - Module string
- The application module name.
- Origin string
- The origin of the SQL plan baseline.
- Plan
Name 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 toYES
when a plan is initially added to the plan baseline. - Sql
Handle string - The unique SQL identifier.
- Sql
Text string - The SQL text.
- Time
Created string - The date and time when the plan baseline was created.
- Time
Last stringExecuted - The date and time when the plan baseline was last executed.
- Time
Last stringModified - The date and time when the plan baseline was last modified.
- Opc
Named 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.
- auto
Purge 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
). - execution
Plan 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.
- managed
Database StringId - module String
- The application module name.
- origin String
- The origin of the SQL plan baseline.
- plan
Name 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 toYES
when a plan is initially added to the plan baseline. - sql
Handle String - The unique SQL identifier.
- sql
Text String - The SQL text.
- time
Created String - The date and time when the plan baseline was created.
- time
Last StringExecuted - The date and time when the plan baseline was last executed.
- time
Last StringModified - The date and time when the plan baseline was last modified.
- opc
Named 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.
- auto
Purge 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
). - execution
Plan 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.
- managed
Database stringId - module string
- The application module name.
- origin string
- The origin of the SQL plan baseline.
- plan
Name 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 toYES
when a plan is initially added to the plan baseline. - sql
Handle string - The unique SQL identifier.
- sql
Text string - The SQL text.
- time
Created string - The date and time when the plan baseline was created.
- time
Last stringExecuted - The date and time when the plan baseline was last executed.
- time
Last stringModified - The date and time when the plan baseline was last modified.
- opc
Named 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 toYES
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_ 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.
- auto
Purge 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
). - execution
Plan 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.
- managed
Database StringId - module String
- The application module name.
- origin String
- The origin of the SQL plan baseline.
- plan
Name 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 toYES
when a plan is initially added to the plan baseline. - sql
Handle String - The unique SQL identifier.
- sql
Text String - The SQL text.
- time
Created String - The date and time when the plan baseline was created.
- time
Last StringExecuted - The date and time when the plan baseline was last executed.
- time
Last StringModified - The date and time when the plan baseline was last modified.
- opc
Named StringCredential Id
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.