oci.DataSafe.getAuditProfileAnalytic
Explore with Pulumi AI
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:
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Access
Level 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.
- Compartment
Id boolIn Subtree - 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 List<string> - The group by parameter for summarize operation on audit.
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Access
Level 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.
- Compartment
Id boolIn Subtree - 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 []string - The group by parameter for summarize operation on audit.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- access
Level 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.
- compartment
Id BooleanIn Subtree - 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 List<String> - The group by parameter for summarize operation on audit.
- compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- access
Level 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.
- compartment
Id booleanIn Subtree - 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 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_ boolin_ subtree - 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.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- access
Level 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.
- compartment
Id BooleanIn Subtree - 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 List<String> - The group by parameter for summarize operation on audit.
getAuditProfileAnalytic Result
The following output properties are available:
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Audit Profile Analytic Item> - Array of audit profile aggregration data.
- Access
Level string - Compartment
Id boolIn Subtree - Group
Bies List<string>
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Audit Profile Analytic Item - Array of audit profile aggregration data.
- Access
Level string - Compartment
Id boolIn Subtree - Group
Bies []string
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Audit Profile Analytic Item> - Array of audit profile aggregration data.
- access
Level String - compartment
Id BooleanIn Subtree - group
Bies List<String>
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Audit Profile Analytic Item[] - Array of audit profile aggregration data.
- access
Level string - compartment
Id booleanIn Subtree - group
Bies string[]
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[datasafe.
Get Audit Profile Analytic Item] - Array of audit profile aggregration data.
- access_
level str - compartment_
id_ boolin_ subtree - group_
bies Sequence[str]
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- Array of audit profile aggregration data.
- access
Level String - compartment
Id BooleanIn Subtree - group
Bies List<String>
Supporting Types
GetAuditProfileAnalyticItem
- Count string
- Total count of aggregated metric.
- Dimensions
List<Get
Audit Profile Analytic Item Dimension> - Details of aggregation dimensions used for summarizing audit profiles.
- Count string
- Total count of aggregated metric.
- Dimensions
[]Get
Audit Profile Analytic Item Dimension - Details of aggregation dimensions used for summarizing audit profiles.
- count String
- Total count of aggregated metric.
- dimensions
List<Get
Audit Profile Analytic Item Dimension> - Details of aggregation dimensions used for summarizing audit profiles.
- count string
- Total count of aggregated metric.
- dimensions
Get
Audit Profile Analytic Item Dimension[] - Details of aggregation dimensions used for summarizing audit profiles.
- count str
- Total count of aggregated metric.
- dimensions
Sequence[datasafe.
Get Audit Profile Analytic Item Dimension] - 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
- Is
Paid boolUsage Enabled - 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 boolUsage Enabled - 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 BooleanUsage Enabled - 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 booleanUsage Enabled - 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_ boolusage_ enabled - 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 BooleanUsage Enabled - 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.