Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getLicenseMetric

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testLicenseMetric = Oci.LicenseManager.GetLicenseMetric.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        IsCompartmentIdInSubtree = @var.License_metric_is_compartment_id_in_subtree,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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:            _var.Compartment_id,
			IsCompartmentIdInSubtree: pulumi.BoolRef(_var.License_metric_is_compartment_id_in_subtree),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .isCompartmentIdInSubtree(var_.license_metric_is_compartment_id_in_subtree())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_license_metric = oci.LicenseManager.get_license_metric(compartment_id=var["compartment_id"],
    is_compartment_id_in_subtree=var["license_metric_is_compartment_id_in_subtree"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testLicenseMetric = oci.LicenseManager.getLicenseMetric({
    compartmentId: _var.compartment_id,
    isCompartmentIdInSubtree: _var.license_metric_is_compartment_id_in_subtree,
});
variables:
  testLicenseMetric:
    Fn::Invoke:
      Function: oci:LicenseManager:getLicenseMetric
      Arguments:
        compartmentId: ${var.compartment_id}
        isCompartmentIdInSubtree: ${var.license_metric_is_compartment_id_in_subtree}

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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.