1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LicenseManager
  5. getLicenseMetric
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

oci.LicenseManager.getLicenseMetric

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

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

    getLicenseMetric Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    LicenseRecordExpiringSoonCount int
    Total number of license records that will expire within 90 days in a particular compartment.
    TotalByolInstanceCount int
    Total number of BYOL instances in a particular compartment.
    TotalLicenseIncludedInstanceCount int
    Total number of License Included (LI) instances in a particular compartment.
    TotalProductLicenseCount int
    Total number of product licenses in a particular compartment.
    IsCompartmentIdInSubtree bool
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    LicenseRecordExpiringSoonCount int
    Total number of license records that will expire within 90 days in a particular compartment.
    TotalByolInstanceCount int
    Total number of BYOL instances in a particular compartment.
    TotalLicenseIncludedInstanceCount int
    Total number of License Included (LI) instances in a particular compartment.
    TotalProductLicenseCount int
    Total number of product licenses in a particular compartment.
    IsCompartmentIdInSubtree bool
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    licenseRecordExpiringSoonCount Integer
    Total number of license records that will expire within 90 days in a particular compartment.
    totalByolInstanceCount Integer
    Total number of BYOL instances in a particular compartment.
    totalLicenseIncludedInstanceCount Integer
    Total number of License Included (LI) instances in a particular compartment.
    totalProductLicenseCount Integer
    Total number of product licenses in a particular compartment.
    isCompartmentIdInSubtree Boolean
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    licenseRecordExpiringSoonCount number
    Total number of license records that will expire within 90 days in a particular compartment.
    totalByolInstanceCount number
    Total number of BYOL instances in a particular compartment.
    totalLicenseIncludedInstanceCount number
    Total number of License Included (LI) instances in a particular compartment.
    totalProductLicenseCount number
    Total number of product licenses in a particular compartment.
    isCompartmentIdInSubtree boolean
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    license_record_expiring_soon_count int
    Total number of license records that will expire within 90 days in a particular compartment.
    total_byol_instance_count int
    Total number of BYOL instances in a particular compartment.
    total_license_included_instance_count int
    Total number of License Included (LI) instances in a particular compartment.
    total_product_license_count int
    Total number of product licenses in a particular compartment.
    is_compartment_id_in_subtree bool
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    licenseRecordExpiringSoonCount Number
    Total number of license records that will expire within 90 days in a particular compartment.
    totalByolInstanceCount Number
    Total number of BYOL instances in a particular compartment.
    totalLicenseIncludedInstanceCount Number
    Total number of License Included (LI) instances in a particular compartment.
    totalProductLicenseCount Number
    Total number of product licenses in a particular compartment.
    isCompartmentIdInSubtree Boolean

    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.2.0 published on Friday, Jul 12, 2024 by Pulumi