1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getUserAssessmentProfileAnalytics
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DataSafe.getUserAssessmentProfileAnalytics

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

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

    Gets a list of aggregated user profile details in the specified compartment. This provides information about the overall profiles available. For example, the user profile details include how many users have the profile assigned and do how many use password verification function. This data is especially useful content for dashboards or to support analytics.

    When you perform the ListProfileAnalytics operation, if the parameter compartmentIdInSubtree is set to “true,” and if the parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the root compartment and the requestor does not have access to at least one subcompartment of the compartment specified by compartmentId, then “Not Authorized” is returned.

    The parameter compartmentIdInSubtree applies when you perform ListProfileAnalytics on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned.

    To use ListProfileAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment, set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testUserAssessmentProfileAnalytics = oci.DataSafe.getUserAssessmentProfileAnalytics({
        compartmentId: compartmentId,
        userAssessmentId: testUserAssessment.id,
        accessLevel: userAssessmentProfileAnalyticAccessLevel,
        compartmentIdInSubtree: userAssessmentProfileAnalyticCompartmentIdInSubtree,
        profileName: testProfile.name,
        targetId: testTarget.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_user_assessment_profile_analytics = oci.DataSafe.get_user_assessment_profile_analytics(compartment_id=compartment_id,
        user_assessment_id=test_user_assessment["id"],
        access_level=user_assessment_profile_analytic_access_level,
        compartment_id_in_subtree=user_assessment_profile_analytic_compartment_id_in_subtree,
        profile_name=test_profile["name"],
        target_id=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.GetUserAssessmentProfileAnalytics(ctx, &datasafe.GetUserAssessmentProfileAnalyticsArgs{
    			CompartmentId:          compartmentId,
    			UserAssessmentId:       testUserAssessment.Id,
    			AccessLevel:            pulumi.StringRef(userAssessmentProfileAnalyticAccessLevel),
    			CompartmentIdInSubtree: pulumi.BoolRef(userAssessmentProfileAnalyticCompartmentIdInSubtree),
    			ProfileName:            pulumi.StringRef(testProfile.Name),
    			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 testUserAssessmentProfileAnalytics = Oci.DataSafe.GetUserAssessmentProfileAnalytics.Invoke(new()
        {
            CompartmentId = compartmentId,
            UserAssessmentId = testUserAssessment.Id,
            AccessLevel = userAssessmentProfileAnalyticAccessLevel,
            CompartmentIdInSubtree = userAssessmentProfileAnalyticCompartmentIdInSubtree,
            ProfileName = testProfile.Name,
            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.GetUserAssessmentProfileAnalyticsArgs;
    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 testUserAssessmentProfileAnalytics = DataSafeFunctions.getUserAssessmentProfileAnalytics(GetUserAssessmentProfileAnalyticsArgs.builder()
                .compartmentId(compartmentId)
                .userAssessmentId(testUserAssessment.id())
                .accessLevel(userAssessmentProfileAnalyticAccessLevel)
                .compartmentIdInSubtree(userAssessmentProfileAnalyticCompartmentIdInSubtree)
                .profileName(testProfile.name())
                .targetId(testTarget.id())
                .build());
    
        }
    }
    
    variables:
      testUserAssessmentProfileAnalytics:
        fn::invoke:
          Function: oci:DataSafe:getUserAssessmentProfileAnalytics
          Arguments:
            compartmentId: ${compartmentId}
            userAssessmentId: ${testUserAssessment.id}
            accessLevel: ${userAssessmentProfileAnalyticAccessLevel}
            compartmentIdInSubtree: ${userAssessmentProfileAnalyticCompartmentIdInSubtree}
            profileName: ${testProfile.name}
            targetId: ${testTarget.id}
    

    Using getUserAssessmentProfileAnalytics

    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 getUserAssessmentProfileAnalytics(args: GetUserAssessmentProfileAnalyticsArgs, opts?: InvokeOptions): Promise<GetUserAssessmentProfileAnalyticsResult>
    function getUserAssessmentProfileAnalyticsOutput(args: GetUserAssessmentProfileAnalyticsOutputArgs, opts?: InvokeOptions): Output<GetUserAssessmentProfileAnalyticsResult>
    def get_user_assessment_profile_analytics(access_level: Optional[str] = None,
                                              compartment_id: Optional[str] = None,
                                              compartment_id_in_subtree: Optional[bool] = None,
                                              filters: Optional[Sequence[_datasafe.GetUserAssessmentProfileAnalyticsFilter]] = None,
                                              profile_name: Optional[str] = None,
                                              target_id: Optional[str] = None,
                                              user_assessment_id: Optional[str] = None,
                                              opts: Optional[InvokeOptions] = None) -> GetUserAssessmentProfileAnalyticsResult
    def get_user_assessment_profile_analytics_output(access_level: Optional[pulumi.Input[str]] = None,
                                              compartment_id: Optional[pulumi.Input[str]] = None,
                                              compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datasafe.GetUserAssessmentProfileAnalyticsFilterArgs]]]] = None,
                                              profile_name: Optional[pulumi.Input[str]] = None,
                                              target_id: Optional[pulumi.Input[str]] = None,
                                              user_assessment_id: Optional[pulumi.Input[str]] = None,
                                              opts: Optional[InvokeOptions] = None) -> Output[GetUserAssessmentProfileAnalyticsResult]
    func GetUserAssessmentProfileAnalytics(ctx *Context, args *GetUserAssessmentProfileAnalyticsArgs, opts ...InvokeOption) (*GetUserAssessmentProfileAnalyticsResult, error)
    func GetUserAssessmentProfileAnalyticsOutput(ctx *Context, args *GetUserAssessmentProfileAnalyticsOutputArgs, opts ...InvokeOption) GetUserAssessmentProfileAnalyticsResultOutput

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

    public static class GetUserAssessmentProfileAnalytics 
    {
        public static Task<GetUserAssessmentProfileAnalyticsResult> InvokeAsync(GetUserAssessmentProfileAnalyticsArgs args, InvokeOptions? opts = null)
        public static Output<GetUserAssessmentProfileAnalyticsResult> Invoke(GetUserAssessmentProfileAnalyticsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserAssessmentProfileAnalyticsResult> getUserAssessmentProfileAnalytics(GetUserAssessmentProfileAnalyticsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getUserAssessmentProfileAnalytics:getUserAssessmentProfileAnalytics
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    UserAssessmentId string
    The OCID of the user assessment.
    AccessLevel string
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    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<GetUserAssessmentProfileAnalyticsFilter>
    ProfileName string
    A filter to return only items that match the specified profile name.
    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.
    UserAssessmentId string
    The OCID of the user assessment.
    AccessLevel string
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    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 []GetUserAssessmentProfileAnalyticsFilter
    ProfileName string
    A filter to return only items that match the specified profile name.
    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.
    userAssessmentId String
    The OCID of the user assessment.
    accessLevel String
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    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<GetUserAssessmentProfileAnalyticsFilter>
    profileName String
    A filter to return only items that match the specified profile name.
    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.
    userAssessmentId string
    The OCID of the user assessment.
    accessLevel string
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    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 GetUserAssessmentProfileAnalyticsFilter[]
    profileName string
    A filter to return only items that match the specified profile name.
    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.
    user_assessment_id str
    The OCID of the user assessment.
    access_level str
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    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 Sequence[datasafe.GetUserAssessmentProfileAnalyticsFilter]
    profile_name str
    A filter to return only items that match the specified profile name.
    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.
    userAssessmentId String
    The OCID of the user assessment.
    accessLevel String
    Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
    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>
    profileName String
    A filter to return only items that match the specified profile name.
    targetId String
    A filter to return only items related to a specific target OCID.

    getUserAssessmentProfileAnalytics Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    ProfileAggregations []GetUserAssessmentProfileAnalyticsProfileAggregation
    The list of profile_aggregations.
    UserAssessmentId string
    AccessLevel string
    CompartmentIdInSubtree bool
    Filters []GetUserAssessmentProfileAnalyticsFilter
    ProfileName string
    TargetId string
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    profileAggregations List<GetUserAssessmentProfileAnalyticsProfileAggregation>
    The list of profile_aggregations.
    userAssessmentId String
    accessLevel String
    compartmentIdInSubtree Boolean
    filters List<GetUserAssessmentProfileAnalyticsFilter>
    profileName String
    targetId String
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    profileAggregations GetUserAssessmentProfileAnalyticsProfileAggregation[]
    The list of profile_aggregations.
    userAssessmentId string
    accessLevel string
    compartmentIdInSubtree boolean
    filters GetUserAssessmentProfileAnalyticsFilter[]
    profileName string
    targetId string
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    profileAggregations List<Property Map>
    The list of profile_aggregations.
    userAssessmentId String
    accessLevel String
    compartmentIdInSubtree Boolean
    filters List<Property Map>
    profileName String
    targetId String

    Supporting Types

    GetUserAssessmentProfileAnalyticsFilter

    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

    GetUserAssessmentProfileAnalyticsProfileAggregation

    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    Items List<object>
    The array of profile aggregation data.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    Items []interface{}
    The array of profile aggregation data.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    items List<Object>
    The array of profile aggregation data.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    items any[]
    The array of profile aggregation data.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    items Sequence[Any]
    The array of profile aggregation data.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
    items List<Any>
    The array of profile aggregation data.

    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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi