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

oci.DatabaseManagement.getManagedDatabaseAttentionLogCounts

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 Attention Log Counts in Oracle Cloud Infrastructure Database Management service.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedDatabaseAttentionLogCounts = oci.DatabaseManagement.getManagedDatabaseAttentionLogCounts({
        managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
        groupBy: _var.managed_database_attention_log_count_group_by,
        isRegularExpression: _var.managed_database_attention_log_count_is_regular_expression,
        logSearchText: _var.managed_database_attention_log_count_log_search_text,
        timeGreaterThanOrEqualTo: _var.managed_database_attention_log_count_time_greater_than_or_equal_to,
        timeLessThanOrEqualTo: _var.managed_database_attention_log_count_time_less_than_or_equal_to,
        typeFilter: _var.managed_database_attention_log_count_type_filter,
        urgencyFilter: _var.managed_database_attention_log_count_urgency_filter,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_database_attention_log_counts = oci.DatabaseManagement.get_managed_database_attention_log_counts(managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
        group_by=var["managed_database_attention_log_count_group_by"],
        is_regular_expression=var["managed_database_attention_log_count_is_regular_expression"],
        log_search_text=var["managed_database_attention_log_count_log_search_text"],
        time_greater_than_or_equal_to=var["managed_database_attention_log_count_time_greater_than_or_equal_to"],
        time_less_than_or_equal_to=var["managed_database_attention_log_count_time_less_than_or_equal_to"],
        type_filter=var["managed_database_attention_log_count_type_filter"],
        urgency_filter=var["managed_database_attention_log_count_urgency_filter"])
    
    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.GetManagedDatabaseAttentionLogCounts(ctx, &databasemanagement.GetManagedDatabaseAttentionLogCountsArgs{
    			ManagedDatabaseId:        oci_database_management_managed_database.Test_managed_database.Id,
    			GroupBy:                  pulumi.StringRef(_var.Managed_database_attention_log_count_group_by),
    			IsRegularExpression:      pulumi.BoolRef(_var.Managed_database_attention_log_count_is_regular_expression),
    			LogSearchText:            pulumi.StringRef(_var.Managed_database_attention_log_count_log_search_text),
    			TimeGreaterThanOrEqualTo: pulumi.StringRef(_var.Managed_database_attention_log_count_time_greater_than_or_equal_to),
    			TimeLessThanOrEqualTo:    pulumi.StringRef(_var.Managed_database_attention_log_count_time_less_than_or_equal_to),
    			TypeFilter:               pulumi.StringRef(_var.Managed_database_attention_log_count_type_filter),
    			UrgencyFilter:            pulumi.StringRef(_var.Managed_database_attention_log_count_urgency_filter),
    		}, 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 testManagedDatabaseAttentionLogCounts = Oci.DatabaseManagement.GetManagedDatabaseAttentionLogCounts.Invoke(new()
        {
            ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
            GroupBy = @var.Managed_database_attention_log_count_group_by,
            IsRegularExpression = @var.Managed_database_attention_log_count_is_regular_expression,
            LogSearchText = @var.Managed_database_attention_log_count_log_search_text,
            TimeGreaterThanOrEqualTo = @var.Managed_database_attention_log_count_time_greater_than_or_equal_to,
            TimeLessThanOrEqualTo = @var.Managed_database_attention_log_count_time_less_than_or_equal_to,
            TypeFilter = @var.Managed_database_attention_log_count_type_filter,
            UrgencyFilter = @var.Managed_database_attention_log_count_urgency_filter,
        });
    
    });
    
    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.GetManagedDatabaseAttentionLogCountsArgs;
    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 testManagedDatabaseAttentionLogCounts = DatabaseManagementFunctions.getManagedDatabaseAttentionLogCounts(GetManagedDatabaseAttentionLogCountsArgs.builder()
                .managedDatabaseId(oci_database_management_managed_database.test_managed_database().id())
                .groupBy(var_.managed_database_attention_log_count_group_by())
                .isRegularExpression(var_.managed_database_attention_log_count_is_regular_expression())
                .logSearchText(var_.managed_database_attention_log_count_log_search_text())
                .timeGreaterThanOrEqualTo(var_.managed_database_attention_log_count_time_greater_than_or_equal_to())
                .timeLessThanOrEqualTo(var_.managed_database_attention_log_count_time_less_than_or_equal_to())
                .typeFilter(var_.managed_database_attention_log_count_type_filter())
                .urgencyFilter(var_.managed_database_attention_log_count_urgency_filter())
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseAttentionLogCounts:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseAttentionLogCounts
          Arguments:
            managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}
            groupBy: ${var.managed_database_attention_log_count_group_by}
            isRegularExpression: ${var.managed_database_attention_log_count_is_regular_expression}
            logSearchText: ${var.managed_database_attention_log_count_log_search_text}
            timeGreaterThanOrEqualTo: ${var.managed_database_attention_log_count_time_greater_than_or_equal_to}
            timeLessThanOrEqualTo: ${var.managed_database_attention_log_count_time_less_than_or_equal_to}
            typeFilter: ${var.managed_database_attention_log_count_type_filter}
            urgencyFilter: ${var.managed_database_attention_log_count_urgency_filter}
    

    Using getManagedDatabaseAttentionLogCounts

    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 getManagedDatabaseAttentionLogCounts(args: GetManagedDatabaseAttentionLogCountsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseAttentionLogCountsResult>
    function getManagedDatabaseAttentionLogCountsOutput(args: GetManagedDatabaseAttentionLogCountsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseAttentionLogCountsResult>
    def get_managed_database_attention_log_counts(filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseAttentionLogCountsFilter]] = None,
                                                  group_by: Optional[str] = None,
                                                  is_regular_expression: Optional[bool] = 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,
                                                  urgency_filter: Optional[str] = None,
                                                  opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseAttentionLogCountsResult
    def get_managed_database_attention_log_counts_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseAttentionLogCountsFilterArgs]]]] = None,
                                                  group_by: Optional[pulumi.Input[str]] = None,
                                                  is_regular_expression: Optional[pulumi.Input[bool]] = 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,
                                                  urgency_filter: Optional[pulumi.Input[str]] = None,
                                                  opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseAttentionLogCountsResult]
    func GetManagedDatabaseAttentionLogCounts(ctx *Context, args *GetManagedDatabaseAttentionLogCountsArgs, opts ...InvokeOption) (*GetManagedDatabaseAttentionLogCountsResult, error)
    func GetManagedDatabaseAttentionLogCountsOutput(ctx *Context, args *GetManagedDatabaseAttentionLogCountsOutputArgs, opts ...InvokeOption) GetManagedDatabaseAttentionLogCountsResultOutput

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

    public static class GetManagedDatabaseAttentionLogCounts 
    {
        public static Task<GetManagedDatabaseAttentionLogCountsResult> InvokeAsync(GetManagedDatabaseAttentionLogCountsArgs args, InvokeOptions? opts = null)
        public static Output<GetManagedDatabaseAttentionLogCountsResult> Invoke(GetManagedDatabaseAttentionLogCountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagedDatabaseAttentionLogCountsResult> getManagedDatabaseAttentionLogCounts(GetManagedDatabaseAttentionLogCountsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedDatabaseAttentionLogCounts:getManagedDatabaseAttentionLogCounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters List<GetManagedDatabaseAttentionLogCountsFilter>
    GroupBy string
    The optional parameter used to group different attention logs.
    IsRegularExpression bool
    The flag to indicate whether the search text is regular expression or not.
    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.
    UrgencyFilter string
    The optional parameter to filter the attention logs by urgency.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters []GetManagedDatabaseAttentionLogCountsFilter
    GroupBy string
    The optional parameter used to group different attention logs.
    IsRegularExpression bool
    The flag to indicate whether the search text is regular expression or not.
    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.
    UrgencyFilter string
    The optional parameter to filter the attention logs by urgency.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<GetManagedDatabaseAttentionLogCountsFilter>
    groupBy String
    The optional parameter used to group different attention logs.
    isRegularExpression Boolean
    The flag to indicate whether the search text is regular expression or not.
    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.
    urgencyFilter String
    The optional parameter to filter the attention logs by urgency.
    managedDatabaseId string
    The OCID of the Managed Database.
    filters GetManagedDatabaseAttentionLogCountsFilter[]
    groupBy string
    The optional parameter used to group different attention logs.
    isRegularExpression boolean
    The flag to indicate whether the search text is regular expression or not.
    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.
    urgencyFilter string
    The optional parameter to filter the attention logs by urgency.
    managed_database_id str
    The OCID of the Managed Database.
    filters GetManagedDatabaseAttentionLogCountsFilter]
    group_by str
    The optional parameter used to group different attention logs.
    is_regular_expression bool
    The flag to indicate whether the search text is regular expression or not.
    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.
    urgency_filter str
    The optional parameter to filter the attention logs by urgency.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<Property Map>
    groupBy String
    The optional parameter used to group different attention logs.
    isRegularExpression Boolean
    The flag to indicate whether the search text is regular expression or not.
    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.
    urgencyFilter String
    The optional parameter to filter the attention logs by urgency.

    getManagedDatabaseAttentionLogCounts Result

    The following output properties are available:

    AttentionLogCountsCollections List<GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollection>
    The list of attention_log_counts_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters List<GetManagedDatabaseAttentionLogCountsFilter>
    GroupBy string
    IsRegularExpression bool
    LogSearchText string
    TimeGreaterThanOrEqualTo string
    TimeLessThanOrEqualTo string
    TypeFilter string
    UrgencyFilter string
    AttentionLogCountsCollections []GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollection
    The list of attention_log_counts_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters []GetManagedDatabaseAttentionLogCountsFilter
    GroupBy string
    IsRegularExpression bool
    LogSearchText string
    TimeGreaterThanOrEqualTo string
    TimeLessThanOrEqualTo string
    TypeFilter string
    UrgencyFilter string
    attentionLogCountsCollections List<GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollection>
    The list of attention_log_counts_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<GetManagedDatabaseAttentionLogCountsFilter>
    groupBy String
    isRegularExpression Boolean
    logSearchText String
    timeGreaterThanOrEqualTo String
    timeLessThanOrEqualTo String
    typeFilter String
    urgencyFilter String
    attentionLogCountsCollections GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollection[]
    The list of attention_log_counts_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId string
    The OCID of the Managed Database.
    filters GetManagedDatabaseAttentionLogCountsFilter[]
    groupBy string
    isRegularExpression boolean
    logSearchText string
    timeGreaterThanOrEqualTo string
    timeLessThanOrEqualTo string
    typeFilter string
    urgencyFilter string
    attentionLogCountsCollections List<Property Map>
    The list of attention_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
    logSearchText String
    timeGreaterThanOrEqualTo String
    timeLessThanOrEqualTo String
    typeFilter String
    urgencyFilter String

    Supporting Types

    GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollection

    Items List<GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollectionItem>
    An array of the counts of different urgency or type of attention logs.
    Items []GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollectionItem
    An array of the counts of different urgency or type of attention logs.
    items List<GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollectionItem>
    An array of the counts of different urgency or type of attention logs.
    items GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollectionItem[]
    An array of the counts of different urgency or type of attention logs.
    items GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollectionItem]
    An array of the counts of different urgency or type of attention logs.
    items List<Property Map>
    An array of the counts of different urgency or type of attention logs.

    GetManagedDatabaseAttentionLogCountsAttentionLogCountsCollectionItem

    Category string
    The category of different attention logs.
    Count int
    The count of attention logs with specific category.
    Category string
    The category of different attention logs.
    Count int
    The count of attention logs with specific category.
    category String
    The category of different attention logs.
    count Integer
    The count of attention logs with specific category.
    category string
    The category of different attention logs.
    count number
    The count of attention logs with specific category.
    category str
    The category of different attention logs.
    count int
    The count of attention logs with specific category.
    category String
    The category of different attention logs.
    count Number
    The count of attention logs with specific category.

    GetManagedDatabaseAttentionLogCountsFilter

    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

    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