1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getAuditProfileAnalytic
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DataSafe.getAuditProfileAnalytic

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides details about a specific Audit Profile Analytic resource in Oracle Cloud Infrastructure Data Safe service.

    Gets a list of audit profile aggregated details . A audit profile aggregation helps understand the overall state of audit profile profiles. As an example, it helps understand how many audit profiles have paid usage. It is especially useful to create dashboards or to support analytics.

    The parameter accessLevel specifies whether to return only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn’t have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

    The parameter compartmentIdInSubtree applies when you perform AuditProfileAnalytics on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAuditProfileAnalytic = oci.DataSafe.getAuditProfileAnalytic({
        compartmentId: compartmentId,
        accessLevel: auditProfileAnalyticAccessLevel,
        compartmentIdInSubtree: auditProfileAnalyticCompartmentIdInSubtree,
        groupBies: auditProfileAnalyticGroupBy,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_audit_profile_analytic = oci.DataSafe.get_audit_profile_analytic(compartment_id=compartment_id,
        access_level=audit_profile_analytic_access_level,
        compartment_id_in_subtree=audit_profile_analytic_compartment_id_in_subtree,
        group_bies=audit_profile_analytic_group_by)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DataSafe.GetAuditProfileAnalytic(ctx, &datasafe.GetAuditProfileAnalyticArgs{
    			CompartmentId:          compartmentId,
    			AccessLevel:            pulumi.StringRef(auditProfileAnalyticAccessLevel),
    			CompartmentIdInSubtree: pulumi.BoolRef(auditProfileAnalyticCompartmentIdInSubtree),
    			GroupBies:              auditProfileAnalyticGroupBy,
    		}, 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 testAuditProfileAnalytic = Oci.DataSafe.GetAuditProfileAnalytic.Invoke(new()
        {
            CompartmentId = compartmentId,
            AccessLevel = auditProfileAnalyticAccessLevel,
            CompartmentIdInSubtree = auditProfileAnalyticCompartmentIdInSubtree,
            GroupBies = auditProfileAnalyticGroupBy,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DataSafe.DataSafeFunctions;
    import com.pulumi.oci.DataSafe.inputs.GetAuditProfileAnalyticArgs;
    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 testAuditProfileAnalytic = DataSafeFunctions.getAuditProfileAnalytic(GetAuditProfileAnalyticArgs.builder()
                .compartmentId(compartmentId)
                .accessLevel(auditProfileAnalyticAccessLevel)
                .compartmentIdInSubtree(auditProfileAnalyticCompartmentIdInSubtree)
                .groupBies(auditProfileAnalyticGroupBy)
                .build());
    
        }
    }
    
    variables:
      testAuditProfileAnalytic:
        fn::invoke:
          Function: oci:DataSafe:getAuditProfileAnalytic
          Arguments:
            compartmentId: ${compartmentId}
            accessLevel: ${auditProfileAnalyticAccessLevel}
            compartmentIdInSubtree: ${auditProfileAnalyticCompartmentIdInSubtree}
            groupBies: ${auditProfileAnalyticGroupBy}
    

    Using getAuditProfileAnalytic

    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 getAuditProfileAnalytic(args: GetAuditProfileAnalyticArgs, opts?: InvokeOptions): Promise<GetAuditProfileAnalyticResult>
    function getAuditProfileAnalyticOutput(args: GetAuditProfileAnalyticOutputArgs, opts?: InvokeOptions): Output<GetAuditProfileAnalyticResult>
    def get_audit_profile_analytic(access_level: Optional[str] = None,
                                   compartment_id: Optional[str] = None,
                                   compartment_id_in_subtree: Optional[bool] = None,
                                   group_bies: Optional[Sequence[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetAuditProfileAnalyticResult
    def get_audit_profile_analytic_output(access_level: Optional[pulumi.Input[str]] = None,
                                   compartment_id: Optional[pulumi.Input[str]] = None,
                                   compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                                   group_bies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetAuditProfileAnalyticResult]
    func GetAuditProfileAnalytic(ctx *Context, args *GetAuditProfileAnalyticArgs, opts ...InvokeOption) (*GetAuditProfileAnalyticResult, error)
    func GetAuditProfileAnalyticOutput(ctx *Context, args *GetAuditProfileAnalyticOutputArgs, opts ...InvokeOption) GetAuditProfileAnalyticResultOutput

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

    public static class GetAuditProfileAnalytic 
    {
        public static Task<GetAuditProfileAnalyticResult> InvokeAsync(GetAuditProfileAnalyticArgs args, InvokeOptions? opts = null)
        public static Output<GetAuditProfileAnalyticResult> Invoke(GetAuditProfileAnalyticInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuditProfileAnalyticResult> getAuditProfileAnalytic(GetAuditProfileAnalyticArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getAuditProfileAnalytic:getAuditProfileAnalytic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    AccessLevel string
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    CompartmentIdInSubtree bool
    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    GroupBies List<string>
    The group by parameter for summarize operation on audit.
    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    AccessLevel string
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    CompartmentIdInSubtree bool
    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    GroupBies []string
    The group by parameter for summarize operation on audit.
    compartmentId String
    A filter to return only resources that match the specified compartment OCID.
    accessLevel String
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    compartmentIdInSubtree Boolean
    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    groupBies List<String>
    The group by parameter for summarize operation on audit.
    compartmentId string
    A filter to return only resources that match the specified compartment OCID.
    accessLevel string
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    compartmentIdInSubtree boolean
    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    groupBies string[]
    The group by parameter for summarize operation on audit.
    compartment_id str
    A filter to return only resources that match the specified compartment OCID.
    access_level str
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    compartment_id_in_subtree bool
    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    group_bies Sequence[str]
    The group by parameter for summarize operation on audit.
    compartmentId String
    A filter to return only resources that match the specified compartment OCID.
    accessLevel String
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    compartmentIdInSubtree Boolean
    Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
    groupBies List<String>
    The group by parameter for summarize operation on audit.

    getAuditProfileAnalytic Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetAuditProfileAnalyticItem>
    Array of audit profile aggregration data.
    AccessLevel string
    CompartmentIdInSubtree bool
    GroupBies List<string>
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetAuditProfileAnalyticItem
    Array of audit profile aggregration data.
    AccessLevel string
    CompartmentIdInSubtree bool
    GroupBies []string
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetAuditProfileAnalyticItem>
    Array of audit profile aggregration data.
    accessLevel String
    compartmentIdInSubtree Boolean
    groupBies List<String>
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    items GetAuditProfileAnalyticItem[]
    Array of audit profile aggregration data.
    accessLevel string
    compartmentIdInSubtree boolean
    groupBies string[]
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[datasafe.GetAuditProfileAnalyticItem]
    Array of audit profile aggregration data.
    access_level str
    compartment_id_in_subtree bool
    group_bies Sequence[str]
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    Array of audit profile aggregration data.
    accessLevel String
    compartmentIdInSubtree Boolean
    groupBies List<String>

    Supporting Types

    GetAuditProfileAnalyticItem

    Count string
    Total count of aggregated metric.
    Dimensions List<GetAuditProfileAnalyticItemDimension>
    Details of aggregation dimensions used for summarizing audit profiles.
    Count string
    Total count of aggregated metric.
    Dimensions []GetAuditProfileAnalyticItemDimension
    Details of aggregation dimensions used for summarizing audit profiles.
    count String
    Total count of aggregated metric.
    dimensions List<GetAuditProfileAnalyticItemDimension>
    Details of aggregation dimensions used for summarizing audit profiles.
    count string
    Total count of aggregated metric.
    dimensions GetAuditProfileAnalyticItemDimension[]
    Details of aggregation dimensions used for summarizing audit profiles.
    count str
    Total count of aggregated metric.
    dimensions Sequence[datasafe.GetAuditProfileAnalyticItemDimension]
    Details of aggregation dimensions used for summarizing audit profiles.
    count String
    Total count of aggregated metric.
    dimensions List<Property Map>
    Details of aggregation dimensions used for summarizing audit profiles.

    GetAuditProfileAnalyticItemDimension

    IsPaidUsageEnabled bool
    Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    IsPaidUsageEnabled bool
    Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    isPaidUsageEnabled Boolean
    Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    isPaidUsageEnabled boolean
    Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    is_paid_usage_enabled bool
    Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.
    isPaidUsageEnabled Boolean
    Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, potentially incurring additional charges. The default value is inherited from the global settings. You can change at the global level or at the target level.

    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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi