Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.LicenseManager.getTopUtilizedResources
Explore with Pulumi AI
This data source provides the list of Top Utilized Resources in Oracle Cloud Infrastructure License Manager service.
Retrieves the top utilized resources for a given compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTopUtilizedResources = oci.LicenseManager.getTopUtilizedResources({
    compartmentId: compartmentId,
    isCompartmentIdInSubtree: topUtilizedResourceIsCompartmentIdInSubtree,
    resourceUnitType: topUtilizedResourceResourceUnitType,
});
import pulumi
import pulumi_oci as oci
test_top_utilized_resources = oci.LicenseManager.get_top_utilized_resources(compartment_id=compartment_id,
    is_compartment_id_in_subtree=top_utilized_resource_is_compartment_id_in_subtree,
    resource_unit_type=top_utilized_resource_resource_unit_type)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/licensemanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := licensemanager.GetTopUtilizedResources(ctx, &licensemanager.GetTopUtilizedResourcesArgs{
			CompartmentId:            compartmentId,
			IsCompartmentIdInSubtree: pulumi.BoolRef(topUtilizedResourceIsCompartmentIdInSubtree),
			ResourceUnitType:         pulumi.StringRef(topUtilizedResourceResourceUnitType),
		}, 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 testTopUtilizedResources = Oci.LicenseManager.GetTopUtilizedResources.Invoke(new()
    {
        CompartmentId = compartmentId,
        IsCompartmentIdInSubtree = topUtilizedResourceIsCompartmentIdInSubtree,
        ResourceUnitType = topUtilizedResourceResourceUnitType,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.LicenseManager.LicenseManagerFunctions;
import com.pulumi.oci.LicenseManager.inputs.GetTopUtilizedResourcesArgs;
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 testTopUtilizedResources = LicenseManagerFunctions.getTopUtilizedResources(GetTopUtilizedResourcesArgs.builder()
            .compartmentId(compartmentId)
            .isCompartmentIdInSubtree(topUtilizedResourceIsCompartmentIdInSubtree)
            .resourceUnitType(topUtilizedResourceResourceUnitType)
            .build());
    }
}
variables:
  testTopUtilizedResources:
    fn::invoke:
      function: oci:LicenseManager:getTopUtilizedResources
      arguments:
        compartmentId: ${compartmentId}
        isCompartmentIdInSubtree: ${topUtilizedResourceIsCompartmentIdInSubtree}
        resourceUnitType: ${topUtilizedResourceResourceUnitType}
Using getTopUtilizedResources
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 getTopUtilizedResources(args: GetTopUtilizedResourcesArgs, opts?: InvokeOptions): Promise<GetTopUtilizedResourcesResult>
function getTopUtilizedResourcesOutput(args: GetTopUtilizedResourcesOutputArgs, opts?: InvokeOptions): Output<GetTopUtilizedResourcesResult>def get_top_utilized_resources(compartment_id: Optional[str] = None,
                               is_compartment_id_in_subtree: Optional[bool] = None,
                               resource_unit_type: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetTopUtilizedResourcesResult
def get_top_utilized_resources_output(compartment_id: Optional[pulumi.Input[str]] = None,
                               is_compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                               resource_unit_type: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetTopUtilizedResourcesResult]func GetTopUtilizedResources(ctx *Context, args *GetTopUtilizedResourcesArgs, opts ...InvokeOption) (*GetTopUtilizedResourcesResult, error)
func GetTopUtilizedResourcesOutput(ctx *Context, args *GetTopUtilizedResourcesOutputArgs, opts ...InvokeOption) GetTopUtilizedResourcesResultOutput> Note: This function is named GetTopUtilizedResources in the Go SDK.
public static class GetTopUtilizedResources 
{
    public static Task<GetTopUtilizedResourcesResult> InvokeAsync(GetTopUtilizedResourcesArgs args, InvokeOptions? opts = null)
    public static Output<GetTopUtilizedResourcesResult> Invoke(GetTopUtilizedResourcesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTopUtilizedResourcesResult> getTopUtilizedResources(GetTopUtilizedResourcesArgs args, InvokeOptions options)
public static Output<GetTopUtilizedResourcesResult> getTopUtilizedResources(GetTopUtilizedResourcesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:LicenseManager/getTopUtilizedResources:getTopUtilizedResources
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The compartment OCID used for the license record, product license, and configuration.
- IsCompartment boolId In Subtree 
- Indicates if the given compartment is the root compartment.
- ResourceUnit stringType 
- A filter to return only resources whose unit matches the given resource unit.
- CompartmentId string
- The compartment OCID used for the license record, product license, and configuration.
- IsCompartment boolId In Subtree 
- Indicates if the given compartment is the root compartment.
- ResourceUnit stringType 
- A filter to return only resources whose unit matches the given resource unit.
- compartmentId String
- The compartment OCID used for the license record, product license, and configuration.
- isCompartment BooleanId In Subtree 
- Indicates if the given compartment is the root compartment.
- resourceUnit StringType 
- A filter to return only resources whose unit matches the given resource unit.
- compartmentId string
- The compartment OCID used for the license record, product license, and configuration.
- isCompartment booleanId In Subtree 
- Indicates if the given compartment is the root compartment.
- resourceUnit stringType 
- A filter to return only resources whose unit matches the given resource unit.
- compartment_id str
- The compartment OCID used for the license record, product license, and configuration.
- is_compartment_ boolid_ in_ subtree 
- Indicates if the given compartment is the root compartment.
- resource_unit_ strtype 
- A filter to return only resources whose unit matches the given resource unit.
- compartmentId String
- The compartment OCID used for the license record, product license, and configuration.
- isCompartment BooleanId In Subtree 
- Indicates if the given compartment is the root compartment.
- resourceUnit StringType 
- A filter to return only resources whose unit matches the given resource unit.
getTopUtilizedResources Result
The following output properties are available:
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<GetTop Utilized Resources Item> 
- The top utilized resource summary collection.
- IsCompartment boolId In Subtree 
- ResourceUnit stringType 
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]GetTop Utilized Resources Item 
- The top utilized resource summary collection.
- IsCompartment boolId In Subtree 
- ResourceUnit stringType 
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<GetTop Utilized Resources Item> 
- The top utilized resource summary collection.
- isCompartment BooleanId In Subtree 
- resourceUnit StringType 
- compartmentId string
- id string
- The provider-assigned unique ID for this managed resource.
- items
GetTop Utilized Resources Item[] 
- The top utilized resource summary collection.
- isCompartment booleanId In Subtree 
- resourceUnit stringType 
- compartment_id str
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[GetTop Utilized Resources Item] 
- The top utilized resource summary collection.
- is_compartment_ boolid_ in_ subtree 
- resource_unit_ strtype 
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- The top utilized resource summary collection.
- isCompartment BooleanId In Subtree 
- resourceUnit StringType 
Supporting Types
GetTopUtilizedResourcesItem    
- ResourceCompartment stringId 
- The compartment OCID that contains the resource.
- ResourceCompartment stringName 
- The display name of the compartment that contains the resource.
- ResourceId string
- The OCID of the resource.
- ResourceName string
- Resource canonical name.
- TotalUnits double
- Number of license units consumed by the resource.
- UnitType string
- The resource unit.
- ResourceCompartment stringId 
- The compartment OCID that contains the resource.
- ResourceCompartment stringName 
- The display name of the compartment that contains the resource.
- ResourceId string
- The OCID of the resource.
- ResourceName string
- Resource canonical name.
- TotalUnits float64
- Number of license units consumed by the resource.
- UnitType string
- The resource unit.
- resourceCompartment StringId 
- The compartment OCID that contains the resource.
- resourceCompartment StringName 
- The display name of the compartment that contains the resource.
- resourceId String
- The OCID of the resource.
- resourceName String
- Resource canonical name.
- totalUnits Double
- Number of license units consumed by the resource.
- unitType String
- The resource unit.
- resourceCompartment stringId 
- The compartment OCID that contains the resource.
- resourceCompartment stringName 
- The display name of the compartment that contains the resource.
- resourceId string
- The OCID of the resource.
- resourceName string
- Resource canonical name.
- totalUnits number
- Number of license units consumed by the resource.
- unitType string
- The resource unit.
- resource_compartment_ strid 
- The compartment OCID that contains the resource.
- resource_compartment_ strname 
- The display name of the compartment that contains the resource.
- resource_id str
- The OCID of the resource.
- resource_name str
- Resource canonical name.
- total_units float
- Number of license units consumed by the resource.
- unit_type str
- The resource unit.
- resourceCompartment StringId 
- The compartment OCID that contains the resource.
- resourceCompartment StringName 
- The display name of the compartment that contains the resource.
- resourceId String
- The OCID of the resource.
- resourceName String
- Resource canonical name.
- totalUnits Number
- Number of license units consumed by the resource.
- unitType String
- The resource unit.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.