Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getDiscoveryAnalytics

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.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testDiscoveryAnalytics = Oci.DataSafe.GetDiscoveryAnalytics.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        CompartmentIdInSubtree = @var.Discovery_analytic_compartment_id_in_subtree,
        GroupBy = @var.Discovery_analytic_group_by,
        SensitiveDataModelId = oci_data_safe_sensitive_data_model.Test_sensitive_data_model.Id,
        TargetId = oci_cloud_guard_target.Test_target.Id,
    });

});
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.GetDiscoveryAnalytics(ctx, &datasafe.GetDiscoveryAnalyticsArgs{
			CompartmentId:          _var.Compartment_id,
			CompartmentIdInSubtree: pulumi.BoolRef(_var.Discovery_analytic_compartment_id_in_subtree),
			GroupBy:                pulumi.StringRef(_var.Discovery_analytic_group_by),
			SensitiveDataModelId:   pulumi.StringRef(oci_data_safe_sensitive_data_model.Test_sensitive_data_model.Id),
			TargetId:               pulumi.StringRef(oci_cloud_guard_target.Test_target.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .compartmentIdInSubtree(var_.discovery_analytic_compartment_id_in_subtree())
            .groupBy(var_.discovery_analytic_group_by())
            .sensitiveDataModelId(oci_data_safe_sensitive_data_model.test_sensitive_data_model().id())
            .targetId(oci_cloud_guard_target.test_target().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_discovery_analytics = oci.DataSafe.get_discovery_analytics(compartment_id=var["compartment_id"],
    compartment_id_in_subtree=var["discovery_analytic_compartment_id_in_subtree"],
    group_by=var["discovery_analytic_group_by"],
    sensitive_data_model_id=oci_data_safe_sensitive_data_model["test_sensitive_data_model"]["id"],
    target_id=oci_cloud_guard_target["test_target"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testDiscoveryAnalytics = oci.DataSafe.getDiscoveryAnalytics({
    compartmentId: _var.compartment_id,
    compartmentIdInSubtree: _var.discovery_analytic_compartment_id_in_subtree,
    groupBy: _var.discovery_analytic_group_by,
    sensitiveDataModelId: oci_data_safe_sensitive_data_model.test_sensitive_data_model.id,
    targetId: oci_cloud_guard_target.test_target.id,
});
variables:
  testDiscoveryAnalytics:
    Fn::Invoke:
      Function: oci:DataSafe:getDiscoveryAnalytics
      Arguments:
        compartmentId: ${var.compartment_id}
        compartmentIdInSubtree: ${var.discovery_analytic_compartment_id_in_subtree}
        groupBy: ${var.discovery_analytic_group_by}
        sensitiveDataModelId: ${oci_data_safe_sensitive_data_model.test_sensitive_data_model.id}
        targetId: ${oci_cloud_guard_target.test_target.id}

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>
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,
                            sensitive_data_model_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,
                            sensitive_data_model_id: Optional[pulumi.Input[str]] = None,
                            target_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveryAnalyticsResult]
func GetDiscoveryAnalytics(ctx *Context, args *GetDiscoveryAnalyticsArgs, opts ...InvokeOption) (*GetDiscoveryAnalyticsResult, error)
func GetDiscoveryAnalyticsOutput(ctx *Context, args *GetDiscoveryAnalyticsOutputArgs, opts ...InvokeOption) GetDiscoveryAnalyticsResultOutput

> 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)
}
public static CompletableFuture<GetDiscoveryAnalyticsResult> getDiscoveryAnalytics(GetDiscoveryAnalyticsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:DataSafe/getDiscoveryAnalytics:getDiscoveryAnalytics
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId 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 List<GetDiscoveryAnalyticsFilter>
GroupBy string

Attribute by which the discovery analytics data should be grouped.

SensitiveDataModelId string

A filter to return only the resources that match the specified sensitive data model 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.

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 []GetDiscoveryAnalyticsFilter
GroupBy string

Attribute by which the discovery analytics data should be grouped.

SensitiveDataModelId string

A filter to return only the resources that match the specified sensitive data model 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.

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 List<GetDiscoveryAnalyticsFilter>
groupBy String

Attribute by which the discovery analytics data should be grouped.

sensitiveDataModelId String

A filter to return only the resources that match the specified sensitive data model 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.

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 GetDiscoveryAnalyticsFilter[]
groupBy string

Attribute by which the discovery analytics data should be grouped.

sensitiveDataModelId string

A filter to return only the resources that match the specified sensitive data model 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_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 GetDiscoveryAnalyticsFilter]
group_by str

Attribute by which the discovery analytics data should be grouped.

sensitive_data_model_id str

A filter to return only the resources that match the specified sensitive data model 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.

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 List<Property Map>
groupBy String

Attribute by which the discovery analytics data should be grouped.

sensitiveDataModelId String

A filter to return only the resources that match the specified sensitive data model 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
SensitiveDataModelId string

The OCID of the sensitive data model.

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
SensitiveDataModelId string

The OCID of the sensitive data model.

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
sensitiveDataModelId String

The OCID of the sensitive data model.

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
sensitiveDataModelId string

The OCID of the sensitive data model.

targetId string

The OCID of the target database.

compartment_id str
discovery_analytics_collections GetDiscoveryAnalyticsDiscoveryAnalyticsCollection]

The list of discovery_analytics_collection.

id str

The provider-assigned unique ID for this managed resource.

compartment_id_in_subtree bool
filters GetDiscoveryAnalyticsFilter]
group_by str
sensitive_data_model_id str

The OCID of the sensitive data model.

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
sensitiveDataModelId String

The OCID of the sensitive data model.

targetId String

The OCID of the target database.

Supporting Types

GetDiscoveryAnalyticsDiscoveryAnalyticsCollection

Items List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem>

An array of discovery analytics summary objects.

Items []GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem

An array of discovery analytics summary objects.

items List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem>

An array of discovery analytics summary objects.

items GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem[]

An array of discovery analytics summary objects.

items GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem]

An array of discovery analytics summary objects.

items List<Property Map>

An array of discovery analytics summary objects.

GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItem

Count string

The total count for the aggregation metric.

Dimensions List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension>

The scope of analytics data.

MetricName string

The name of the aggregation metric.

Count string

The total count for the aggregation metric.

Dimensions []GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension

The scope of analytics data.

MetricName string

The name of the aggregation metric.

count String

The total count for the aggregation metric.

dimensions List<GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension>

The scope of analytics data.

metricName String

The name of the aggregation metric.

count string

The total count for the aggregation metric.

dimensions GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension[]

The scope of analytics data.

metricName string

The name of the aggregation metric.

count str

The total count for the aggregation metric.

dimensions GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension]

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.

GetDiscoveryAnalyticsDiscoveryAnalyticsCollectionItemDimension

SensitiveDataModelId string

A filter to return only the resources that match the specified sensitive data model OCID.

TargetId string

A filter to return only items related to a specific target OCID.

SensitiveDataModelId string

A filter to return only the resources that match the specified sensitive data model OCID.

TargetId string

A filter to return only items related to a specific target OCID.

sensitiveDataModelId String

A filter to return only the resources that match the specified sensitive data model OCID.

targetId String

A filter to return only items related to a specific target OCID.

sensitiveDataModelId string

A filter to return only the resources that match the specified sensitive data model OCID.

targetId string

A filter to return only items related to a specific target OCID.

sensitive_data_model_id str

A filter to return only the resources that match the specified sensitive data model OCID.

target_id str

A filter to return only items related to a specific target OCID.

sensitiveDataModelId String

A filter to return only the resources that match the specified sensitive data model OCID.

targetId String

A filter to return only items related to a specific target OCID.

GetDiscoveryAnalyticsFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.