1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseOptimizerStatisticsCollectionAggregations
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.DatabaseManagement.getManagedDatabaseOptimizerStatisticsCollectionAggregations

Explore with Pulumi AI

This data source provides the list of Managed Database Optimizer Statistics Collection Aggregations in Oracle Cloud Infrastructure Database Management service.

Gets a list of the optimizer statistics collection operations per hour, grouped by task or object status for the specified Managed Database. You must specify a value for the GroupByQueryParam to determine whether the data should be grouped by task status or task object status. Optionally, you can specify a date-time range (of seven days) to obtain collection aggregations within the specified time range. If the date-time range is not specified, then the operations in the last seven days are listed. You can further filter the results by providing the optional type of TaskTypeQueryParam. If the task type if not provided, then both Auto and Manual tasks are considered for aggregation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabaseOptimizerStatisticsCollectionAggregations = oci.DatabaseManagement.getManagedDatabaseOptimizerStatisticsCollectionAggregations({
    groupType: managedDatabaseOptimizerStatisticsCollectionAggregationGroupType,
    managedDatabaseId: testManagedDatabase.id,
    endTimeLessThanOrEqualTo: managedDatabaseOptimizerStatisticsCollectionAggregationEndTimeLessThanOrEqualTo,
    startTimeGreaterThanOrEqualTo: managedDatabaseOptimizerStatisticsCollectionAggregationStartTimeGreaterThanOrEqualTo,
    taskType: managedDatabaseOptimizerStatisticsCollectionAggregationTaskType,
});
Copy
import pulumi
import pulumi_oci as oci

test_managed_database_optimizer_statistics_collection_aggregations = oci.DatabaseManagement.get_managed_database_optimizer_statistics_collection_aggregations(group_type=managed_database_optimizer_statistics_collection_aggregation_group_type,
    managed_database_id=test_managed_database["id"],
    end_time_less_than_or_equal_to=managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to,
    start_time_greater_than_or_equal_to=managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to,
    task_type=managed_database_optimizer_statistics_collection_aggregation_task_type)
Copy
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.GetManagedDatabaseOptimizerStatisticsCollectionAggregations(ctx, &databasemanagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs{
			GroupType:                     managedDatabaseOptimizerStatisticsCollectionAggregationGroupType,
			ManagedDatabaseId:             testManagedDatabase.Id,
			EndTimeLessThanOrEqualTo:      pulumi.StringRef(managedDatabaseOptimizerStatisticsCollectionAggregationEndTimeLessThanOrEqualTo),
			StartTimeGreaterThanOrEqualTo: pulumi.StringRef(managedDatabaseOptimizerStatisticsCollectionAggregationStartTimeGreaterThanOrEqualTo),
			TaskType:                      pulumi.StringRef(managedDatabaseOptimizerStatisticsCollectionAggregationTaskType),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testManagedDatabaseOptimizerStatisticsCollectionAggregations = Oci.DatabaseManagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregations.Invoke(new()
    {
        GroupType = managedDatabaseOptimizerStatisticsCollectionAggregationGroupType,
        ManagedDatabaseId = testManagedDatabase.Id,
        EndTimeLessThanOrEqualTo = managedDatabaseOptimizerStatisticsCollectionAggregationEndTimeLessThanOrEqualTo,
        StartTimeGreaterThanOrEqualTo = managedDatabaseOptimizerStatisticsCollectionAggregationStartTimeGreaterThanOrEqualTo,
        TaskType = managedDatabaseOptimizerStatisticsCollectionAggregationTaskType,
    });

});
Copy
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.GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs;
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 testManagedDatabaseOptimizerStatisticsCollectionAggregations = DatabaseManagementFunctions.getManagedDatabaseOptimizerStatisticsCollectionAggregations(GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs.builder()
            .groupType(managedDatabaseOptimizerStatisticsCollectionAggregationGroupType)
            .managedDatabaseId(testManagedDatabase.id())
            .endTimeLessThanOrEqualTo(managedDatabaseOptimizerStatisticsCollectionAggregationEndTimeLessThanOrEqualTo)
            .startTimeGreaterThanOrEqualTo(managedDatabaseOptimizerStatisticsCollectionAggregationStartTimeGreaterThanOrEqualTo)
            .taskType(managedDatabaseOptimizerStatisticsCollectionAggregationTaskType)
            .build());

    }
}
Copy
variables:
  testManagedDatabaseOptimizerStatisticsCollectionAggregations:
    fn::invoke:
      function: oci:DatabaseManagement:getManagedDatabaseOptimizerStatisticsCollectionAggregations
      arguments:
        groupType: ${managedDatabaseOptimizerStatisticsCollectionAggregationGroupType}
        managedDatabaseId: ${testManagedDatabase.id}
        endTimeLessThanOrEqualTo: ${managedDatabaseOptimizerStatisticsCollectionAggregationEndTimeLessThanOrEqualTo}
        startTimeGreaterThanOrEqualTo: ${managedDatabaseOptimizerStatisticsCollectionAggregationStartTimeGreaterThanOrEqualTo}
        taskType: ${managedDatabaseOptimizerStatisticsCollectionAggregationTaskType}
Copy

Using getManagedDatabaseOptimizerStatisticsCollectionAggregations

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 getManagedDatabaseOptimizerStatisticsCollectionAggregations(args: GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult>
function getManagedDatabaseOptimizerStatisticsCollectionAggregationsOutput(args: GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult>
Copy
def get_managed_database_optimizer_statistics_collection_aggregations(end_time_less_than_or_equal_to: Optional[str] = None,
                                                                      filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter]] = None,
                                                                      group_type: Optional[str] = None,
                                                                      limit: Optional[int] = None,
                                                                      managed_database_id: Optional[str] = None,
                                                                      start_time_greater_than_or_equal_to: Optional[str] = None,
                                                                      task_type: Optional[str] = None,
                                                                      opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult
def get_managed_database_optimizer_statistics_collection_aggregations_output(end_time_less_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                                                                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilterArgs]]]] = None,
                                                                      group_type: Optional[pulumi.Input[str]] = None,
                                                                      limit: Optional[pulumi.Input[int]] = None,
                                                                      managed_database_id: Optional[pulumi.Input[str]] = None,
                                                                      start_time_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                                                                      task_type: Optional[pulumi.Input[str]] = None,
                                                                      opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult]
Copy
func GetManagedDatabaseOptimizerStatisticsCollectionAggregations(ctx *Context, args *GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs, opts ...InvokeOption) (*GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult, error)
func GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOutput(ctx *Context, args *GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOutputArgs, opts ...InvokeOption) GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResultOutput
Copy

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

public static class GetManagedDatabaseOptimizerStatisticsCollectionAggregations 
{
    public static Task<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult> InvokeAsync(GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult> Invoke(GetManagedDatabaseOptimizerStatisticsCollectionAggregationsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult> getManagedDatabaseOptimizerStatisticsCollectionAggregations(GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult> getManagedDatabaseOptimizerStatisticsCollectionAggregations(GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseOptimizerStatisticsCollectionAggregations:getManagedDatabaseOptimizerStatisticsCollectionAggregations
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

GroupType This property is required. string
The optimizer statistics tasks grouped by type.
ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
EndTimeLessThanOrEqualTo string
The end time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
Filters Changes to this property will trigger replacement. List<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter>
Limit int
StartTimeGreaterThanOrEqualTo string
The start time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
TaskType string
The filter types of the optimizer statistics tasks.
GroupType This property is required. string
The optimizer statistics tasks grouped by type.
ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
EndTimeLessThanOrEqualTo string
The end time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
Filters Changes to this property will trigger replacement. []GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter
Limit int
StartTimeGreaterThanOrEqualTo string
The start time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
TaskType string
The filter types of the optimizer statistics tasks.
groupType This property is required. String
The optimizer statistics tasks grouped by type.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
endTimeLessThanOrEqualTo String
The end time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
filters Changes to this property will trigger replacement. List<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter>
limit Integer
startTimeGreaterThanOrEqualTo String
The start time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
taskType String
The filter types of the optimizer statistics tasks.
groupType This property is required. string
The optimizer statistics tasks grouped by type.
managedDatabaseId This property is required. string
The OCID of the Managed Database.
endTimeLessThanOrEqualTo string
The end time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
filters Changes to this property will trigger replacement. GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter[]
limit number
startTimeGreaterThanOrEqualTo string
The start time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
taskType string
The filter types of the optimizer statistics tasks.
group_type This property is required. str
The optimizer statistics tasks grouped by type.
managed_database_id This property is required. str
The OCID of the Managed Database.
end_time_less_than_or_equal_to str
The end time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
filters Changes to this property will trigger replacement. Sequence[databasemanagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter]
limit int
start_time_greater_than_or_equal_to str
The start time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
task_type str
The filter types of the optimizer statistics tasks.
groupType This property is required. String
The optimizer statistics tasks grouped by type.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
endTimeLessThanOrEqualTo String
The end time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
filters Changes to this property will trigger replacement. List<Property Map>
limit Number
startTimeGreaterThanOrEqualTo String
The start time of the time range to retrieve the optimizer statistics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
taskType String
The filter types of the optimizer statistics tasks.

getManagedDatabaseOptimizerStatisticsCollectionAggregations Result

The following output properties are available:

groupType String
id String
The provider-assigned unique ID for this managed resource.
managedDatabaseId String
optimizerStatisticsCollectionAggregationsCollections List<Property Map>
The list of optimizer_statistics_collection_aggregations_collection.
endTimeLessThanOrEqualTo String
filters List<Property Map>
limit Number
startTimeGreaterThanOrEqualTo String
taskType String

Supporting Types

GetManagedDatabaseOptimizerStatisticsCollectionAggregationsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOptimizerStatisticsCollectionAggregationsCollection

items This property is required. List<Property Map>
The list of Optimizer Statistics Collection details.

GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOptimizerStatisticsCollectionAggregationsCollectionItem

Completed This property is required. int
The number of tasks or objects for which statistics gathering is completed.
Failed This property is required. int
The number of tasks or objects for which statistics gathering failed.
GroupBy This property is required. string
The optimizer statistics tasks grouped by type.
InProgress This property is required. int
The number of tasks or objects for which statistics gathering is in progress.
Pending This property is required. int
The number of tasks or objects for which statistics are yet to be gathered.
Skipped This property is required. int
The number of tasks or objects for which statistics gathering was skipped.
TimeEnd This property is required. string
Indicates the end of the hour as the statistics are aggregated per hour.
TimeStart This property is required. string
Indicates the start of the hour as the statistics are aggregated per hour.
TimedOut This property is required. int
The number of tasks or objects for which statistics gathering timed out.
Total This property is required. int
The total number of tasks or objects for which statistics collection is finished. This number is the sum of all the tasks or objects with various statuses: pending, inProgress, completed, failed, skipped, timedOut, and unknown.
Unknown This property is required. int
The number of tasks or objects for which the status of statistics gathering is unknown.
Completed This property is required. int
The number of tasks or objects for which statistics gathering is completed.
Failed This property is required. int
The number of tasks or objects for which statistics gathering failed.
GroupBy This property is required. string
The optimizer statistics tasks grouped by type.
InProgress This property is required. int
The number of tasks or objects for which statistics gathering is in progress.
Pending This property is required. int
The number of tasks or objects for which statistics are yet to be gathered.
Skipped This property is required. int
The number of tasks or objects for which statistics gathering was skipped.
TimeEnd This property is required. string
Indicates the end of the hour as the statistics are aggregated per hour.
TimeStart This property is required. string
Indicates the start of the hour as the statistics are aggregated per hour.
TimedOut This property is required. int
The number of tasks or objects for which statistics gathering timed out.
Total This property is required. int
The total number of tasks or objects for which statistics collection is finished. This number is the sum of all the tasks or objects with various statuses: pending, inProgress, completed, failed, skipped, timedOut, and unknown.
Unknown This property is required. int
The number of tasks or objects for which the status of statistics gathering is unknown.
completed This property is required. Integer
The number of tasks or objects for which statistics gathering is completed.
failed This property is required. Integer
The number of tasks or objects for which statistics gathering failed.
groupBy This property is required. String
The optimizer statistics tasks grouped by type.
inProgress This property is required. Integer
The number of tasks or objects for which statistics gathering is in progress.
pending This property is required. Integer
The number of tasks or objects for which statistics are yet to be gathered.
skipped This property is required. Integer
The number of tasks or objects for which statistics gathering was skipped.
timeEnd This property is required. String
Indicates the end of the hour as the statistics are aggregated per hour.
timeStart This property is required. String
Indicates the start of the hour as the statistics are aggregated per hour.
timedOut This property is required. Integer
The number of tasks or objects for which statistics gathering timed out.
total This property is required. Integer
The total number of tasks or objects for which statistics collection is finished. This number is the sum of all the tasks or objects with various statuses: pending, inProgress, completed, failed, skipped, timedOut, and unknown.
unknown This property is required. Integer
The number of tasks or objects for which the status of statistics gathering is unknown.
completed This property is required. number
The number of tasks or objects for which statistics gathering is completed.
failed This property is required. number
The number of tasks or objects for which statistics gathering failed.
groupBy This property is required. string
The optimizer statistics tasks grouped by type.
inProgress This property is required. number
The number of tasks or objects for which statistics gathering is in progress.
pending This property is required. number
The number of tasks or objects for which statistics are yet to be gathered.
skipped This property is required. number
The number of tasks or objects for which statistics gathering was skipped.
timeEnd This property is required. string
Indicates the end of the hour as the statistics are aggregated per hour.
timeStart This property is required. string
Indicates the start of the hour as the statistics are aggregated per hour.
timedOut This property is required. number
The number of tasks or objects for which statistics gathering timed out.
total This property is required. number
The total number of tasks or objects for which statistics collection is finished. This number is the sum of all the tasks or objects with various statuses: pending, inProgress, completed, failed, skipped, timedOut, and unknown.
unknown This property is required. number
The number of tasks or objects for which the status of statistics gathering is unknown.
completed This property is required. int
The number of tasks or objects for which statistics gathering is completed.
failed This property is required. int
The number of tasks or objects for which statistics gathering failed.
group_by This property is required. str
The optimizer statistics tasks grouped by type.
in_progress This property is required. int
The number of tasks or objects for which statistics gathering is in progress.
pending This property is required. int
The number of tasks or objects for which statistics are yet to be gathered.
skipped This property is required. int
The number of tasks or objects for which statistics gathering was skipped.
time_end This property is required. str
Indicates the end of the hour as the statistics are aggregated per hour.
time_start This property is required. str
Indicates the start of the hour as the statistics are aggregated per hour.
timed_out This property is required. int
The number of tasks or objects for which statistics gathering timed out.
total This property is required. int
The total number of tasks or objects for which statistics collection is finished. This number is the sum of all the tasks or objects with various statuses: pending, inProgress, completed, failed, skipped, timedOut, and unknown.
unknown This property is required. int
The number of tasks or objects for which the status of statistics gathering is unknown.
completed This property is required. Number
The number of tasks or objects for which statistics gathering is completed.
failed This property is required. Number
The number of tasks or objects for which statistics gathering failed.
groupBy This property is required. String
The optimizer statistics tasks grouped by type.
inProgress This property is required. Number
The number of tasks or objects for which statistics gathering is in progress.
pending This property is required. Number
The number of tasks or objects for which statistics are yet to be gathered.
skipped This property is required. Number
The number of tasks or objects for which statistics gathering was skipped.
timeEnd This property is required. String
Indicates the end of the hour as the statistics are aggregated per hour.
timeStart This property is required. String
Indicates the start of the hour as the statistics are aggregated per hour.
timedOut This property is required. Number
The number of tasks or objects for which statistics gathering timed out.
total This property is required. Number
The total number of tasks or objects for which statistics collection is finished. This number is the sum of all the tasks or objects with various statuses: pending, inProgress, completed, failed, skipped, timedOut, and unknown.
unknown This property is required. Number
The number of tasks or objects for which the status of statistics gathering is unknown.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.