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
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 = @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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
getLicenseMetric Result
The following output properties are available:
- Compartment
Id string - Id string
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
- Compartment
Id string - Id string
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
- compartment
Id String - id String
The provider-assigned unique ID for this managed resource.
- license
Record IntegerExpiring Soon Count Total number of license records that will expire within 90 days in a particular compartment.
- total
Byol IntegerInstance Count Total number of BYOL instances in a particular compartment.
- total
License IntegerIncluded Instance Count Total number of License Included (LI) instances in a particular compartment.
- total
Product IntegerLicense Count Total number of product licenses in a particular compartment.
- is
Compartment BooleanId In Subtree
- compartment
Id string - id string
The provider-assigned unique ID for this managed resource.
- license
Record numberExpiring Soon Count Total number of license records that will expire within 90 days in a particular compartment.
- total
Byol numberInstance Count Total number of BYOL instances in a particular compartment.
- total
License numberIncluded Instance Count Total number of License Included (LI) instances in a particular compartment.
- total
Product numberLicense Count Total number of product licenses in a particular compartment.
- is
Compartment 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
- compartment
Id String - id String
The provider-assigned unique ID for this managed resource.
- license
Record NumberExpiring Soon Count Total number of license records that will expire within 90 days in a particular compartment.
- total
Byol NumberInstance Count Total number of BYOL instances in a particular compartment.
- total
License NumberIncluded Instance Count Total number of License Included (LI) instances in a particular compartment.
- total
Product NumberLicense Count Total number of product licenses in a particular compartment.
- is
Compartment BooleanId In Subtree
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.