1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseOptimizerStatisticsCollectionAggregations
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.DatabaseManagement.getManagedDatabaseOptimizerStatisticsCollectionAggregations

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

    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: _var.managed_database_optimizer_statistics_collection_aggregation_group_type,
        managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
        endTimeLessThanOrEqualTo: _var.managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to,
        startTimeGreaterThanOrEqualTo: _var.managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to,
        taskType: _var.managed_database_optimizer_statistics_collection_aggregation_task_type,
    });
    
    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=var["managed_database_optimizer_statistics_collection_aggregation_group_type"],
        managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
        end_time_less_than_or_equal_to=var["managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to"],
        start_time_greater_than_or_equal_to=var["managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to"],
        task_type=var["managed_database_optimizer_statistics_collection_aggregation_task_type"])
    
    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.GetManagedDatabaseOptimizerStatisticsCollectionAggregations(ctx, &databasemanagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs{
    			GroupType:                     _var.Managed_database_optimizer_statistics_collection_aggregation_group_type,
    			ManagedDatabaseId:             oci_database_management_managed_database.Test_managed_database.Id,
    			EndTimeLessThanOrEqualTo:      pulumi.StringRef(_var.Managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to),
    			StartTimeGreaterThanOrEqualTo: pulumi.StringRef(_var.Managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to),
    			TaskType:                      pulumi.StringRef(_var.Managed_database_optimizer_statistics_collection_aggregation_task_type),
    		}, 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 testManagedDatabaseOptimizerStatisticsCollectionAggregations = Oci.DatabaseManagement.GetManagedDatabaseOptimizerStatisticsCollectionAggregations.Invoke(new()
        {
            GroupType = @var.Managed_database_optimizer_statistics_collection_aggregation_group_type,
            ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
            EndTimeLessThanOrEqualTo = @var.Managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to,
            StartTimeGreaterThanOrEqualTo = @var.Managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to,
            TaskType = @var.Managed_database_optimizer_statistics_collection_aggregation_task_type,
        });
    
    });
    
    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(var_.managed_database_optimizer_statistics_collection_aggregation_group_type())
                .managedDatabaseId(oci_database_management_managed_database.test_managed_database().id())
                .endTimeLessThanOrEqualTo(var_.managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to())
                .startTimeGreaterThanOrEqualTo(var_.managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to())
                .taskType(var_.managed_database_optimizer_statistics_collection_aggregation_task_type())
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseOptimizerStatisticsCollectionAggregations:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseOptimizerStatisticsCollectionAggregations
          Arguments:
            groupType: ${var.managed_database_optimizer_statistics_collection_aggregation_group_type}
            managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}
            endTimeLessThanOrEqualTo: ${var.managed_database_optimizer_statistics_collection_aggregation_end_time_less_than_or_equal_to}
            startTimeGreaterThanOrEqualTo: ${var.managed_database_optimizer_statistics_collection_aggregation_start_time_greater_than_or_equal_to}
            taskType: ${var.managed_database_optimizer_statistics_collection_aggregation_task_type}
    

    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>
    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]
    func GetManagedDatabaseOptimizerStatisticsCollectionAggregations(ctx *Context, args *GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs, opts ...InvokeOption) (*GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult, error)
    func GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOutput(ctx *Context, args *GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOutputArgs, opts ...InvokeOption) GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResultOutput

    > 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)
    }
    public static CompletableFuture<GetManagedDatabaseOptimizerStatisticsCollectionAggregationsResult> getManagedDatabaseOptimizerStatisticsCollectionAggregations(GetManagedDatabaseOptimizerStatisticsCollectionAggregationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedDatabaseOptimizerStatisticsCollectionAggregations:getManagedDatabaseOptimizerStatisticsCollectionAggregations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupType string
    The optimizer statistics tasks grouped by type.
    ManagedDatabaseId 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 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 string
    The optimizer statistics tasks grouped by type.
    ManagedDatabaseId 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 []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 String
    The optimizer statistics tasks grouped by type.
    managedDatabaseId 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 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 string
    The optimizer statistics tasks grouped by type.
    managedDatabaseId 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 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 str
    The optimizer statistics tasks grouped by type.
    managed_database_id 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 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 String
    The optimizer statistics tasks grouped by type.
    managedDatabaseId 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 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 string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOptimizerStatisticsCollectionAggregationsCollection

    items List<Property Map>
    The list of Optimizer Statistics Collection details.

    GetManagedDatabaseOptimizerStatisticsCollectionAggregationsOptimizerStatisticsCollectionAggregationsCollectionItem

    Completed int
    The number of tasks or objects for which statistics gathering is completed.
    Failed int
    The number of tasks or objects for which statistics gathering failed.
    GroupBy string
    The optimizer statistics tasks grouped by type.
    InProgress int
    The number of tasks or objects for which statistics gathering is in progress.
    Pending int
    The number of tasks or objects for which statistics are yet to be gathered.
    Skipped int
    The number of tasks or objects for which statistics gathering was skipped.
    TimeEnd string
    Indicates the end of the hour as the statistics are aggregated per hour.
    TimeStart string
    Indicates the start of the hour as the statistics are aggregated per hour.
    TimedOut int
    The number of tasks or objects for which statistics gathering timed out.
    Total 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 int
    The number of tasks or objects for which the status of statistics gathering is unknown.
    Completed int
    The number of tasks or objects for which statistics gathering is completed.
    Failed int
    The number of tasks or objects for which statistics gathering failed.
    GroupBy string
    The optimizer statistics tasks grouped by type.
    InProgress int
    The number of tasks or objects for which statistics gathering is in progress.
    Pending int
    The number of tasks or objects for which statistics are yet to be gathered.
    Skipped int
    The number of tasks or objects for which statistics gathering was skipped.
    TimeEnd string
    Indicates the end of the hour as the statistics are aggregated per hour.
    TimeStart string
    Indicates the start of the hour as the statistics are aggregated per hour.
    TimedOut int
    The number of tasks or objects for which statistics gathering timed out.
    Total 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 int
    The number of tasks or objects for which the status of statistics gathering is unknown.
    completed Integer
    The number of tasks or objects for which statistics gathering is completed.
    failed Integer
    The number of tasks or objects for which statistics gathering failed.
    groupBy String
    The optimizer statistics tasks grouped by type.
    inProgress Integer
    The number of tasks or objects for which statistics gathering is in progress.
    pending Integer
    The number of tasks or objects for which statistics are yet to be gathered.
    skipped Integer
    The number of tasks or objects for which statistics gathering was skipped.
    timeEnd String
    Indicates the end of the hour as the statistics are aggregated per hour.
    timeStart String
    Indicates the start of the hour as the statistics are aggregated per hour.
    timedOut Integer
    The number of tasks or objects for which statistics gathering timed out.
    total 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 Integer
    The number of tasks or objects for which the status of statistics gathering is unknown.
    completed number
    The number of tasks or objects for which statistics gathering is completed.
    failed number
    The number of tasks or objects for which statistics gathering failed.
    groupBy string
    The optimizer statistics tasks grouped by type.
    inProgress number
    The number of tasks or objects for which statistics gathering is in progress.
    pending number
    The number of tasks or objects for which statistics are yet to be gathered.
    skipped number
    The number of tasks or objects for which statistics gathering was skipped.
    timeEnd string
    Indicates the end of the hour as the statistics are aggregated per hour.
    timeStart string
    Indicates the start of the hour as the statistics are aggregated per hour.
    timedOut number
    The number of tasks or objects for which statistics gathering timed out.
    total 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 number
    The number of tasks or objects for which the status of statistics gathering is unknown.
    completed int
    The number of tasks or objects for which statistics gathering is completed.
    failed int
    The number of tasks or objects for which statistics gathering failed.
    group_by str
    The optimizer statistics tasks grouped by type.
    in_progress int
    The number of tasks or objects for which statistics gathering is in progress.
    pending int
    The number of tasks or objects for which statistics are yet to be gathered.
    skipped int
    The number of tasks or objects for which statistics gathering was skipped.
    time_end str
    Indicates the end of the hour as the statistics are aggregated per hour.
    time_start str
    Indicates the start of the hour as the statistics are aggregated per hour.
    timed_out int
    The number of tasks or objects for which statistics gathering timed out.
    total 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 int
    The number of tasks or objects for which the status of statistics gathering is unknown.
    completed Number
    The number of tasks or objects for which statistics gathering is completed.
    failed Number
    The number of tasks or objects for which statistics gathering failed.
    groupBy String
    The optimizer statistics tasks grouped by type.
    inProgress Number
    The number of tasks or objects for which statistics gathering is in progress.
    pending Number
    The number of tasks or objects for which statistics are yet to be gathered.
    skipped Number
    The number of tasks or objects for which statistics gathering was skipped.
    timeEnd String
    Indicates the end of the hour as the statistics are aggregated per hour.
    timeStart String
    Indicates the start of the hour as the statistics are aggregated per hour.
    timedOut Number
    The number of tasks or objects for which statistics gathering timed out.
    total 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 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.
    oci logo
    Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi