1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getDiscoveryAnalytic
Oracle Cloud Infrastructure v2.15.0 published on Thursday, Oct 31, 2024 by Pulumi

oci.DataSafe.getDiscoveryAnalytic

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.15.0 published on Thursday, Oct 31, 2024 by Pulumi

    This data source provides details about a specific Discovery Analytic resource 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 testDiscoveryAnalytic = oci.DataSafe.getDiscoveryAnalytic({
        compartmentId: compartmentId,
        compartmentIdInSubtree: discoveryAnalyticCompartmentIdInSubtree,
        groupBy: discoveryAnalyticGroupBy,
        sensitiveDataModelId: testSensitiveDataModel.id,
        targetId: testTarget.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_discovery_analytic = oci.DataSafe.get_discovery_analytic(compartment_id=compartment_id,
        compartment_id_in_subtree=discovery_analytic_compartment_id_in_subtree,
        group_by=discovery_analytic_group_by,
        sensitive_data_model_id=test_sensitive_data_model["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.GetDiscoveryAnalytic(ctx, &datasafe.GetDiscoveryAnalyticArgs{
    			CompartmentId:          compartmentId,
    			CompartmentIdInSubtree: pulumi.BoolRef(discoveryAnalyticCompartmentIdInSubtree),
    			GroupBy:                pulumi.StringRef(discoveryAnalyticGroupBy),
    			SensitiveDataModelId:   pulumi.StringRef(testSensitiveDataModel.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 testDiscoveryAnalytic = Oci.DataSafe.GetDiscoveryAnalytic.Invoke(new()
        {
            CompartmentId = compartmentId,
            CompartmentIdInSubtree = discoveryAnalyticCompartmentIdInSubtree,
            GroupBy = discoveryAnalyticGroupBy,
            SensitiveDataModelId = testSensitiveDataModel.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.GetDiscoveryAnalyticArgs;
    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 testDiscoveryAnalytic = DataSafeFunctions.getDiscoveryAnalytic(GetDiscoveryAnalyticArgs.builder()
                .compartmentId(compartmentId)
                .compartmentIdInSubtree(discoveryAnalyticCompartmentIdInSubtree)
                .groupBy(discoveryAnalyticGroupBy)
                .sensitiveDataModelId(testSensitiveDataModel.id())
                .targetId(testTarget.id())
                .build());
    
        }
    }
    
    variables:
      testDiscoveryAnalytic:
        fn::invoke:
          Function: oci:DataSafe:getDiscoveryAnalytic
          Arguments:
            compartmentId: ${compartmentId}
            compartmentIdInSubtree: ${discoveryAnalyticCompartmentIdInSubtree}
            groupBy: ${discoveryAnalyticGroupBy}
            sensitiveDataModelId: ${testSensitiveDataModel.id}
            targetId: ${testTarget.id}
    

    Using getDiscoveryAnalytic

    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 getDiscoveryAnalytic(args: GetDiscoveryAnalyticArgs, opts?: InvokeOptions): Promise<GetDiscoveryAnalyticResult>
    function getDiscoveryAnalyticOutput(args: GetDiscoveryAnalyticOutputArgs, opts?: InvokeOptions): Output<GetDiscoveryAnalyticResult>
    def get_discovery_analytic(compartment_id: Optional[str] = None,
                               compartment_id_in_subtree: Optional[bool] = None,
                               group_by: Optional[str] = None,
                               sensitive_data_model_id: Optional[str] = None,
                               target_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetDiscoveryAnalyticResult
    def get_discovery_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,
                               sensitive_data_model_id: Optional[pulumi.Input[str]] = None,
                               target_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveryAnalyticResult]
    func GetDiscoveryAnalytic(ctx *Context, args *GetDiscoveryAnalyticArgs, opts ...InvokeOption) (*GetDiscoveryAnalyticResult, error)
    func GetDiscoveryAnalyticOutput(ctx *Context, args *GetDiscoveryAnalyticOutputArgs, opts ...InvokeOption) GetDiscoveryAnalyticResultOutput

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

    public static class GetDiscoveryAnalytic 
    {
        public static Task<GetDiscoveryAnalyticResult> InvokeAsync(GetDiscoveryAnalyticArgs args, InvokeOptions? opts = null)
        public static Output<GetDiscoveryAnalyticResult> Invoke(GetDiscoveryAnalyticInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDiscoveryAnalyticResult> getDiscoveryAnalytic(GetDiscoveryAnalyticArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getDiscoveryAnalytic:getDiscoveryAnalytic
      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.
    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.
    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.
    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.
    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.
    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.
    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.

    getDiscoveryAnalytic Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetDiscoveryAnalyticItem>
    An array of discovery analytics summary objects.
    CompartmentIdInSubtree bool
    GroupBy string
    SensitiveDataModelId string
    The OCID of the sensitive data model.
    TargetId string
    The OCID of the target database.
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetDiscoveryAnalyticItem
    An array of discovery analytics summary objects.
    CompartmentIdInSubtree bool
    GroupBy string
    SensitiveDataModelId string
    The OCID of the sensitive data model.
    TargetId string
    The OCID of the target database.
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetDiscoveryAnalyticItem>
    An array of discovery analytics summary objects.
    compartmentIdInSubtree Boolean
    groupBy String
    sensitiveDataModelId String
    The OCID of the sensitive data model.
    targetId String
    The OCID of the target database.
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    items GetDiscoveryAnalyticItem[]
    An array of discovery analytics summary objects.
    compartmentIdInSubtree boolean
    groupBy string
    sensitiveDataModelId string
    The OCID of the sensitive data model.
    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.GetDiscoveryAnalyticItem]
    An array of discovery analytics summary objects.
    compartment_id_in_subtree bool
    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
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    An array of discovery analytics summary objects.
    compartmentIdInSubtree Boolean
    groupBy String
    sensitiveDataModelId String
    The OCID of the sensitive data model.
    targetId String
    The OCID of the target database.

    Supporting Types

    GetDiscoveryAnalyticItem

    Count string
    The total count for the aggregation metric.
    Dimensions List<GetDiscoveryAnalyticItemDimension>
    The scope of analytics data.
    MetricName string
    The name of the aggregation metric.
    Count string
    The total count for the aggregation metric.
    Dimensions []GetDiscoveryAnalyticItemDimension
    The scope of analytics data.
    MetricName string
    The name of the aggregation metric.
    count String
    The total count for the aggregation metric.
    dimensions List<GetDiscoveryAnalyticItemDimension>
    The scope of analytics data.
    metricName String
    The name of the aggregation metric.
    count string
    The total count for the aggregation metric.
    dimensions GetDiscoveryAnalyticItemDimension[]
    The scope of analytics data.
    metricName string
    The name of the aggregation metric.
    count str
    The total count for the aggregation metric.
    dimensions Sequence[datasafe.GetDiscoveryAnalyticItemDimension]
    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.

    GetDiscoveryAnalyticItemDimension

    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.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.15.0 published on Thursday, Oct 31, 2024 by Pulumi