1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LicenseManager
  5. getTopUtilizedResources
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.LicenseManager.getTopUtilizedResources

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:LicenseManager/getTopUtilizedResources:getTopUtilizedResources
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The compartment OCID used for the license record, product license, and configuration.
    IsCompartmentIdInSubtree bool
    Indicates if the given compartment is the root compartment.
    ResourceUnitType string
    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.
    IsCompartmentIdInSubtree bool
    Indicates if the given compartment is the root compartment.
    ResourceUnitType string
    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.
    isCompartmentIdInSubtree Boolean
    Indicates if the given compartment is the root compartment.
    resourceUnitType String
    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.
    isCompartmentIdInSubtree boolean
    Indicates if the given compartment is the root compartment.
    resourceUnitType string
    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_id_in_subtree bool
    Indicates if the given compartment is the root compartment.
    resource_unit_type str
    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.
    isCompartmentIdInSubtree Boolean
    Indicates if the given compartment is the root compartment.
    resourceUnitType String
    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<GetTopUtilizedResourcesItem>
    The top utilized resource summary collection.
    IsCompartmentIdInSubtree bool
    ResourceUnitType string
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetTopUtilizedResourcesItem
    The top utilized resource summary collection.
    IsCompartmentIdInSubtree bool
    ResourceUnitType string
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetTopUtilizedResourcesItem>
    The top utilized resource summary collection.
    isCompartmentIdInSubtree Boolean
    resourceUnitType String
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    items GetTopUtilizedResourcesItem[]
    The top utilized resource summary collection.
    isCompartmentIdInSubtree boolean
    resourceUnitType string
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[licensemanager.GetTopUtilizedResourcesItem]
    The top utilized resource summary collection.
    is_compartment_id_in_subtree bool
    resource_unit_type str
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The top utilized resource summary collection.
    isCompartmentIdInSubtree Boolean
    resourceUnitType String

    Supporting Types

    GetTopUtilizedResourcesItem

    ResourceCompartmentId string
    The compartment OCID that contains the resource.
    ResourceCompartmentName string
    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.
    ResourceCompartmentId string
    The compartment OCID that contains the resource.
    ResourceCompartmentName string
    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.
    resourceCompartmentId String
    The compartment OCID that contains the resource.
    resourceCompartmentName String
    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.
    resourceCompartmentId string
    The compartment OCID that contains the resource.
    resourceCompartmentName string
    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_id str
    The compartment OCID that contains the resource.
    resource_compartment_name str
    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.
    resourceCompartmentId String
    The compartment OCID that contains the resource.
    resourceCompartmentName String
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi