Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi
oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTask
Explore with Pulumi AI
This data source provides details about a specific Managed Database Sql Tuning Advisor Task resource in Oracle Cloud Infrastructure Database Management service.
Lists the SQL Tuning Advisor tasks for the specified Managed Database.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabaseSqlTuningAdvisorTask = oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTask({
managedDatabaseId: testManagedDatabase.id,
name: managedDatabaseSqlTuningAdvisorTaskName,
status: managedDatabaseSqlTuningAdvisorTaskStatus,
timeGreaterThanOrEqualTo: managedDatabaseSqlTuningAdvisorTaskTimeGreaterThanOrEqualTo,
timeLessThanOrEqualTo: managedDatabaseSqlTuningAdvisorTaskTimeLessThanOrEqualTo,
});
import pulumi
import pulumi_oci as oci
test_managed_database_sql_tuning_advisor_task = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_task(managed_database_id=test_managed_database["id"],
name=managed_database_sql_tuning_advisor_task_name,
status=managed_database_sql_tuning_advisor_task_status,
time_greater_than_or_equal_to=managed_database_sql_tuning_advisor_task_time_greater_than_or_equal_to,
time_less_than_or_equal_to=managed_database_sql_tuning_advisor_task_time_less_than_or_equal_to)
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.GetManagedDatabaseSqlTuningAdvisorTask(ctx, &databasemanagement.GetManagedDatabaseSqlTuningAdvisorTaskArgs{
ManagedDatabaseId: testManagedDatabase.Id,
Name: pulumi.StringRef(managedDatabaseSqlTuningAdvisorTaskName),
Status: pulumi.StringRef(managedDatabaseSqlTuningAdvisorTaskStatus),
TimeGreaterThanOrEqualTo: pulumi.StringRef(managedDatabaseSqlTuningAdvisorTaskTimeGreaterThanOrEqualTo),
TimeLessThanOrEqualTo: pulumi.StringRef(managedDatabaseSqlTuningAdvisorTaskTimeLessThanOrEqualTo),
}, 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 testManagedDatabaseSqlTuningAdvisorTask = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTask.Invoke(new()
{
ManagedDatabaseId = testManagedDatabase.Id,
Name = managedDatabaseSqlTuningAdvisorTaskName,
Status = managedDatabaseSqlTuningAdvisorTaskStatus,
TimeGreaterThanOrEqualTo = managedDatabaseSqlTuningAdvisorTaskTimeGreaterThanOrEqualTo,
TimeLessThanOrEqualTo = managedDatabaseSqlTuningAdvisorTaskTimeLessThanOrEqualTo,
});
});
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.GetManagedDatabaseSqlTuningAdvisorTaskArgs;
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 testManagedDatabaseSqlTuningAdvisorTask = DatabaseManagementFunctions.getManagedDatabaseSqlTuningAdvisorTask(GetManagedDatabaseSqlTuningAdvisorTaskArgs.builder()
.managedDatabaseId(testManagedDatabase.id())
.name(managedDatabaseSqlTuningAdvisorTaskName)
.status(managedDatabaseSqlTuningAdvisorTaskStatus)
.timeGreaterThanOrEqualTo(managedDatabaseSqlTuningAdvisorTaskTimeGreaterThanOrEqualTo)
.timeLessThanOrEqualTo(managedDatabaseSqlTuningAdvisorTaskTimeLessThanOrEqualTo)
.build());
}
}
variables:
testManagedDatabaseSqlTuningAdvisorTask:
fn::invoke:
Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningAdvisorTask
Arguments:
managedDatabaseId: ${testManagedDatabase.id}
name: ${managedDatabaseSqlTuningAdvisorTaskName}
status: ${managedDatabaseSqlTuningAdvisorTaskStatus}
timeGreaterThanOrEqualTo: ${managedDatabaseSqlTuningAdvisorTaskTimeGreaterThanOrEqualTo}
timeLessThanOrEqualTo: ${managedDatabaseSqlTuningAdvisorTaskTimeLessThanOrEqualTo}
Using getManagedDatabaseSqlTuningAdvisorTask
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 getManagedDatabaseSqlTuningAdvisorTask(args: GetManagedDatabaseSqlTuningAdvisorTaskArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningAdvisorTaskResult>
function getManagedDatabaseSqlTuningAdvisorTaskOutput(args: GetManagedDatabaseSqlTuningAdvisorTaskOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningAdvisorTaskResult>
def get_managed_database_sql_tuning_advisor_task(managed_database_id: Optional[str] = None,
name: Optional[str] = None,
status: Optional[str] = None,
time_greater_than_or_equal_to: Optional[str] = None,
time_less_than_or_equal_to: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningAdvisorTaskResult
def get_managed_database_sql_tuning_advisor_task_output(managed_database_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
time_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
time_less_than_or_equal_to: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlTuningAdvisorTaskResult]
func GetManagedDatabaseSqlTuningAdvisorTask(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTaskArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningAdvisorTaskResult, error)
func GetManagedDatabaseSqlTuningAdvisorTaskOutput(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTaskOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningAdvisorTaskResultOutput
> Note: This function is named GetManagedDatabaseSqlTuningAdvisorTask
in the Go SDK.
public static class GetManagedDatabaseSqlTuningAdvisorTask
{
public static Task<GetManagedDatabaseSqlTuningAdvisorTaskResult> InvokeAsync(GetManagedDatabaseSqlTuningAdvisorTaskArgs args, InvokeOptions? opts = null)
public static Output<GetManagedDatabaseSqlTuningAdvisorTaskResult> Invoke(GetManagedDatabaseSqlTuningAdvisorTaskInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedDatabaseSqlTuningAdvisorTaskResult> getManagedDatabaseSqlTuningAdvisorTask(GetManagedDatabaseSqlTuningAdvisorTaskArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTask:getManagedDatabaseSqlTuningAdvisorTask
arguments:
# arguments dictionary
The following arguments are supported:
- Managed
Database stringId - The OCID of the Managed Database.
- Name string
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- Status string
- The optional query parameter to filter the SQL Tuning Advisor task list by status.
- Time
Greater stringThan Or Equal To - The optional greater than or equal to query parameter to filter the timestamp.
- Time
Less stringThan Or Equal To - The optional less than or equal to query parameter to filter the timestamp.
- Managed
Database stringId - The OCID of the Managed Database.
- Name string
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- Status string
- The optional query parameter to filter the SQL Tuning Advisor task list by status.
- Time
Greater stringThan Or Equal To - The optional greater than or equal to query parameter to filter the timestamp.
- Time
Less stringThan Or Equal To - The optional less than or equal to query parameter to filter the timestamp.
- managed
Database StringId - The OCID of the Managed Database.
- name String
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- status String
- The optional query parameter to filter the SQL Tuning Advisor task list by status.
- time
Greater StringThan Or Equal To - The optional greater than or equal to query parameter to filter the timestamp.
- time
Less StringThan Or Equal To - The optional less than or equal to query parameter to filter the timestamp.
- managed
Database stringId - The OCID of the Managed Database.
- name string
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- status string
- The optional query parameter to filter the SQL Tuning Advisor task list by status.
- time
Greater stringThan Or Equal To - The optional greater than or equal to query parameter to filter the timestamp.
- time
Less stringThan Or Equal To - The optional less than or equal to query parameter to filter the timestamp.
- managed_
database_ strid - The OCID of the Managed Database.
- name str
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- status str
- The optional query parameter to filter the SQL Tuning Advisor task list by status.
- time_
greater_ strthan_ or_ equal_ to - The optional greater than or equal to query parameter to filter the timestamp.
- time_
less_ strthan_ or_ equal_ to - The optional less than or equal to query parameter to filter the timestamp.
- managed
Database StringId - The OCID of the Managed Database.
- name String
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- status String
- The optional query parameter to filter the SQL Tuning Advisor task list by status.
- time
Greater StringThan Or Equal To - The optional greater than or equal to query parameter to filter the timestamp.
- time
Less StringThan Or Equal To - The optional less than or equal to query parameter to filter the timestamp.
getManagedDatabaseSqlTuningAdvisorTask Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Managed Database Sql Tuning Advisor Task Item> - A list of SQL Tuning Advisor tasks.
- Managed
Database stringId - Name string
- The name of the SQL Tuning Advisor task.
- Status string
- Time
Greater stringThan Or Equal To - Time
Less stringThan Or Equal To
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Managed Database Sql Tuning Advisor Task Item - A list of SQL Tuning Advisor tasks.
- Managed
Database stringId - Name string
- The name of the SQL Tuning Advisor task.
- Status string
- Time
Greater stringThan Or Equal To - Time
Less stringThan Or Equal To
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Managed Database Sql Tuning Advisor Task Item> - A list of SQL Tuning Advisor tasks.
- managed
Database StringId - name String
- The name of the SQL Tuning Advisor task.
- status String
- time
Greater StringThan Or Equal To - time
Less StringThan Or Equal To
- id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Managed Database Sql Tuning Advisor Task Item[] - A list of SQL Tuning Advisor tasks.
- managed
Database stringId - name string
- The name of the SQL Tuning Advisor task.
- status string
- time
Greater stringThan Or Equal To - time
Less stringThan Or Equal To
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[databasemanagement.
Get Managed Database Sql Tuning Advisor Task Item] - A list of SQL Tuning Advisor tasks.
- managed_
database_ strid - name str
- The name of the SQL Tuning Advisor task.
- status str
- time_
greater_ strthan_ or_ equal_ to - time_
less_ strthan_ or_ equal_ to
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- A list of SQL Tuning Advisor tasks.
- managed
Database StringId - name String
- The name of the SQL Tuning Advisor task.
- status String
- time
Greater StringThan Or Equal To - time
Less StringThan Or Equal To
Supporting Types
GetManagedDatabaseSqlTuningAdvisorTaskItem
- Days
To intExpire - The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED).
- Description string
- The description of the SQL Tuning Advisor task.
- Instance
Id int - The instance ID of the SQL Tuning Advisor task. This is not the OCID.
- Name string
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- Owner string
- The owner of the SQL Tuning Advisor task.
- Recommendation
Count int - The number of recommendations provided for the SQL Tuning Advisor task.
- Sql
Tuning stringAdvisor Task Id - The unique identifier of the SQL Tuning Advisor task. This is not the OCID.
- Task
Status string - The status of the SQL Tuning Advisor task.
- Time
Created string - The Creation date of the SQL Tuning Advisor task.
- Time
Execution stringEnded - The end time of the task execution.
- Time
Execution stringStarted - The start time of the task execution.
- Total
Sql intStatements - The total number of SQL statements related to the SQL Tuning Advisor task.
- Days
To intExpire - The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED).
- Description string
- The description of the SQL Tuning Advisor task.
- Instance
Id int - The instance ID of the SQL Tuning Advisor task. This is not the OCID.
- Name string
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- Owner string
- The owner of the SQL Tuning Advisor task.
- Recommendation
Count int - The number of recommendations provided for the SQL Tuning Advisor task.
- Sql
Tuning stringAdvisor Task Id - The unique identifier of the SQL Tuning Advisor task. This is not the OCID.
- Task
Status string - The status of the SQL Tuning Advisor task.
- Time
Created string - The Creation date of the SQL Tuning Advisor task.
- Time
Execution stringEnded - The end time of the task execution.
- Time
Execution stringStarted - The start time of the task execution.
- Total
Sql intStatements - The total number of SQL statements related to the SQL Tuning Advisor task.
- days
To IntegerExpire - The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED).
- description String
- The description of the SQL Tuning Advisor task.
- instance
Id Integer - The instance ID of the SQL Tuning Advisor task. This is not the OCID.
- name String
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- owner String
- The owner of the SQL Tuning Advisor task.
- recommendation
Count Integer - The number of recommendations provided for the SQL Tuning Advisor task.
- sql
Tuning StringAdvisor Task Id - The unique identifier of the SQL Tuning Advisor task. This is not the OCID.
- task
Status String - The status of the SQL Tuning Advisor task.
- time
Created String - The Creation date of the SQL Tuning Advisor task.
- time
Execution StringEnded - The end time of the task execution.
- time
Execution StringStarted - The start time of the task execution.
- total
Sql IntegerStatements - The total number of SQL statements related to the SQL Tuning Advisor task.
- days
To numberExpire - The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED).
- description string
- The description of the SQL Tuning Advisor task.
- instance
Id number - The instance ID of the SQL Tuning Advisor task. This is not the OCID.
- name string
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- owner string
- The owner of the SQL Tuning Advisor task.
- recommendation
Count number - The number of recommendations provided for the SQL Tuning Advisor task.
- sql
Tuning stringAdvisor Task Id - The unique identifier of the SQL Tuning Advisor task. This is not the OCID.
- task
Status string - The status of the SQL Tuning Advisor task.
- time
Created string - The Creation date of the SQL Tuning Advisor task.
- time
Execution stringEnded - The end time of the task execution.
- time
Execution stringStarted - The start time of the task execution.
- total
Sql numberStatements - The total number of SQL statements related to the SQL Tuning Advisor task.
- days_
to_ intexpire - The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED).
- description str
- The description of the SQL Tuning Advisor task.
- instance_
id int - The instance ID of the SQL Tuning Advisor task. This is not the OCID.
- name str
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- owner str
- The owner of the SQL Tuning Advisor task.
- recommendation_
count int - The number of recommendations provided for the SQL Tuning Advisor task.
- sql_
tuning_ stradvisor_ task_ id - The unique identifier of the SQL Tuning Advisor task. This is not the OCID.
- task_
status str - The status of the SQL Tuning Advisor task.
- time_
created str - The Creation date of the SQL Tuning Advisor task.
- time_
execution_ strended - The end time of the task execution.
- time_
execution_ strstarted - The start time of the task execution.
- total_
sql_ intstatements - The total number of SQL statements related to the SQL Tuning Advisor task.
- days
To NumberExpire - The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED).
- description String
- The description of the SQL Tuning Advisor task.
- instance
Id Number - The instance ID of the SQL Tuning Advisor task. This is not the OCID.
- name String
- The optional query parameter to filter the SQL Tuning Advisor task list by name.
- owner String
- The owner of the SQL Tuning Advisor task.
- recommendation
Count Number - The number of recommendations provided for the SQL Tuning Advisor task.
- sql
Tuning StringAdvisor Task Id - The unique identifier of the SQL Tuning Advisor task. This is not the OCID.
- task
Status String - The status of the SQL Tuning Advisor task.
- time
Created String - The Creation date of the SQL Tuning Advisor task.
- time
Execution StringEnded - The end time of the task execution.
- time
Execution StringStarted - The start time of the task execution.
- total
Sql NumberStatements - The total number of SQL statements related to the SQL Tuning Advisor task.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.