1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LicenseManager
  5. getProductLicenses
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.LicenseManager.getProductLicenses

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

This data source provides the list of Product Licenses in Oracle Cloud Infrastructure License Manager service.

Retrieves all the product licenses from a given compartment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testProductLicenses = oci.LicenseManager.getProductLicenses({
    compartmentId: compartmentId,
    isCompartmentIdInSubtree: productLicenseIsCompartmentIdInSubtree,
});
Copy
import pulumi
import pulumi_oci as oci

test_product_licenses = oci.LicenseManager.get_product_licenses(compartment_id=compartment_id,
    is_compartment_id_in_subtree=product_license_is_compartment_id_in_subtree)
Copy
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.GetProductLicenses(ctx, &licensemanager.GetProductLicensesArgs{
			CompartmentId:            compartmentId,
			IsCompartmentIdInSubtree: pulumi.BoolRef(productLicenseIsCompartmentIdInSubtree),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testProductLicenses = Oci.LicenseManager.GetProductLicenses.Invoke(new()
    {
        CompartmentId = compartmentId,
        IsCompartmentIdInSubtree = productLicenseIsCompartmentIdInSubtree,
    });

});
Copy
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.GetProductLicensesArgs;
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 testProductLicenses = LicenseManagerFunctions.getProductLicenses(GetProductLicensesArgs.builder()
            .compartmentId(compartmentId)
            .isCompartmentIdInSubtree(productLicenseIsCompartmentIdInSubtree)
            .build());

    }
}
Copy
variables:
  testProductLicenses:
    fn::invoke:
      function: oci:LicenseManager:getProductLicenses
      arguments:
        compartmentId: ${compartmentId}
        isCompartmentIdInSubtree: ${productLicenseIsCompartmentIdInSubtree}
Copy

Using getProductLicenses

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 getProductLicenses(args: GetProductLicensesArgs, opts?: InvokeOptions): Promise<GetProductLicensesResult>
function getProductLicensesOutput(args: GetProductLicensesOutputArgs, opts?: InvokeOptions): Output<GetProductLicensesResult>
Copy
def get_product_licenses(compartment_id: Optional[str] = None,
                         filters: Optional[Sequence[_licensemanager.GetProductLicensesFilter]] = None,
                         is_compartment_id_in_subtree: Optional[bool] = None,
                         opts: Optional[InvokeOptions] = None) -> GetProductLicensesResult
def get_product_licenses_output(compartment_id: Optional[pulumi.Input[str]] = None,
                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[_licensemanager.GetProductLicensesFilterArgs]]]] = None,
                         is_compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetProductLicensesResult]
Copy
func GetProductLicenses(ctx *Context, args *GetProductLicensesArgs, opts ...InvokeOption) (*GetProductLicensesResult, error)
func GetProductLicensesOutput(ctx *Context, args *GetProductLicensesOutputArgs, opts ...InvokeOption) GetProductLicensesResultOutput
Copy

> Note: This function is named GetProductLicenses in the Go SDK.

public static class GetProductLicenses 
{
    public static Task<GetProductLicensesResult> InvokeAsync(GetProductLicensesArgs args, InvokeOptions? opts = null)
    public static Output<GetProductLicensesResult> Invoke(GetProductLicensesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProductLicensesResult> getProductLicenses(GetProductLicensesArgs args, InvokeOptions options)
public static Output<GetProductLicensesResult> getProductLicenses(GetProductLicensesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:LicenseManager/getProductLicenses:getProductLicenses
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The compartment OCID used for the license record, product license, and configuration.
Filters Changes to this property will trigger replacement. List<GetProductLicensesFilter>
IsCompartmentIdInSubtree bool
Indicates if the given compartment is the root compartment.
CompartmentId This property is required. string
The compartment OCID used for the license record, product license, and configuration.
Filters Changes to this property will trigger replacement. []GetProductLicensesFilter
IsCompartmentIdInSubtree bool
Indicates if the given compartment is the root compartment.
compartmentId This property is required. String
The compartment OCID used for the license record, product license, and configuration.
filters Changes to this property will trigger replacement. List<GetProductLicensesFilter>
isCompartmentIdInSubtree Boolean
Indicates if the given compartment is the root compartment.
compartmentId This property is required. string
The compartment OCID used for the license record, product license, and configuration.
filters Changes to this property will trigger replacement. GetProductLicensesFilter[]
isCompartmentIdInSubtree boolean
Indicates if the given compartment is the root compartment.
compartment_id This property is required. str
The compartment OCID used for the license record, product license, and configuration.
filters Changes to this property will trigger replacement. Sequence[licensemanager.GetProductLicensesFilter]
is_compartment_id_in_subtree bool
Indicates if the given compartment is the root compartment.
compartmentId This property is required. String
The compartment OCID used for the license record, product license, and configuration.
filters Changes to this property will trigger replacement. List<Property Map>
isCompartmentIdInSubtree Boolean
Indicates if the given compartment is the root compartment.

getProductLicenses Result

The following output properties are available:

CompartmentId string
The compartment OCID where the product license is created.
Id string
The provider-assigned unique ID for this managed resource.
ProductLicenseCollections List<GetProductLicensesProductLicenseCollection>
The list of product_license_collection.
Filters List<GetProductLicensesFilter>
IsCompartmentIdInSubtree bool
CompartmentId string
The compartment OCID where the product license is created.
Id string
The provider-assigned unique ID for this managed resource.
ProductLicenseCollections []GetProductLicensesProductLicenseCollection
The list of product_license_collection.
Filters []GetProductLicensesFilter
IsCompartmentIdInSubtree bool
compartmentId String
The compartment OCID where the product license is created.
id String
The provider-assigned unique ID for this managed resource.
productLicenseCollections List<GetProductLicensesProductLicenseCollection>
The list of product_license_collection.
filters List<GetProductLicensesFilter>
isCompartmentIdInSubtree Boolean
compartmentId string
The compartment OCID where the product license is created.
id string
The provider-assigned unique ID for this managed resource.
productLicenseCollections GetProductLicensesProductLicenseCollection[]
The list of product_license_collection.
filters GetProductLicensesFilter[]
isCompartmentIdInSubtree boolean
compartment_id str
The compartment OCID where the product license is created.
id str
The provider-assigned unique ID for this managed resource.
product_license_collections Sequence[licensemanager.GetProductLicensesProductLicenseCollection]
The list of product_license_collection.
filters Sequence[licensemanager.GetProductLicensesFilter]
is_compartment_id_in_subtree bool
compartmentId String
The compartment OCID where the product license is created.
id String
The provider-assigned unique ID for this managed resource.
productLicenseCollections List<Property Map>
The list of product_license_collection.
filters List<Property Map>
isCompartmentIdInSubtree Boolean

Supporting Types

GetProductLicensesFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetProductLicensesProductLicenseCollection

items This property is required. List<Property Map>

GetProductLicensesProductLicenseCollectionItem

ActiveLicenseRecordCount This property is required. int
The number of active license records associated with the product license.
CompartmentId This property is required. string
The compartment OCID used for the license record, product license, and configuration.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
DisplayName This property is required. string
License record name
FreeformTags This property is required. Dictionary<string, string>
Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Id This property is required. string
The image ID associated with the product license.
Images This property is required. List<GetProductLicensesProductLicenseCollectionItemImage>
The images associated with the product license.
IsOverSubscribed This property is required. bool
Specifies whether or not the product license is oversubscribed.
IsUnlimited This property is required. bool
Specifies if the license unit count is unlimited.
IsVendorOracle This property is required. bool
Specifies whether the vendor is Oracle or a third party.
LicenseUnit This property is required. string
The product license unit.
State This property is required. string
The current product license state.
Status This property is required. string
The current product license status.
StatusDescription This property is required. string
Status description for the current product license status.
SystemTags This property is required. Dictionary<string, string>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
The time the product license was created. An RFC 3339-formatted datetime string.
TimeUpdated This property is required. string
The time the product license was updated. An RFC 3339-formatted datetime string.
TotalActiveLicenseUnitCount This property is required. int
The total number of licenses available for the product license, calculated by adding up all the license counts for active license records associated with the product license.
TotalLicenseRecordCount This property is required. int
The number of license records associated with the product license.
TotalLicenseUnitsConsumed This property is required. double
The number of license units consumed. Updated after each allocation run.
VendorName This property is required. string
The vendor of the ProductLicense
ActiveLicenseRecordCount This property is required. int
The number of active license records associated with the product license.
CompartmentId This property is required. string
The compartment OCID used for the license record, product license, and configuration.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
DisplayName This property is required. string
License record name
FreeformTags This property is required. map[string]string
Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Id This property is required. string
The image ID associated with the product license.
Images This property is required. []GetProductLicensesProductLicenseCollectionItemImage
The images associated with the product license.
IsOverSubscribed This property is required. bool
Specifies whether or not the product license is oversubscribed.
IsUnlimited This property is required. bool
Specifies if the license unit count is unlimited.
IsVendorOracle This property is required. bool
Specifies whether the vendor is Oracle or a third party.
LicenseUnit This property is required. string
The product license unit.
State This property is required. string
The current product license state.
Status This property is required. string
The current product license status.
StatusDescription This property is required. string
Status description for the current product license status.
SystemTags This property is required. map[string]string
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
The time the product license was created. An RFC 3339-formatted datetime string.
TimeUpdated This property is required. string
The time the product license was updated. An RFC 3339-formatted datetime string.
TotalActiveLicenseUnitCount This property is required. int
The total number of licenses available for the product license, calculated by adding up all the license counts for active license records associated with the product license.
TotalLicenseRecordCount This property is required. int
The number of license records associated with the product license.
TotalLicenseUnitsConsumed This property is required. float64
The number of license units consumed. Updated after each allocation run.
VendorName This property is required. string
The vendor of the ProductLicense
activeLicenseRecordCount This property is required. Integer
The number of active license records associated with the product license.
compartmentId This property is required. String
The compartment OCID used for the license record, product license, and configuration.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. String
License record name
freeformTags This property is required. Map<String,String>
Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. String
The image ID associated with the product license.
images This property is required. List<GetProductLicensesProductLicenseCollectionItemImage>
The images associated with the product license.
isOverSubscribed This property is required. Boolean
Specifies whether or not the product license is oversubscribed.
isUnlimited This property is required. Boolean
Specifies if the license unit count is unlimited.
isVendorOracle This property is required. Boolean
Specifies whether the vendor is Oracle or a third party.
licenseUnit This property is required. String
The product license unit.
state This property is required. String
The current product license state.
status This property is required. String
The current product license status.
statusDescription This property is required. String
Status description for the current product license status.
systemTags This property is required. Map<String,String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
The time the product license was created. An RFC 3339-formatted datetime string.
timeUpdated This property is required. String
The time the product license was updated. An RFC 3339-formatted datetime string.
totalActiveLicenseUnitCount This property is required. Integer
The total number of licenses available for the product license, calculated by adding up all the license counts for active license records associated with the product license.
totalLicenseRecordCount This property is required. Integer
The number of license records associated with the product license.
totalLicenseUnitsConsumed This property is required. Double
The number of license units consumed. Updated after each allocation run.
vendorName This property is required. String
The vendor of the ProductLicense
activeLicenseRecordCount This property is required. number
The number of active license records associated with the product license.
compartmentId This property is required. string
The compartment OCID used for the license record, product license, and configuration.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. string
License record name
freeformTags This property is required. {[key: string]: string}
Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. string
The image ID associated with the product license.
images This property is required. GetProductLicensesProductLicenseCollectionItemImage[]
The images associated with the product license.
isOverSubscribed This property is required. boolean
Specifies whether or not the product license is oversubscribed.
isUnlimited This property is required. boolean
Specifies if the license unit count is unlimited.
isVendorOracle This property is required. boolean
Specifies whether the vendor is Oracle or a third party.
licenseUnit This property is required. string
The product license unit.
state This property is required. string
The current product license state.
status This property is required. string
The current product license status.
statusDescription This property is required. string
Status description for the current product license status.
systemTags This property is required. {[key: string]: string}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. string
The time the product license was created. An RFC 3339-formatted datetime string.
timeUpdated This property is required. string
The time the product license was updated. An RFC 3339-formatted datetime string.
totalActiveLicenseUnitCount This property is required. number
The total number of licenses available for the product license, calculated by adding up all the license counts for active license records associated with the product license.
totalLicenseRecordCount This property is required. number
The number of license records associated with the product license.
totalLicenseUnitsConsumed This property is required. number
The number of license units consumed. Updated after each allocation run.
vendorName This property is required. string
The vendor of the ProductLicense
active_license_record_count This property is required. int
The number of active license records associated with the product license.
compartment_id This property is required. str
The compartment OCID used for the license record, product license, and configuration.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
display_name This property is required. str
License record name
freeform_tags This property is required. Mapping[str, str]
Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. str
The image ID associated with the product license.
images This property is required. Sequence[licensemanager.GetProductLicensesProductLicenseCollectionItemImage]
The images associated with the product license.
is_over_subscribed This property is required. bool
Specifies whether or not the product license is oversubscribed.
is_unlimited This property is required. bool
Specifies if the license unit count is unlimited.
is_vendor_oracle This property is required. bool
Specifies whether the vendor is Oracle or a third party.
license_unit This property is required. str
The product license unit.
state This property is required. str
The current product license state.
status This property is required. str
The current product license status.
status_description This property is required. str
Status description for the current product license status.
system_tags This property is required. Mapping[str, str]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created This property is required. str
The time the product license was created. An RFC 3339-formatted datetime string.
time_updated This property is required. str
The time the product license was updated. An RFC 3339-formatted datetime string.
total_active_license_unit_count This property is required. int
The total number of licenses available for the product license, calculated by adding up all the license counts for active license records associated with the product license.
total_license_record_count This property is required. int
The number of license records associated with the product license.
total_license_units_consumed This property is required. float
The number of license units consumed. Updated after each allocation run.
vendor_name This property is required. str
The vendor of the ProductLicense
activeLicenseRecordCount This property is required. Number
The number of active license records associated with the product license.
compartmentId This property is required. String
The compartment OCID used for the license record, product license, and configuration.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. String
License record name
freeformTags This property is required. Map<String>
Simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. String
The image ID associated with the product license.
images This property is required. List<Property Map>
The images associated with the product license.
isOverSubscribed This property is required. Boolean
Specifies whether or not the product license is oversubscribed.
isUnlimited This property is required. Boolean
Specifies if the license unit count is unlimited.
isVendorOracle This property is required. Boolean
Specifies whether the vendor is Oracle or a third party.
licenseUnit This property is required. String
The product license unit.
state This property is required. String
The current product license state.
status This property is required. String
The current product license status.
statusDescription This property is required. String
Status description for the current product license status.
systemTags This property is required. Map<String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
The time the product license was created. An RFC 3339-formatted datetime string.
timeUpdated This property is required. String
The time the product license was updated. An RFC 3339-formatted datetime string.
totalActiveLicenseUnitCount This property is required. Number
The total number of licenses available for the product license, calculated by adding up all the license counts for active license records associated with the product license.
totalLicenseRecordCount This property is required. Number
The number of license records associated with the product license.
totalLicenseUnitsConsumed This property is required. Number
The number of license units consumed. Updated after each allocation run.
vendorName This property is required. String
The vendor of the ProductLicense

GetProductLicensesProductLicenseCollectionItemImage

Id This property is required. string
The image ID associated with the product license.
ListingId This property is required. string
The image listing ID.
ListingName This property is required. string
The listing name associated with the product license.
PackageVersion This property is required. string
The image package version.
Publisher This property is required. string
The image publisher.
Id This property is required. string
The image ID associated with the product license.
ListingId This property is required. string
The image listing ID.
ListingName This property is required. string
The listing name associated with the product license.
PackageVersion This property is required. string
The image package version.
Publisher This property is required. string
The image publisher.
id This property is required. String
The image ID associated with the product license.
listingId This property is required. String
The image listing ID.
listingName This property is required. String
The listing name associated with the product license.
packageVersion This property is required. String
The image package version.
publisher This property is required. String
The image publisher.
id This property is required. string
The image ID associated with the product license.
listingId This property is required. string
The image listing ID.
listingName This property is required. string
The listing name associated with the product license.
packageVersion This property is required. string
The image package version.
publisher This property is required. string
The image publisher.
id This property is required. str
The image ID associated with the product license.
listing_id This property is required. str
The image listing ID.
listing_name This property is required. str
The listing name associated with the product license.
package_version This property is required. str
The image package version.
publisher This property is required. str
The image publisher.
id This property is required. String
The image ID associated with the product license.
listingId This property is required. String
The image listing ID.
listingName This property is required. String
The listing name associated with the product license.
packageVersion This property is required. String
The image package version.
publisher This property is required. String
The image publisher.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi