Oracle Cloud Infrastructure

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

getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript

This data source provides details about a specific Managed Database Optimizer Statistics Advisor Execution Script resource in Oracle Cloud Infrastructure Database Management service.

Gets the Oracle system-generated script for the specified Optimizer Statistics Advisor execution.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var testManagedDatabaseOptimizerStatisticsAdvisorExecutionScript = Oci.DatabaseManagement.GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScript.Invoke(new()
    {
        ExecutionName = @var.Managed_database_optimizer_statistics_advisor_execution_script_execution_name,
        ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
        TaskName = @var.Managed_database_optimizer_statistics_advisor_execution_script_task_name,
    });

});
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.GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScript(ctx, &databasemanagement.GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs{
			ExecutionName:     _var.Managed_database_optimizer_statistics_advisor_execution_script_execution_name,
			ManagedDatabaseId: oci_database_management_managed_database.Test_managed_database.Id,
			TaskName:          _var.Managed_database_optimizer_statistics_advisor_execution_script_task_name,
		}, 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.GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs;
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 testManagedDatabaseOptimizerStatisticsAdvisorExecutionScript = DatabaseManagementFunctions.getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript(GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs.builder()
            .executionName(var_.managed_database_optimizer_statistics_advisor_execution_script_execution_name())
            .managedDatabaseId(oci_database_management_managed_database.test_managed_database().id())
            .taskName(var_.managed_database_optimizer_statistics_advisor_execution_script_task_name())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_database_optimizer_statistics_advisor_execution_script = oci.DatabaseManagement.get_managed_database_optimizer_statistics_advisor_execution_script(execution_name=var["managed_database_optimizer_statistics_advisor_execution_script_execution_name"],
    managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
    task_name=var["managed_database_optimizer_statistics_advisor_execution_script_task_name"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabaseOptimizerStatisticsAdvisorExecutionScript = oci.DatabaseManagement.getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript({
    executionName: _var.managed_database_optimizer_statistics_advisor_execution_script_execution_name,
    managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
    taskName: _var.managed_database_optimizer_statistics_advisor_execution_script_task_name,
});
variables:
  testManagedDatabaseOptimizerStatisticsAdvisorExecutionScript:
    Fn::Invoke:
      Function: oci:DatabaseManagement:getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript
      Arguments:
        executionName: ${var.managed_database_optimizer_statistics_advisor_execution_script_execution_name}
        managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}
        taskName: ${var.managed_database_optimizer_statistics_advisor_execution_script_task_name}

Using getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript

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 getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript(args: GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult>
function getManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptOutput(args: GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult>
def get_managed_database_optimizer_statistics_advisor_execution_script(execution_name: Optional[str] = None,
                                                                       managed_database_id: Optional[str] = None,
                                                                       task_name: Optional[str] = None,
                                                                       opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult
def get_managed_database_optimizer_statistics_advisor_execution_script_output(execution_name: Optional[pulumi.Input[str]] = None,
                                                                       managed_database_id: Optional[pulumi.Input[str]] = None,
                                                                       task_name: Optional[pulumi.Input[str]] = None,
                                                                       opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult]
func GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScript(ctx *Context, args *GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs, opts ...InvokeOption) (*GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult, error)
func GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptOutput(ctx *Context, args *GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptOutputArgs, opts ...InvokeOption) GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResultOutput

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

public static class GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScript 
{
    public static Task<GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult> InvokeAsync(GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult> Invoke(GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptResult> getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript(GetManagedDatabaseOptimizerStatisticsAdvisorExecutionScriptArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:DatabaseManagement/getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript:getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ExecutionName string

The name of the Optimizer Statistics Advisor execution.

ManagedDatabaseId string

The OCID of the Managed Database.

TaskName string

The name of the optimizer statistics collection execution task.

ExecutionName string

The name of the Optimizer Statistics Advisor execution.

ManagedDatabaseId string

The OCID of the Managed Database.

TaskName string

The name of the optimizer statistics collection execution task.

executionName String

The name of the Optimizer Statistics Advisor execution.

managedDatabaseId String

The OCID of the Managed Database.

taskName String

The name of the optimizer statistics collection execution task.

executionName string

The name of the Optimizer Statistics Advisor execution.

managedDatabaseId string

The OCID of the Managed Database.

taskName string

The name of the optimizer statistics collection execution task.

execution_name str

The name of the Optimizer Statistics Advisor execution.

managed_database_id str

The OCID of the Managed Database.

task_name str

The name of the optimizer statistics collection execution task.

executionName String

The name of the Optimizer Statistics Advisor execution.

managedDatabaseId String

The OCID of the Managed Database.

taskName String

The name of the optimizer statistics collection execution task.

getManagedDatabaseOptimizerStatisticsAdvisorExecutionScript Result

The following output properties are available:

ExecutionName string
Id string

The provider-assigned unique ID for this managed resource.

ManagedDatabaseId string
Script string

The Optimizer Statistics Advisor execution script.

TaskName string
ExecutionName string
Id string

The provider-assigned unique ID for this managed resource.

ManagedDatabaseId string
Script string

The Optimizer Statistics Advisor execution script.

TaskName string
executionName String
id String

The provider-assigned unique ID for this managed resource.

managedDatabaseId String
script String

The Optimizer Statistics Advisor execution script.

taskName String
executionName string
id string

The provider-assigned unique ID for this managed resource.

managedDatabaseId string
script string

The Optimizer Statistics Advisor execution script.

taskName string
execution_name str
id str

The provider-assigned unique ID for this managed resource.

managed_database_id str
script str

The Optimizer Statistics Advisor execution script.

task_name str
executionName String
id String

The provider-assigned unique ID for this managed resource.

managedDatabaseId String
script String

The Optimizer Statistics Advisor execution script.

taskName String

Package Details

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

This Pulumi package is based on the oci Terraform Provider.