Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi
oci.LicenseManager.getLicenseMetric
Explore with Pulumi AI
This data source provides details about a specific License Metric resource in Oracle Cloud Infrastructure License Manager service.
Retrieves the license metrics for a given compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testLicenseMetric = oci.LicenseManager.getLicenseMetric({
    compartmentId: compartmentId,
    isCompartmentIdInSubtree: licenseMetricIsCompartmentIdInSubtree,
});
import pulumi
import pulumi_oci as oci
test_license_metric = oci.LicenseManager.get_license_metric(compartment_id=compartment_id,
    is_compartment_id_in_subtree=license_metric_is_compartment_id_in_subtree)
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.GetLicenseMetric(ctx, &licensemanager.GetLicenseMetricArgs{
			CompartmentId:            compartmentId,
			IsCompartmentIdInSubtree: pulumi.BoolRef(licenseMetricIsCompartmentIdInSubtree),
		}, 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 testLicenseMetric = Oci.LicenseManager.GetLicenseMetric.Invoke(new()
    {
        CompartmentId = compartmentId,
        IsCompartmentIdInSubtree = licenseMetricIsCompartmentIdInSubtree,
    });
});
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.GetLicenseMetricArgs;
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 testLicenseMetric = LicenseManagerFunctions.getLicenseMetric(GetLicenseMetricArgs.builder()
            .compartmentId(compartmentId)
            .isCompartmentIdInSubtree(licenseMetricIsCompartmentIdInSubtree)
            .build());
    }
}
variables:
  testLicenseMetric:
    fn::invoke:
      function: oci:LicenseManager:getLicenseMetric
      arguments:
        compartmentId: ${compartmentId}
        isCompartmentIdInSubtree: ${licenseMetricIsCompartmentIdInSubtree}
Using getLicenseMetric
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 getLicenseMetric(args: GetLicenseMetricArgs, opts?: InvokeOptions): Promise<GetLicenseMetricResult>
function getLicenseMetricOutput(args: GetLicenseMetricOutputArgs, opts?: InvokeOptions): Output<GetLicenseMetricResult>def get_license_metric(compartment_id: Optional[str] = None,
                       is_compartment_id_in_subtree: Optional[bool] = None,
                       opts: Optional[InvokeOptions] = None) -> GetLicenseMetricResult
def get_license_metric_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       is_compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetLicenseMetricResult]func GetLicenseMetric(ctx *Context, args *GetLicenseMetricArgs, opts ...InvokeOption) (*GetLicenseMetricResult, error)
func GetLicenseMetricOutput(ctx *Context, args *GetLicenseMetricOutputArgs, opts ...InvokeOption) GetLicenseMetricResultOutput> Note: This function is named GetLicenseMetric in the Go SDK.
public static class GetLicenseMetric 
{
    public static Task<GetLicenseMetricResult> InvokeAsync(GetLicenseMetricArgs args, InvokeOptions? opts = null)
    public static Output<GetLicenseMetricResult> Invoke(GetLicenseMetricInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLicenseMetricResult> getLicenseMetric(GetLicenseMetricArgs args, InvokeOptions options)
public static Output<GetLicenseMetricResult> getLicenseMetric(GetLicenseMetricArgs args, InvokeOptions options)
fn::invoke:
  function: oci:LicenseManager/getLicenseMetric:getLicenseMetric
  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.
- 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.
- 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.
- 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.
- 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.
- 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.
getLicenseMetric Result
The following output properties are available:
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- LicenseRecord intExpiring Soon Count 
- Total number of license records that will expire within 90 days in a particular compartment.
- TotalByol intInstance Count 
- Total number of BYOL instances in a particular compartment.
- TotalLicense intIncluded Instance Count 
- Total number of License Included (LI) instances in a particular compartment.
- TotalProduct intLicense Count 
- Total number of product licenses in a particular compartment.
- IsCompartment boolId In Subtree 
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- LicenseRecord intExpiring Soon Count 
- Total number of license records that will expire within 90 days in a particular compartment.
- TotalByol intInstance Count 
- Total number of BYOL instances in a particular compartment.
- TotalLicense intIncluded Instance Count 
- Total number of License Included (LI) instances in a particular compartment.
- TotalProduct intLicense Count 
- Total number of product licenses in a particular compartment.
- IsCompartment boolId In Subtree 
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- licenseRecord IntegerExpiring Soon Count 
- Total number of license records that will expire within 90 days in a particular compartment.
- totalByol IntegerInstance Count 
- Total number of BYOL instances in a particular compartment.
- totalLicense IntegerIncluded Instance Count 
- Total number of License Included (LI) instances in a particular compartment.
- totalProduct IntegerLicense Count 
- Total number of product licenses in a particular compartment.
- isCompartment BooleanId In Subtree 
- compartmentId string
- id string
- The provider-assigned unique ID for this managed resource.
- licenseRecord numberExpiring Soon Count 
- Total number of license records that will expire within 90 days in a particular compartment.
- totalByol numberInstance Count 
- Total number of BYOL instances in a particular compartment.
- totalLicense numberIncluded Instance Count 
- Total number of License Included (LI) instances in a particular compartment.
- totalProduct numberLicense Count 
- Total number of product licenses in a particular compartment.
- isCompartment booleanId In Subtree 
- compartment_id str
- id str
- The provider-assigned unique ID for this managed resource.
- license_record_ intexpiring_ soon_ count 
- Total number of license records that will expire within 90 days in a particular compartment.
- total_byol_ intinstance_ count 
- Total number of BYOL instances in a particular compartment.
- total_license_ intincluded_ instance_ count 
- Total number of License Included (LI) instances in a particular compartment.
- total_product_ intlicense_ count 
- Total number of product licenses in a particular compartment.
- is_compartment_ boolid_ in_ subtree 
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- licenseRecord NumberExpiring Soon Count 
- Total number of license records that will expire within 90 days in a particular compartment.
- totalByol NumberInstance Count 
- Total number of BYOL instances in a particular compartment.
- totalLicense NumberIncluded Instance Count 
- Total number of License Included (LI) instances in a particular compartment.
- totalProduct NumberLicense Count 
- Total number of product licenses in a particular compartment.
- isCompartment BooleanId In Subtree 
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.