Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:LicenseManager/getTopUtilizedResources:getTopUtilizedResources
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - 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 stringType - A filter to return only resources whose unit matches the given resource unit.
- Compartment
Id string - 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 stringType - A filter to return only resources whose unit matches the given resource unit.
- compartment
Id String - The compartment OCID used for the license record, product license, and configuration.
- is
Compartment BooleanId In Subtree - Indicates if the given compartment is the root compartment.
- resource
Unit StringType - A filter to return only resources whose unit matches the given resource unit.
- compartment
Id string - The compartment OCID used for the license record, product license, and configuration.
- is
Compartment booleanId In Subtree - Indicates if the given compartment is the root compartment.
- resource
Unit 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.
- compartment
Id String - The compartment OCID used for the license record, product license, and configuration.
- is
Compartment BooleanId In Subtree - Indicates if the given compartment is the root compartment.
- resource
Unit StringType - A filter to return only resources whose unit matches the given resource unit.
getTopUtilizedResources Result
The following output properties are available:
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Top Utilized Resources Item> - The top utilized resource summary collection.
- Is
Compartment boolId In Subtree - Resource
Unit stringType
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Top Utilized Resources Item - The top utilized resource summary collection.
- Is
Compartment boolId In Subtree - Resource
Unit stringType
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Top Utilized Resources Item> - The top utilized resource summary collection.
- is
Compartment BooleanId In Subtree - resource
Unit StringType
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Top Utilized Resources Item[] - The top utilized resource summary collection.
- is
Compartment booleanId In Subtree - resource
Unit stringType
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[licensemanager.
Get Top Utilized Resources Item] - The top utilized resource summary collection.
- is_
compartment_ boolid_ in_ subtree - resource_
unit_ strtype
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- The top utilized resource summary collection.
- is
Compartment BooleanId In Subtree - resource
Unit StringType
Supporting Types
GetTopUtilizedResourcesItem
- Resource
Compartment stringId - The compartment OCID that contains the resource.
- Resource
Compartment stringName - The display name of the compartment that contains the resource.
- Resource
Id string - The OCID of the resource.
- Resource
Name string - Resource canonical name.
- Total
Units double - Number of license units consumed by the resource.
- Unit
Type string - The resource unit.
- Resource
Compartment stringId - The compartment OCID that contains the resource.
- Resource
Compartment stringName - The display name of the compartment that contains the resource.
- Resource
Id string - The OCID of the resource.
- Resource
Name string - Resource canonical name.
- Total
Units float64 - Number of license units consumed by the resource.
- Unit
Type string - The resource unit.
- resource
Compartment StringId - The compartment OCID that contains the resource.
- resource
Compartment StringName - The display name of the compartment that contains the resource.
- resource
Id String - The OCID of the resource.
- resource
Name String - Resource canonical name.
- total
Units Double - Number of license units consumed by the resource.
- unit
Type String - The resource unit.
- resource
Compartment stringId - The compartment OCID that contains the resource.
- resource
Compartment stringName - The display name of the compartment that contains the resource.
- resource
Id string - The OCID of the resource.
- resource
Name string - Resource canonical name.
- total
Units number - Number of license units consumed by the resource.
- unit
Type 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.
- resource
Compartment StringId - The compartment OCID that contains the resource.
- resource
Compartment StringName - The display name of the compartment that contains the resource.
- resource
Id String - The OCID of the resource.
- resource
Name String - Resource canonical name.
- total
Units Number - Number of license units consumed by the resource.
- unit
Type 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.