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

oci.DataSafe.getMaskingAnalytic

Explore with Pulumi AI

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

This data source provides details about a specific Masking Analytic resource 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 testMaskingAnalytic = oci.DataSafe.getMaskingAnalytic({
    compartmentId: compartmentId,
    compartmentIdInSubtree: maskingAnalyticCompartmentIdInSubtree,
    groupBy: maskingAnalyticGroupBy,
    maskingPolicyId: testMaskingPolicy.id,
    targetId: testTarget.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_masking_analytic = oci.DataSafe.get_masking_analytic(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"])
Copy
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.GetMaskingAnalytic(ctx, &datasafe.GetMaskingAnalyticArgs{
			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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testMaskingAnalytic = Oci.DataSafe.GetMaskingAnalytic.Invoke(new()
    {
        CompartmentId = compartmentId,
        CompartmentIdInSubtree = maskingAnalyticCompartmentIdInSubtree,
        GroupBy = maskingAnalyticGroupBy,
        MaskingPolicyId = testMaskingPolicy.Id,
        TargetId = testTarget.Id,
    });

});
Copy
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.GetMaskingAnalyticArgs;
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 testMaskingAnalytic = DataSafeFunctions.getMaskingAnalytic(GetMaskingAnalyticArgs.builder()
            .compartmentId(compartmentId)
            .compartmentIdInSubtree(maskingAnalyticCompartmentIdInSubtree)
            .groupBy(maskingAnalyticGroupBy)
            .maskingPolicyId(testMaskingPolicy.id())
            .targetId(testTarget.id())
            .build());

    }
}
Copy
variables:
  testMaskingAnalytic:
    fn::invoke:
      function: oci:DataSafe:getMaskingAnalytic
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${maskingAnalyticCompartmentIdInSubtree}
        groupBy: ${maskingAnalyticGroupBy}
        maskingPolicyId: ${testMaskingPolicy.id}
        targetId: ${testTarget.id}
Copy

Using getMaskingAnalytic

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 getMaskingAnalytic(args: GetMaskingAnalyticArgs, opts?: InvokeOptions): Promise<GetMaskingAnalyticResult>
function getMaskingAnalyticOutput(args: GetMaskingAnalyticOutputArgs, opts?: InvokeOptions): Output<GetMaskingAnalyticResult>
Copy
def get_masking_analytic(compartment_id: Optional[str] = None,
                         compartment_id_in_subtree: Optional[bool] = None,
                         group_by: Optional[str] = None,
                         masking_policy_id: Optional[str] = None,
                         target_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetMaskingAnalyticResult
def get_masking_analytic_output(compartment_id: Optional[pulumi.Input[str]] = None,
                         compartment_id_in_subtree: Optional[pulumi.Input[bool]] = 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[GetMaskingAnalyticResult]
Copy
func GetMaskingAnalytic(ctx *Context, args *GetMaskingAnalyticArgs, opts ...InvokeOption) (*GetMaskingAnalyticResult, error)
func GetMaskingAnalyticOutput(ctx *Context, args *GetMaskingAnalyticOutputArgs, opts ...InvokeOption) GetMaskingAnalyticResultOutput
Copy

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

public static class GetMaskingAnalytic 
{
    public static Task<GetMaskingAnalyticResult> InvokeAsync(GetMaskingAnalyticArgs args, InvokeOptions? opts = null)
    public static Output<GetMaskingAnalyticResult> Invoke(GetMaskingAnalyticInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMaskingAnalyticResult> getMaskingAnalytic(GetMaskingAnalyticArgs args, InvokeOptions options)
public static Output<GetMaskingAnalyticResult> getMaskingAnalytic(GetMaskingAnalyticArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DataSafe/getMaskingAnalytic:getMaskingAnalytic
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
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.
GroupBy string
Attribute by which the masking analytics data should be grouped.
MaskingPolicyId string
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 This property is required. string
A filter to return only resources that match the specified compartment OCID.
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.
GroupBy string
Attribute by which the masking analytics data should be grouped.
MaskingPolicyId string
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 This property is required. String
A filter to return only resources that match the specified compartment OCID.
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.
groupBy String
Attribute by which the masking analytics data should be grouped.
maskingPolicyId String
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 This property is required. string
A filter to return only resources that match the specified compartment OCID.
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.
groupBy string
Attribute by which the masking analytics data should be grouped.
maskingPolicyId string
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 This property is required. str
A filter to return only resources that match the specified compartment OCID.
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_by str
Attribute by which the masking analytics data should be grouped.
masking_policy_id str
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 This property is required. String
A filter to return only resources that match the specified compartment OCID.
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.
groupBy String
Attribute by which the masking analytics data should be grouped.
maskingPolicyId String
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.

getMaskingAnalytic Result

The following output properties are available:

CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
Items List<GetMaskingAnalyticItem>
An array of masking analytics summary objects.
CompartmentIdInSubtree bool
GroupBy string
MaskingPolicyId string
TargetId string
The OCID of the target database.
CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
Items []GetMaskingAnalyticItem
An array of masking analytics summary objects.
CompartmentIdInSubtree bool
GroupBy string
MaskingPolicyId string
TargetId string
The OCID of the target database.
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
items List<GetMaskingAnalyticItem>
An array of masking analytics summary objects.
compartmentIdInSubtree Boolean
groupBy String
maskingPolicyId String
targetId String
The OCID of the target database.
compartmentId string
id string
The provider-assigned unique ID for this managed resource.
items GetMaskingAnalyticItem[]
An array of masking analytics summary objects.
compartmentIdInSubtree boolean
groupBy string
maskingPolicyId string
targetId string
The OCID of the target database.
compartment_id str
id str
The provider-assigned unique ID for this managed resource.
items Sequence[datasafe.GetMaskingAnalyticItem]
An array of masking analytics summary objects.
compartment_id_in_subtree bool
group_by str
masking_policy_id str
target_id str
The OCID of the target database.
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
items List<Property Map>
An array of masking analytics summary objects.
compartmentIdInSubtree Boolean
groupBy String
maskingPolicyId String
targetId String
The OCID of the target database.

Supporting Types

GetMaskingAnalyticItem

Count This property is required. string
The total count for the aggregation metric.
Dimensions This property is required. List<GetMaskingAnalyticItemDimension>
The scope of analytics data.
MetricName This property is required. string
The name of the aggregation metric.
Count This property is required. string
The total count for the aggregation metric.
Dimensions This property is required. []GetMaskingAnalyticItemDimension
The scope of analytics data.
MetricName This property is required. string
The name of the aggregation metric.
count This property is required. String
The total count for the aggregation metric.
dimensions This property is required. List<GetMaskingAnalyticItemDimension>
The scope of analytics data.
metricName This property is required. String
The name of the aggregation metric.
count This property is required. string
The total count for the aggregation metric.
dimensions This property is required. GetMaskingAnalyticItemDimension[]
The scope of analytics data.
metricName This property is required. string
The name of the aggregation metric.
count This property is required. str
The total count for the aggregation metric.
dimensions This property is required. Sequence[datasafe.GetMaskingAnalyticItemDimension]
The scope of analytics data.
metric_name This property is required. str
The name of the aggregation metric.
count This property is required. String
The total count for the aggregation metric.
dimensions This property is required. List<Property Map>
The scope of analytics data.
metricName This property is required. String
The name of the aggregation metric.

GetMaskingAnalyticItemDimension

PolicyId This property is required. string
The OCID of the masking policy..
TargetId This property is required. string
A filter to return only items related to a specific target OCID.
PolicyId This property is required. string
The OCID of the masking policy..
TargetId This property is required. string
A filter to return only items related to a specific target OCID.
policyId This property is required. String
The OCID of the masking policy..
targetId This property is required. String
A filter to return only items related to a specific target OCID.
policyId This property is required. string
The OCID of the masking policy..
targetId This property is required. string
A filter to return only items related to a specific target OCID.
policy_id This property is required. str
The OCID of the masking policy..
target_id This property is required. str
A filter to return only items related to a specific target OCID.
policyId This property is required. String
The OCID of the masking policy..
targetId This property is required. String
A filter to return only items related to a specific target OCID.

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