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

oci.DatabaseManagement.getManagedDatabaseAlertLogCounts

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Managed Database Alert Log Counts in Oracle Cloud Infrastructure Database Management service.

Get the counts of alert logs for the specified Managed Database.

Example Usage

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

const testManagedDatabaseAlertLogCounts = oci.DatabaseManagement.getManagedDatabaseAlertLogCounts({
    managedDatabaseId: testManagedDatabase.id,
    groupBy: managedDatabaseAlertLogCountGroupBy,
    isRegularExpression: managedDatabaseAlertLogCountIsRegularExpression,
    levelFilter: managedDatabaseAlertLogCountLevelFilter,
    logSearchText: managedDatabaseAlertLogCountLogSearchText,
    timeGreaterThanOrEqualTo: managedDatabaseAlertLogCountTimeGreaterThanOrEqualTo,
    timeLessThanOrEqualTo: managedDatabaseAlertLogCountTimeLessThanOrEqualTo,
    typeFilter: managedDatabaseAlertLogCountTypeFilter,
});
Copy
import pulumi
import pulumi_oci as oci

test_managed_database_alert_log_counts = oci.DatabaseManagement.get_managed_database_alert_log_counts(managed_database_id=test_managed_database["id"],
    group_by=managed_database_alert_log_count_group_by,
    is_regular_expression=managed_database_alert_log_count_is_regular_expression,
    level_filter=managed_database_alert_log_count_level_filter,
    log_search_text=managed_database_alert_log_count_log_search_text,
    time_greater_than_or_equal_to=managed_database_alert_log_count_time_greater_than_or_equal_to,
    time_less_than_or_equal_to=managed_database_alert_log_count_time_less_than_or_equal_to,
    type_filter=managed_database_alert_log_count_type_filter)
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.GetManagedDatabaseAlertLogCounts(ctx, &databasemanagement.GetManagedDatabaseAlertLogCountsArgs{
			ManagedDatabaseId:        testManagedDatabase.Id,
			GroupBy:                  pulumi.StringRef(managedDatabaseAlertLogCountGroupBy),
			IsRegularExpression:      pulumi.BoolRef(managedDatabaseAlertLogCountIsRegularExpression),
			LevelFilter:              pulumi.StringRef(managedDatabaseAlertLogCountLevelFilter),
			LogSearchText:            pulumi.StringRef(managedDatabaseAlertLogCountLogSearchText),
			TimeGreaterThanOrEqualTo: pulumi.StringRef(managedDatabaseAlertLogCountTimeGreaterThanOrEqualTo),
			TimeLessThanOrEqualTo:    pulumi.StringRef(managedDatabaseAlertLogCountTimeLessThanOrEqualTo),
			TypeFilter:               pulumi.StringRef(managedDatabaseAlertLogCountTypeFilter),
		}, 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 testManagedDatabaseAlertLogCounts = Oci.DatabaseManagement.GetManagedDatabaseAlertLogCounts.Invoke(new()
    {
        ManagedDatabaseId = testManagedDatabase.Id,
        GroupBy = managedDatabaseAlertLogCountGroupBy,
        IsRegularExpression = managedDatabaseAlertLogCountIsRegularExpression,
        LevelFilter = managedDatabaseAlertLogCountLevelFilter,
        LogSearchText = managedDatabaseAlertLogCountLogSearchText,
        TimeGreaterThanOrEqualTo = managedDatabaseAlertLogCountTimeGreaterThanOrEqualTo,
        TimeLessThanOrEqualTo = managedDatabaseAlertLogCountTimeLessThanOrEqualTo,
        TypeFilter = managedDatabaseAlertLogCountTypeFilter,
    });

});
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.GetManagedDatabaseAlertLogCountsArgs;
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 testManagedDatabaseAlertLogCounts = DatabaseManagementFunctions.getManagedDatabaseAlertLogCounts(GetManagedDatabaseAlertLogCountsArgs.builder()
            .managedDatabaseId(testManagedDatabase.id())
            .groupBy(managedDatabaseAlertLogCountGroupBy)
            .isRegularExpression(managedDatabaseAlertLogCountIsRegularExpression)
            .levelFilter(managedDatabaseAlertLogCountLevelFilter)
            .logSearchText(managedDatabaseAlertLogCountLogSearchText)
            .timeGreaterThanOrEqualTo(managedDatabaseAlertLogCountTimeGreaterThanOrEqualTo)
            .timeLessThanOrEqualTo(managedDatabaseAlertLogCountTimeLessThanOrEqualTo)
            .typeFilter(managedDatabaseAlertLogCountTypeFilter)
            .build());

    }
}
Copy
variables:
  testManagedDatabaseAlertLogCounts:
    fn::invoke:
      function: oci:DatabaseManagement:getManagedDatabaseAlertLogCounts
      arguments:
        managedDatabaseId: ${testManagedDatabase.id}
        groupBy: ${managedDatabaseAlertLogCountGroupBy}
        isRegularExpression: ${managedDatabaseAlertLogCountIsRegularExpression}
        levelFilter: ${managedDatabaseAlertLogCountLevelFilter}
        logSearchText: ${managedDatabaseAlertLogCountLogSearchText}
        timeGreaterThanOrEqualTo: ${managedDatabaseAlertLogCountTimeGreaterThanOrEqualTo}
        timeLessThanOrEqualTo: ${managedDatabaseAlertLogCountTimeLessThanOrEqualTo}
        typeFilter: ${managedDatabaseAlertLogCountTypeFilter}
Copy

Using getManagedDatabaseAlertLogCounts

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 getManagedDatabaseAlertLogCounts(args: GetManagedDatabaseAlertLogCountsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseAlertLogCountsResult>
function getManagedDatabaseAlertLogCountsOutput(args: GetManagedDatabaseAlertLogCountsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseAlertLogCountsResult>
Copy
def get_managed_database_alert_log_counts(filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseAlertLogCountsFilter]] = None,
                                          group_by: Optional[str] = None,
                                          is_regular_expression: Optional[bool] = None,
                                          level_filter: Optional[str] = None,
                                          log_search_text: Optional[str] = None,
                                          managed_database_id: Optional[str] = None,
                                          time_greater_than_or_equal_to: Optional[str] = None,
                                          time_less_than_or_equal_to: Optional[str] = None,
                                          type_filter: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseAlertLogCountsResult
def get_managed_database_alert_log_counts_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseAlertLogCountsFilterArgs]]]] = None,
                                          group_by: Optional[pulumi.Input[str]] = None,
                                          is_regular_expression: Optional[pulumi.Input[bool]] = None,
                                          level_filter: Optional[pulumi.Input[str]] = None,
                                          log_search_text: Optional[pulumi.Input[str]] = None,
                                          managed_database_id: 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,
                                          type_filter: Optional[pulumi.Input[str]] = None,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseAlertLogCountsResult]
Copy
func GetManagedDatabaseAlertLogCounts(ctx *Context, args *GetManagedDatabaseAlertLogCountsArgs, opts ...InvokeOption) (*GetManagedDatabaseAlertLogCountsResult, error)
func GetManagedDatabaseAlertLogCountsOutput(ctx *Context, args *GetManagedDatabaseAlertLogCountsOutputArgs, opts ...InvokeOption) GetManagedDatabaseAlertLogCountsResultOutput
Copy

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

public static class GetManagedDatabaseAlertLogCounts 
{
    public static Task<GetManagedDatabaseAlertLogCountsResult> InvokeAsync(GetManagedDatabaseAlertLogCountsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseAlertLogCountsResult> Invoke(GetManagedDatabaseAlertLogCountsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetManagedDatabaseAlertLogCountsResult> getManagedDatabaseAlertLogCounts(GetManagedDatabaseAlertLogCountsArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseAlertLogCountsResult> getManagedDatabaseAlertLogCounts(GetManagedDatabaseAlertLogCountsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseAlertLogCounts:getManagedDatabaseAlertLogCounts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
Filters Changes to this property will trigger replacement. List<GetManagedDatabaseAlertLogCountsFilter>
GroupBy string
The optional parameter used to group different alert logs.
IsRegularExpression bool
The flag to indicate whether the search text is regular expression or not.
LevelFilter string
The optional parameter to filter the alert logs by log level.
LogSearchText string
The optional query parameter to filter the attention or alert logs by search text.
TimeGreaterThanOrEqualTo string
The optional greater than or equal to timestamp to filter the logs.
TimeLessThanOrEqualTo string
The optional less than or equal to timestamp to filter the logs.
TypeFilter string
The optional parameter to filter the attention or alert logs by type.
ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
Filters Changes to this property will trigger replacement. []GetManagedDatabaseAlertLogCountsFilter
GroupBy string
The optional parameter used to group different alert logs.
IsRegularExpression bool
The flag to indicate whether the search text is regular expression or not.
LevelFilter string
The optional parameter to filter the alert logs by log level.
LogSearchText string
The optional query parameter to filter the attention or alert logs by search text.
TimeGreaterThanOrEqualTo string
The optional greater than or equal to timestamp to filter the logs.
TimeLessThanOrEqualTo string
The optional less than or equal to timestamp to filter the logs.
TypeFilter string
The optional parameter to filter the attention or alert logs by type.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
filters Changes to this property will trigger replacement. List<GetManagedDatabaseAlertLogCountsFilter>
groupBy String
The optional parameter used to group different alert logs.
isRegularExpression Boolean
The flag to indicate whether the search text is regular expression or not.
levelFilter String
The optional parameter to filter the alert logs by log level.
logSearchText String
The optional query parameter to filter the attention or alert logs by search text.
timeGreaterThanOrEqualTo String
The optional greater than or equal to timestamp to filter the logs.
timeLessThanOrEqualTo String
The optional less than or equal to timestamp to filter the logs.
typeFilter String
The optional parameter to filter the attention or alert logs by type.
managedDatabaseId This property is required. string
The OCID of the Managed Database.
filters Changes to this property will trigger replacement. GetManagedDatabaseAlertLogCountsFilter[]
groupBy string
The optional parameter used to group different alert logs.
isRegularExpression boolean
The flag to indicate whether the search text is regular expression or not.
levelFilter string
The optional parameter to filter the alert logs by log level.
logSearchText string
The optional query parameter to filter the attention or alert logs by search text.
timeGreaterThanOrEqualTo string
The optional greater than or equal to timestamp to filter the logs.
timeLessThanOrEqualTo string
The optional less than or equal to timestamp to filter the logs.
typeFilter string
The optional parameter to filter the attention or alert logs by type.
managed_database_id This property is required. str
The OCID of the Managed Database.
filters Changes to this property will trigger replacement. Sequence[databasemanagement.GetManagedDatabaseAlertLogCountsFilter]
group_by str
The optional parameter used to group different alert logs.
is_regular_expression bool
The flag to indicate whether the search text is regular expression or not.
level_filter str
The optional parameter to filter the alert logs by log level.
log_search_text str
The optional query parameter to filter the attention or alert logs by search text.
time_greater_than_or_equal_to str
The optional greater than or equal to timestamp to filter the logs.
time_less_than_or_equal_to str
The optional less than or equal to timestamp to filter the logs.
type_filter str
The optional parameter to filter the attention or alert logs by type.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
filters Changes to this property will trigger replacement. List<Property Map>
groupBy String
The optional parameter used to group different alert logs.
isRegularExpression Boolean
The flag to indicate whether the search text is regular expression or not.
levelFilter String
The optional parameter to filter the alert logs by log level.
logSearchText String
The optional query parameter to filter the attention or alert logs by search text.
timeGreaterThanOrEqualTo String
The optional greater than or equal to timestamp to filter the logs.
timeLessThanOrEqualTo String
The optional less than or equal to timestamp to filter the logs.
typeFilter String
The optional parameter to filter the attention or alert logs by type.

getManagedDatabaseAlertLogCounts Result

The following output properties are available:

AlertLogCountsCollections List<GetManagedDatabaseAlertLogCountsAlertLogCountsCollection>
The list of alert_log_counts_collection.
Id string
The provider-assigned unique ID for this managed resource.
ManagedDatabaseId string
The OCID of the Managed Database.
Filters List<GetManagedDatabaseAlertLogCountsFilter>
GroupBy string
IsRegularExpression bool
LevelFilter string
LogSearchText string
TimeGreaterThanOrEqualTo string
TimeLessThanOrEqualTo string
TypeFilter string
AlertLogCountsCollections []GetManagedDatabaseAlertLogCountsAlertLogCountsCollection
The list of alert_log_counts_collection.
Id string
The provider-assigned unique ID for this managed resource.
ManagedDatabaseId string
The OCID of the Managed Database.
Filters []GetManagedDatabaseAlertLogCountsFilter
GroupBy string
IsRegularExpression bool
LevelFilter string
LogSearchText string
TimeGreaterThanOrEqualTo string
TimeLessThanOrEqualTo string
TypeFilter string
alertLogCountsCollections List<GetManagedDatabaseAlertLogCountsAlertLogCountsCollection>
The list of alert_log_counts_collection.
id String
The provider-assigned unique ID for this managed resource.
managedDatabaseId String
The OCID of the Managed Database.
filters List<GetManagedDatabaseAlertLogCountsFilter>
groupBy String
isRegularExpression Boolean
levelFilter String
logSearchText String
timeGreaterThanOrEqualTo String
timeLessThanOrEqualTo String
typeFilter String
alertLogCountsCollections GetManagedDatabaseAlertLogCountsAlertLogCountsCollection[]
The list of alert_log_counts_collection.
id string
The provider-assigned unique ID for this managed resource.
managedDatabaseId string
The OCID of the Managed Database.
filters GetManagedDatabaseAlertLogCountsFilter[]
groupBy string
isRegularExpression boolean
levelFilter string
logSearchText string
timeGreaterThanOrEqualTo string
timeLessThanOrEqualTo string
typeFilter string
alertLogCountsCollections List<Property Map>
The list of alert_log_counts_collection.
id String
The provider-assigned unique ID for this managed resource.
managedDatabaseId String
The OCID of the Managed Database.
filters List<Property Map>
groupBy String
isRegularExpression Boolean
levelFilter String
logSearchText String
timeGreaterThanOrEqualTo String
timeLessThanOrEqualTo String
typeFilter String

Supporting Types

GetManagedDatabaseAlertLogCountsAlertLogCountsCollection

Items This property is required. List<GetManagedDatabaseAlertLogCountsAlertLogCountsCollectionItem>
An array of the counts of different urgency or type of alert logs.
Items This property is required. []GetManagedDatabaseAlertLogCountsAlertLogCountsCollectionItem
An array of the counts of different urgency or type of alert logs.
items This property is required. List<GetManagedDatabaseAlertLogCountsAlertLogCountsCollectionItem>
An array of the counts of different urgency or type of alert logs.
items This property is required. GetManagedDatabaseAlertLogCountsAlertLogCountsCollectionItem[]
An array of the counts of different urgency or type of alert logs.
items This property is required. Sequence[databasemanagement.GetManagedDatabaseAlertLogCountsAlertLogCountsCollectionItem]
An array of the counts of different urgency or type of alert logs.
items This property is required. List<Property Map>
An array of the counts of different urgency or type of alert logs.

GetManagedDatabaseAlertLogCountsAlertLogCountsCollectionItem

Category This property is required. string
The category of different alert logs.
Count This property is required. int
The count of alert logs with specific category.
Category This property is required. string
The category of different alert logs.
Count This property is required. int
The count of alert logs with specific category.
category This property is required. String
The category of different alert logs.
count This property is required. Integer
The count of alert logs with specific category.
category This property is required. string
The category of different alert logs.
count This property is required. number
The count of alert logs with specific category.
category This property is required. str
The category of different alert logs.
count This property is required. int
The count of alert logs with specific category.
category This property is required. String
The category of different alert logs.
count This property is required. Number
The count of alert logs with specific category.

GetManagedDatabaseAlertLogCountsFilter

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

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi