1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. LicenseManager
  5. getProductLicenseConsumers
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.LicenseManager.getProductLicenseConsumers

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

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

    Retrieves the product license consumers for a particular product license ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testProductLicenseConsumers = oci.LicenseManager.getProductLicenseConsumers({
        compartmentId: _var.compartment_id,
        productLicenseId: oci_license_manager_product_license.test_product_license.id,
        isCompartmentIdInSubtree: _var.product_license_consumer_is_compartment_id_in_subtree,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_product_license_consumers = oci.LicenseManager.get_product_license_consumers(compartment_id=var["compartment_id"],
        product_license_id=oci_license_manager_product_license["test_product_license"]["id"],
        is_compartment_id_in_subtree=var["product_license_consumer_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.GetProductLicenseConsumers(ctx, &licensemanager.GetProductLicenseConsumersArgs{
    			CompartmentId:            _var.Compartment_id,
    			ProductLicenseId:         oci_license_manager_product_license.Test_product_license.Id,
    			IsCompartmentIdInSubtree: pulumi.BoolRef(_var.Product_license_consumer_is_compartment_id_in_subtree),
    		}, 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 testProductLicenseConsumers = Oci.LicenseManager.GetProductLicenseConsumers.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            ProductLicenseId = oci_license_manager_product_license.Test_product_license.Id,
            IsCompartmentIdInSubtree = @var.Product_license_consumer_is_compartment_id_in_subtree,
        });
    
    });
    
    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.GetProductLicenseConsumersArgs;
    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 testProductLicenseConsumers = LicenseManagerFunctions.getProductLicenseConsumers(GetProductLicenseConsumersArgs.builder()
                .compartmentId(var_.compartment_id())
                .productLicenseId(oci_license_manager_product_license.test_product_license().id())
                .isCompartmentIdInSubtree(var_.product_license_consumer_is_compartment_id_in_subtree())
                .build());
    
        }
    }
    
    variables:
      testProductLicenseConsumers:
        fn::invoke:
          Function: oci:LicenseManager:getProductLicenseConsumers
          Arguments:
            compartmentId: ${var.compartment_id}
            productLicenseId: ${oci_license_manager_product_license.test_product_license.id}
            isCompartmentIdInSubtree: ${var.product_license_consumer_is_compartment_id_in_subtree}
    

    Using getProductLicenseConsumers

    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 getProductLicenseConsumers(args: GetProductLicenseConsumersArgs, opts?: InvokeOptions): Promise<GetProductLicenseConsumersResult>
    function getProductLicenseConsumersOutput(args: GetProductLicenseConsumersOutputArgs, opts?: InvokeOptions): Output<GetProductLicenseConsumersResult>
    def get_product_license_consumers(compartment_id: Optional[str] = None,
                                      is_compartment_id_in_subtree: Optional[bool] = None,
                                      product_license_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetProductLicenseConsumersResult
    def get_product_license_consumers_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                      is_compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                                      product_license_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetProductLicenseConsumersResult]
    func GetProductLicenseConsumers(ctx *Context, args *GetProductLicenseConsumersArgs, opts ...InvokeOption) (*GetProductLicenseConsumersResult, error)
    func GetProductLicenseConsumersOutput(ctx *Context, args *GetProductLicenseConsumersOutputArgs, opts ...InvokeOption) GetProductLicenseConsumersResultOutput

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

    public static class GetProductLicenseConsumers 
    {
        public static Task<GetProductLicenseConsumersResult> InvokeAsync(GetProductLicenseConsumersArgs args, InvokeOptions? opts = null)
        public static Output<GetProductLicenseConsumersResult> Invoke(GetProductLicenseConsumersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProductLicenseConsumersResult> getProductLicenseConsumers(GetProductLicenseConsumersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:LicenseManager/getProductLicenseConsumers:getProductLicenseConsumers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The compartment OCID used for the license record, product license, and configuration.
    ProductLicenseId string
    Unique product license identifier.
    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.
    ProductLicenseId string
    Unique product license identifier.
    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.
    productLicenseId String
    Unique product license identifier.
    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.
    productLicenseId string
    Unique product license identifier.
    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.
    product_license_id str
    Unique product license identifier.
    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.
    productLicenseId String
    Unique product license identifier.
    isCompartmentIdInSubtree Boolean
    Indicates if the given compartment is the root compartment.

    getProductLicenseConsumers Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetProductLicenseConsumersItem>
    Collection of product license consumers.
    ProductLicenseId string
    IsCompartmentIdInSubtree bool
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetProductLicenseConsumersItem
    Collection of product license consumers.
    ProductLicenseId string
    IsCompartmentIdInSubtree bool
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetProductLicenseConsumersItem>
    Collection of product license consumers.
    productLicenseId String
    isCompartmentIdInSubtree Boolean
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    items GetProductLicenseConsumersItem[]
    Collection of product license consumers.
    productLicenseId string
    isCompartmentIdInSubtree boolean
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    items GetProductLicenseConsumersItem]
    Collection of product license consumers.
    product_license_id str
    is_compartment_id_in_subtree bool
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    Collection of product license consumers.
    productLicenseId String
    isCompartmentIdInSubtree Boolean

    Supporting Types

    GetProductLicenseConsumersItem

    AreAllOptionsAvailable bool
    Specifies if all options are available.
    IsBaseLicenseAvailable bool
    Specifies if the base license is available.
    LicenseUnitType string
    The product license unit.
    LicenseUnitsConsumed double
    Number of license units consumed by the resource.
    MissingProducts List<GetProductLicenseConsumersItemMissingProduct>
    Collection of missing product licenses.
    ProductName string
    The resource product name.
    ResourceCompartmentId string
    The OCID of the compartment that contains the resource.
    ResourceCompartmentName string
    The display name of the compartment that contains the resource.
    ResourceId string
    The OCID of the resource.
    ResourceName string
    The display name of the resource.
    ResourceUnitCount double
    Number of units of the resource
    ResourceUnitType string
    The unit type for the resource.
    AreAllOptionsAvailable bool
    Specifies if all options are available.
    IsBaseLicenseAvailable bool
    Specifies if the base license is available.
    LicenseUnitType string
    The product license unit.
    LicenseUnitsConsumed float64
    Number of license units consumed by the resource.
    MissingProducts []GetProductLicenseConsumersItemMissingProduct
    Collection of missing product licenses.
    ProductName string
    The resource product name.
    ResourceCompartmentId string
    The OCID of the compartment that contains the resource.
    ResourceCompartmentName string
    The display name of the compartment that contains the resource.
    ResourceId string
    The OCID of the resource.
    ResourceName string
    The display name of the resource.
    ResourceUnitCount float64
    Number of units of the resource
    ResourceUnitType string
    The unit type for the resource.
    areAllOptionsAvailable Boolean
    Specifies if all options are available.
    isBaseLicenseAvailable Boolean
    Specifies if the base license is available.
    licenseUnitType String
    The product license unit.
    licenseUnitsConsumed Double
    Number of license units consumed by the resource.
    missingProducts List<GetProductLicenseConsumersItemMissingProduct>
    Collection of missing product licenses.
    productName String
    The resource product name.
    resourceCompartmentId String
    The OCID of the compartment that contains the resource.
    resourceCompartmentName String
    The display name of the compartment that contains the resource.
    resourceId String
    The OCID of the resource.
    resourceName String
    The display name of the resource.
    resourceUnitCount Double
    Number of units of the resource
    resourceUnitType String
    The unit type for the resource.
    areAllOptionsAvailable boolean
    Specifies if all options are available.
    isBaseLicenseAvailable boolean
    Specifies if the base license is available.
    licenseUnitType string
    The product license unit.
    licenseUnitsConsumed number
    Number of license units consumed by the resource.
    missingProducts GetProductLicenseConsumersItemMissingProduct[]
    Collection of missing product licenses.
    productName string
    The resource product name.
    resourceCompartmentId string
    The OCID of the compartment that contains the resource.
    resourceCompartmentName string
    The display name of the compartment that contains the resource.
    resourceId string
    The OCID of the resource.
    resourceName string
    The display name of the resource.
    resourceUnitCount number
    Number of units of the resource
    resourceUnitType string
    The unit type for the resource.
    are_all_options_available bool
    Specifies if all options are available.
    is_base_license_available bool
    Specifies if the base license is available.
    license_unit_type str
    The product license unit.
    license_units_consumed float
    Number of license units consumed by the resource.
    missing_products GetProductLicenseConsumersItemMissingProduct]
    Collection of missing product licenses.
    product_name str
    The resource product name.
    resource_compartment_id str
    The OCID of the compartment that contains the resource.
    resource_compartment_name str
    The display name of the compartment that contains the resource.
    resource_id str
    The OCID of the resource.
    resource_name str
    The display name of the resource.
    resource_unit_count float
    Number of units of the resource
    resource_unit_type str
    The unit type for the resource.
    areAllOptionsAvailable Boolean
    Specifies if all options are available.
    isBaseLicenseAvailable Boolean
    Specifies if the base license is available.
    licenseUnitType String
    The product license unit.
    licenseUnitsConsumed Number
    Number of license units consumed by the resource.
    missingProducts List<Property Map>
    Collection of missing product licenses.
    productName String
    The resource product name.
    resourceCompartmentId String
    The OCID of the compartment that contains the resource.
    resourceCompartmentName String
    The display name of the compartment that contains the resource.
    resourceId String
    The OCID of the resource.
    resourceName String
    The display name of the resource.
    resourceUnitCount Number
    Number of units of the resource
    resourceUnitType String
    The unit type for the resource.

    GetProductLicenseConsumersItemMissingProduct

    Category string
    Product category base or option.
    Count double
    Units required for the missing product.
    Name string
    Name of the product.
    Category string
    Product category base or option.
    Count float64
    Units required for the missing product.
    Name string
    Name of the product.
    category String
    Product category base or option.
    count Double
    Units required for the missing product.
    name String
    Name of the product.
    category string
    Product category base or option.
    count number
    Units required for the missing product.
    name string
    Name of the product.
    category str
    Product category base or option.
    count float
    Units required for the missing product.
    name str
    Name of the product.
    category String
    Product category base or option.
    count Number
    Units required for the missing product.
    name String
    Name of the product.

    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 v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi