Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DataSafe.getMaskingAnalytics
Explore with Pulumi AI
This data source provides the list of Masking Analytics in Oracle Cloud Infrastructure Data Safe service.
Gets consolidated masking analytics data based on the specified query parameters. If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour is equivalent to accessLevel “ACCESSIBLE” by default.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMaskingAnalytics = oci.DataSafe.getMaskingAnalytics({
    compartmentId: compartmentId,
    compartmentIdInSubtree: maskingAnalyticCompartmentIdInSubtree,
    groupBy: maskingAnalyticGroupBy,
    maskingPolicyId: testMaskingPolicy.id,
    targetId: testTarget.id,
});
import pulumi
import pulumi_oci as oci
test_masking_analytics = oci.DataSafe.get_masking_analytics(compartment_id=compartment_id,
    compartment_id_in_subtree=masking_analytic_compartment_id_in_subtree,
    group_by=masking_analytic_group_by,
    masking_policy_id=test_masking_policy["id"],
    target_id=test_target["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/datasafe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasafe.GetMaskingAnalytics(ctx, &datasafe.GetMaskingAnalyticsArgs{
			CompartmentId:          compartmentId,
			CompartmentIdInSubtree: pulumi.BoolRef(maskingAnalyticCompartmentIdInSubtree),
			GroupBy:                pulumi.StringRef(maskingAnalyticGroupBy),
			MaskingPolicyId:        pulumi.StringRef(testMaskingPolicy.Id),
			TargetId:               pulumi.StringRef(testTarget.Id),
		}, 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 testMaskingAnalytics = Oci.DataSafe.GetMaskingAnalytics.Invoke(new()
    {
        CompartmentId = compartmentId,
        CompartmentIdInSubtree = maskingAnalyticCompartmentIdInSubtree,
        GroupBy = maskingAnalyticGroupBy,
        MaskingPolicyId = testMaskingPolicy.Id,
        TargetId = testTarget.Id,
    });
});
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.GetMaskingAnalyticsArgs;
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 testMaskingAnalytics = DataSafeFunctions.getMaskingAnalytics(GetMaskingAnalyticsArgs.builder()
            .compartmentId(compartmentId)
            .compartmentIdInSubtree(maskingAnalyticCompartmentIdInSubtree)
            .groupBy(maskingAnalyticGroupBy)
            .maskingPolicyId(testMaskingPolicy.id())
            .targetId(testTarget.id())
            .build());
    }
}
variables:
  testMaskingAnalytics:
    fn::invoke:
      function: oci:DataSafe:getMaskingAnalytics
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${maskingAnalyticCompartmentIdInSubtree}
        groupBy: ${maskingAnalyticGroupBy}
        maskingPolicyId: ${testMaskingPolicy.id}
        targetId: ${testTarget.id}
Using getMaskingAnalytics
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 getMaskingAnalytics(args: GetMaskingAnalyticsArgs, opts?: InvokeOptions): Promise<GetMaskingAnalyticsResult>
function getMaskingAnalyticsOutput(args: GetMaskingAnalyticsOutputArgs, opts?: InvokeOptions): Output<GetMaskingAnalyticsResult>def get_masking_analytics(compartment_id: Optional[str] = None,
                          compartment_id_in_subtree: Optional[bool] = None,
                          filters: Optional[Sequence[GetMaskingAnalyticsFilter]] = None,
                          group_by: Optional[str] = None,
                          masking_policy_id: Optional[str] = None,
                          target_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetMaskingAnalyticsResult
def get_masking_analytics_output(compartment_id: Optional[pulumi.Input[str]] = None,
                          compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                          filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetMaskingAnalyticsFilterArgs]]]] = None,
                          group_by: Optional[pulumi.Input[str]] = None,
                          masking_policy_id: Optional[pulumi.Input[str]] = None,
                          target_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetMaskingAnalyticsResult]func GetMaskingAnalytics(ctx *Context, args *GetMaskingAnalyticsArgs, opts ...InvokeOption) (*GetMaskingAnalyticsResult, error)
func GetMaskingAnalyticsOutput(ctx *Context, args *GetMaskingAnalyticsOutputArgs, opts ...InvokeOption) GetMaskingAnalyticsResultOutput> Note: This function is named GetMaskingAnalytics in the Go SDK.
public static class GetMaskingAnalytics 
{
    public static Task<GetMaskingAnalyticsResult> InvokeAsync(GetMaskingAnalyticsArgs args, InvokeOptions? opts = null)
    public static Output<GetMaskingAnalyticsResult> Invoke(GetMaskingAnalyticsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMaskingAnalyticsResult> getMaskingAnalytics(GetMaskingAnalyticsArgs args, InvokeOptions options)
public static Output<GetMaskingAnalyticsResult> getMaskingAnalytics(GetMaskingAnalyticsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getMaskingAnalytics:getMaskingAnalytics
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- A filter to return only resources that match the specified compartment OCID.
- CompartmentId 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.
- Filters
List<GetMasking Analytics Filter> 
- GroupBy string
- Attribute by which the masking analytics data should be grouped.
- MaskingPolicy stringId 
- A filter to return only the resources that match the specified masking policy OCID.
- TargetId string
- A filter to return only items related to a specific target OCID.
- CompartmentId string
- A filter to return only resources that match the specified compartment OCID.
- CompartmentId 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.
- Filters
[]GetMasking Analytics Filter 
- GroupBy string
- Attribute by which the masking analytics data should be grouped.
- MaskingPolicy stringId 
- A filter to return only the resources that match the specified masking policy OCID.
- TargetId string
- A filter to return only items related to a specific target OCID.
- compartmentId String
- A filter to return only resources that match the specified compartment OCID.
- compartmentId 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.
- filters
List<GetMasking Analytics Filter> 
- groupBy String
- Attribute by which the masking analytics data should be grouped.
- maskingPolicy StringId 
- A filter to return only the resources that match the specified masking policy OCID.
- targetId String
- A filter to return only items related to a specific target OCID.
- compartmentId string
- A filter to return only resources that match the specified compartment OCID.
- compartmentId 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.
- filters
GetMasking Analytics Filter[] 
- groupBy string
- Attribute by which the masking analytics data should be grouped.
- maskingPolicy stringId 
- A filter to return only the resources that match the specified masking policy OCID.
- targetId string
- A filter to return only items related to a specific target OCID.
- compartment_id str
- A filter to return only resources that match the specified compartment OCID.
- 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.
- filters
Sequence[GetMasking Analytics Filter] 
- group_by str
- Attribute by which the masking analytics data should be grouped.
- masking_policy_ strid 
- A filter to return only the resources that match the specified masking policy OCID.
- target_id str
- A filter to return only items related to a specific target OCID.
- compartmentId String
- A filter to return only resources that match the specified compartment OCID.
- compartmentId 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.
- filters List<Property Map>
- groupBy String
- Attribute by which the masking analytics data should be grouped.
- maskingPolicy StringId 
- A filter to return only the resources that match the specified masking policy OCID.
- targetId String
- A filter to return only items related to a specific target OCID.
getMaskingAnalytics Result
The following output properties are available:
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- MaskingAnalytics List<GetCollections Masking Analytics Masking Analytics Collection> 
- The list of masking_analytics_collection.
- CompartmentId boolIn Subtree 
- Filters
List<GetMasking Analytics Filter> 
- GroupBy string
- MaskingPolicy stringId 
- TargetId string
- The OCID of the target database.
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- MaskingAnalytics []GetCollections Masking Analytics Masking Analytics Collection 
- The list of masking_analytics_collection.
- CompartmentId boolIn Subtree 
- Filters
[]GetMasking Analytics Filter 
- GroupBy string
- MaskingPolicy stringId 
- TargetId string
- The OCID of the target database.
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- maskingAnalytics List<GetCollections Masking Analytics Masking Analytics Collection> 
- The list of masking_analytics_collection.
- compartmentId BooleanIn Subtree 
- filters
List<GetMasking Analytics Filter> 
- groupBy String
- maskingPolicy StringId 
- targetId String
- The OCID of the target database.
- compartmentId string
- id string
- The provider-assigned unique ID for this managed resource.
- maskingAnalytics GetCollections Masking Analytics Masking Analytics Collection[] 
- The list of masking_analytics_collection.
- compartmentId booleanIn Subtree 
- filters
GetMasking Analytics Filter[] 
- groupBy string
- maskingPolicy stringId 
- targetId string
- The OCID of the target database.
- compartment_id str
- id str
- The provider-assigned unique ID for this managed resource.
- masking_analytics_ Sequence[Getcollections Masking Analytics Masking Analytics Collection] 
- The list of masking_analytics_collection.
- compartment_id_ boolin_ subtree 
- filters
Sequence[GetMasking Analytics Filter] 
- group_by str
- masking_policy_ strid 
- target_id str
- The OCID of the target database.
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- maskingAnalytics List<Property Map>Collections 
- The list of masking_analytics_collection.
- compartmentId BooleanIn Subtree 
- filters List<Property Map>
- groupBy String
- maskingPolicy StringId 
- targetId String
- The OCID of the target database.
Supporting Types
GetMaskingAnalyticsFilter   
GetMaskingAnalyticsMaskingAnalyticsCollection     
- Items
List<GetMasking Analytics Masking Analytics Collection Item> 
- An array of masking analytics summary objects.
- Items
[]GetMasking Analytics Masking Analytics Collection Item 
- An array of masking analytics summary objects.
- items
List<GetMasking Analytics Masking Analytics Collection Item> 
- An array of masking analytics summary objects.
- items
GetMasking Analytics Masking Analytics Collection Item[] 
- An array of masking analytics summary objects.
- items
Sequence[GetMasking Analytics Masking Analytics Collection Item] 
- An array of masking analytics summary objects.
- items List<Property Map>
- An array of masking analytics summary objects.
GetMaskingAnalyticsMaskingAnalyticsCollectionItem      
- Count string
- The total count for the aggregation metric.
- Dimensions
List<GetMasking Analytics Masking Analytics Collection Item Dimension> 
- The scope of analytics data.
- MetricName string
- The name of the aggregation metric.
- Count string
- The total count for the aggregation metric.
- Dimensions
[]GetMasking Analytics Masking Analytics Collection Item Dimension 
- The scope of analytics data.
- MetricName string
- The name of the aggregation metric.
- count String
- The total count for the aggregation metric.
- dimensions
List<GetMasking Analytics Masking Analytics Collection Item Dimension> 
- The scope of analytics data.
- metricName String
- The name of the aggregation metric.
- count string
- The total count for the aggregation metric.
- dimensions
GetMasking Analytics Masking Analytics Collection Item Dimension[] 
- The scope of analytics data.
- metricName string
- The name of the aggregation metric.
- count str
- The total count for the aggregation metric.
- dimensions
Sequence[GetMasking Analytics Masking Analytics Collection Item Dimension] 
- The scope of analytics data.
- metric_name str
- The name of the aggregation metric.
- count String
- The total count for the aggregation metric.
- dimensions List<Property Map>
- The scope of analytics data.
- metricName String
- The name of the aggregation metric.
GetMaskingAnalyticsMaskingAnalyticsCollectionItemDimension       
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.