1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getDiscoveryAnalytics
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.DataSafe.getDiscoveryAnalytics

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

This data source provides the list of Discovery Analytics in Oracle Cloud Infrastructure Data Safe service.

Gets consolidated discovery 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 testDiscoveryAnalytics = oci.DataSafe.getDiscoveryAnalytics({
    compartmentId: compartmentId,
    compartmentIdInSubtree: discoveryAnalyticCompartmentIdInSubtree,
    groupBy: discoveryAnalyticGroupBy,
    isCommon: discoveryAnalyticIsCommon,
    sensitiveDataModelId: testSensitiveDataModel.id,
    sensitiveTypeId: testSensitiveType.id,
    targetId: testTarget.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_discovery_analytics = oci.DataSafe.get_discovery_analytics(compartment_id=compartment_id,
    compartment_id_in_subtree=discovery_analytic_compartment_id_in_subtree,
    group_by=discovery_analytic_group_by,
    is_common=discovery_analytic_is_common,
    sensitive_data_model_id=test_sensitive_data_model["id"],
    sensitive_type_id=test_sensitive_type["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.GetDiscoveryAnalytics(ctx, &datasafe.GetDiscoveryAnalyticsArgs{
			CompartmentId:          compartmentId,
			CompartmentIdInSubtree: pulumi.BoolRef(discoveryAnalyticCompartmentIdInSubtree),
			GroupBy:                pulumi.StringRef(discoveryAnalyticGroupBy),
			IsCommon:               pulumi.BoolRef(discoveryAnalyticIsCommon),
			SensitiveDataModelId:   pulumi.StringRef(testSensitiveDataModel.Id),
			SensitiveTypeId:        pulumi.StringRef(testSensitiveType.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 testDiscoveryAnalytics = Oci.DataSafe.GetDiscoveryAnalytics.Invoke(new()
    {
        CompartmentId = compartmentId,
        CompartmentIdInSubtree = discoveryAnalyticCompartmentIdInSubtree,
        GroupBy = discoveryAnalyticGroupBy,
        IsCommon = discoveryAnalyticIsCommon,
        SensitiveDataModelId = testSensitiveDataModel.Id,
        SensitiveTypeId = testSensitiveType.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.GetDiscoveryAnalyticsArgs;
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 testDiscoveryAnalytics = DataSafeFunctions.getDiscoveryAnalytics(GetDiscoveryAnalyticsArgs.builder()
            .compartmentId(compartmentId)
            .compartmentIdInSubtree(discoveryAnalyticCompartmentIdInSubtree)
            .groupBy(discoveryAnalyticGroupBy)
            .isCommon(discoveryAnalyticIsCommon)
            .sensitiveDataModelId(testSensitiveDataModel.id())
            .sensitiveTypeId(testSensitiveType.id())
            .targetId(testTarget.id())
            .build());

    }
}
Copy
variables:
  testDiscoveryAnalytics:
    fn::invoke:
      function: oci:DataSafe:getDiscoveryAnalytics
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${discoveryAnalyticCompartmentIdInSubtree}
        groupBy: ${discoveryAnalyticGroupBy}
        isCommon: ${discoveryAnalyticIsCommon}
        sensitiveDataModelId: ${testSensitiveDataModel.id}
        sensitiveTypeId: ${testSensitiveType.id}
        targetId: ${testTarget.id}
Copy

Using getDiscoveryAnalytics

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 getDiscoveryAnalytics(args: GetDiscoveryAnalyticsArgs, opts?: InvokeOptions): Promise<GetDiscoveryAnalyticsResult>
function getDiscoveryAnalyticsOutput(args: GetDiscoveryAnalyticsOutputArgs, opts?: InvokeOptions): Output<GetDiscoveryAnalyticsResult>
Copy
def get_discovery_analytics(compartment_id: Optional[str] = None,
                            compartment_id_in_subtree: Optional[bool] = None,
                            filters: Optional[Sequence[_datasafe.GetDiscoveryAnalyticsFilter]] = None,
                            group_by: Optional[str] = None,
                            is_common: Optional[bool] = None,
                            sensitive_data_model_id: Optional[str] = None,
                            sensitive_type_id: Optional[str] = None,
                            target_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetDiscoveryAnalyticsResult
def get_discovery_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[_datasafe.GetDiscoveryAnalyticsFilterArgs]]]] = None,
                            group_by: Optional[pulumi.Input[str]] = None,
                            is_common: Optional[pulumi.Input[bool]] = None,
                            sensitive_data_model_id: Optional[pulumi.Input[str]] = None,
                            sensitive_type_id: Optional[pulumi.Input[str]] = None,
                            target_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveryAnalyticsResult]
Copy
func GetDiscoveryAnalytics(ctx *Context, args *GetDiscoveryAnalyticsArgs, opts ...InvokeOption) (*GetDiscoveryAnalyticsResult, error)
func GetDiscoveryAnalyticsOutput(ctx *Context, args *GetDiscoveryAnalyticsOutputArgs, opts ...InvokeOption) GetDiscoveryAnalyticsResultOutput
Copy

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

public static class GetDiscoveryAnalytics 
{
    public static Task<GetDiscoveryAnalyticsResult> InvokeAsync(GetDiscoveryAnalyticsArgs args, InvokeOptions? opts = null)
    public static Output<GetDiscoveryAnalyticsResult> Invoke(GetDiscoveryAnalyticsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDiscoveryAnalyticsResult> getDiscoveryAnalytics(GetDiscoveryAnalyticsArgs args, InvokeOptions options)
public static Output<GetDiscoveryAnalyticsResult> getDiscoveryAnalytics(GetDiscoveryAnalyticsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DataSafe/getDiscoveryAnalytics:getDiscoveryAnalytics
  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.
Filters Changes to this property will trigger replacement. List<GetDiscoveryAnalyticsFilter>
GroupBy string
Attribute by which the discovery analytics data should be grouped.
IsCommon bool
A filter to return only the common sensitive type resources. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
SensitiveDataModelId string
A filter to return only the resources that match the specified sensitive data model OCID.
SensitiveTypeId string
A filter to return only items related to a specific sensitive type 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.
Filters Changes to this property will trigger replacement. []GetDiscoveryAnalyticsFilter
GroupBy string
Attribute by which the discovery analytics data should be grouped.
IsCommon bool
A filter to return only the common sensitive type resources. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
SensitiveDataModelId string
A filter to return only the resources that match the specified sensitive data model OCID.
SensitiveTypeId string
A filter to return only items related to a specific sensitive type 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.
filters Changes to this property will trigger replacement. List<GetDiscoveryAnalyticsFilter>
groupBy String
Attribute by which the discovery analytics data should be grouped.
isCommon Boolean
A filter to return only the common sensitive type resources. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
sensitiveDataModelId String
A filter to return only the resources that match the specified sensitive data model OCID.
sensitiveTypeId String
A filter to return only items related to a specific sensitive type 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.
filters Changes to this property will trigger replacement. GetDiscoveryAnalyticsFilter[]
groupBy string
Attribute by which the discovery analytics data should be grouped.
isCommon boolean
A filter to return only the common sensitive type resources. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
sensitiveDataModelId string
A filter to return only the resources that match the specified sensitive data model OCID.
sensitiveTypeId string
A filter to return only items related to a specific sensitive type 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.
filters Changes to this property will trigger replacement. Sequence[datasafe.GetDiscoveryAnalyticsFilter]
group_by str
Attribute by which the discovery analytics data should be grouped.
is_common bool
A filter to return only the common sensitive type resources. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
sensitive_data_model_id str
A filter to return only the resources that match the specified sensitive data model OCID.
sensitive_type_id str
A filter to return only items related to a specific sensitive type 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.
filters Changes to this property will trigger replacement. List<Property Map>
groupBy String
Attribute by which the discovery analytics data should be grouped.
isCommon Boolean
A filter to return only the common sensitive type resources. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
sensitiveDataModelId String
A filter to return only the resources that match the specified sensitive data model OCID.
sensitiveTypeId String
A filter to return only items related to a specific sensitive type OCID.
targetId String
A filter to return only items related to a specific target OCID.

getDiscoveryAnalytics Result

The following output properties are available:

CompartmentId string
DiscoveryAnalyticsCollections List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollection>
The list of discovery_analytics_collection.
Id string
The provider-assigned unique ID for this managed resource.
CompartmentIdInSubtree bool
Filters List<GetDiscoveryAnalyticsFilter>
GroupBy string
IsCommon bool
SensitiveDataModelId string
The OCID of the sensitive data model.
SensitiveTypeId string
The OCID of the sensitive type.
TargetId string
The OCID of the target database.
CompartmentId string
DiscoveryAnalyticsCollections []GetDiscoveryAnalyticsDiscoveryAnalyticsCollection
The list of discovery_analytics_collection.
Id string
The provider-assigned unique ID for this managed resource.
CompartmentIdInSubtree bool
Filters []GetDiscoveryAnalyticsFilter
GroupBy string
IsCommon bool
SensitiveDataModelId string
The OCID of the sensitive data model.
SensitiveTypeId string
The OCID of the sensitive type.
TargetId string
The OCID of the target database.
compartmentId String
discoveryAnalyticsCollections List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollection>
The list of discovery_analytics_collection.
id String
The provider-assigned unique ID for this managed resource.
compartmentIdInSubtree Boolean
filters List<GetDiscoveryAnalyticsFilter>
groupBy String
isCommon Boolean
sensitiveDataModelId String
The OCID of the sensitive data model.
sensitiveTypeId String
The OCID of the sensitive type.
targetId String
The OCID of the target database.
compartmentId string
discoveryAnalyticsCollections GetDiscoveryAnalyticsDiscoveryAnalyticsCollection[]
The list of discovery_analytics_collection.
id string
The provider-assigned unique ID for this managed resource.
compartmentIdInSubtree boolean
filters GetDiscoveryAnalyticsFilter[]
groupBy string
isCommon boolean
sensitiveDataModelId string
The OCID of the sensitive data model.
sensitiveTypeId string
The OCID of the sensitive type.
targetId string
The OCID of the target database.
compartment_id str
discovery_analytics_collections Sequence[datasafe.GetDiscoveryAnalyticsDiscoveryAnalyticsCollection]
The list of discovery_analytics_collection.
id str
The provider-assigned unique ID for this managed resource.
compartment_id_in_subtree bool
filters Sequence[datasafe.GetDiscoveryAnalyticsFilter]
group_by str
is_common bool
sensitive_data_model_id str
The OCID of the sensitive data model.
sensitive_type_id str
The OCID of the sensitive type.
target_id str
The OCID of the target database.
compartmentId String
discoveryAnalyticsCollections List<Property Map>
The list of discovery_analytics_collection.
id String
The provider-assigned unique ID for this managed resource.
compartmentIdInSubtree Boolean
filters List<Property Map>
groupBy String
isCommon Boolean
sensitiveDataModelId String
The OCID of the sensitive data model.
sensitiveTypeId String
The OCID of the sensitive type.
targetId String
The OCID of the target database.

Supporting Types

GetDiscoveryAnalyticsDiscoveryAnalyticsCollection

Items This property is required. List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem>
An array of discovery analytics summary objects.
Items This property is required. []GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem
An array of discovery analytics summary objects.
items This property is required. List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem>
An array of discovery analytics summary objects.
items This property is required. GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem[]
An array of discovery analytics summary objects.
items This property is required. Sequence[datasafe.GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem]
An array of discovery analytics summary objects.
items This property is required. List<Property Map>
An array of discovery analytics summary objects.

GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem

Count This property is required. string
The total count for the aggregation metric.
Dimensions This property is required. List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension>
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. []GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension
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<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension>
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. GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension[]
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.GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension]
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.

GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension

SensitiveDataModelId This property is required. string
A filter to return only the resources that match the specified sensitive data model OCID.
SensitiveTypeId This property is required. string
A filter to return only items related to a specific sensitive type OCID.
TargetId This property is required. string
A filter to return only items related to a specific target OCID.
SensitiveDataModelId This property is required. string
A filter to return only the resources that match the specified sensitive data model OCID.
SensitiveTypeId This property is required. string
A filter to return only items related to a specific sensitive type OCID.
TargetId This property is required. string
A filter to return only items related to a specific target OCID.
sensitiveDataModelId This property is required. String
A filter to return only the resources that match the specified sensitive data model OCID.
sensitiveTypeId This property is required. String
A filter to return only items related to a specific sensitive type OCID.
targetId This property is required. String
A filter to return only items related to a specific target OCID.
sensitiveDataModelId This property is required. string
A filter to return only the resources that match the specified sensitive data model OCID.
sensitiveTypeId This property is required. string
A filter to return only items related to a specific sensitive type OCID.
targetId This property is required. string
A filter to return only items related to a specific target OCID.
sensitive_data_model_id This property is required. str
A filter to return only the resources that match the specified sensitive data model OCID.
sensitive_type_id This property is required. str
A filter to return only items related to a specific sensitive type OCID.
target_id This property is required. str
A filter to return only items related to a specific target OCID.
sensitiveDataModelId This property is required. String
A filter to return only the resources that match the specified sensitive data model OCID.
sensitiveTypeId This property is required. String
A filter to return only items related to a specific sensitive type OCID.
targetId This property is required. String
A filter to return only items related to a specific target OCID.

GetDiscoveryAnalyticsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. 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.
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi