<gh_stars>0// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumiverse.Vra.Catalog
{
    public static class GetItemEntitlement
    {
        /// <summary>
        /// This data source provides information about a catalog item entitlement in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA catalog item entitlement by its id:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Catalog.GetItemEntitlement.Invoke(new()
        ///     {
        ///         Id = @var.Catalog_item_entitlement_id,
        ///         ProjectId = @var.Project_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA catalog item entitlement by its catalog item id:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Catalog.GetItemEntitlement.Invoke(new()
        ///     {
        ///         CatalogItemId = @var.Catalog_item_id,
        ///         ProjectId = @var.Project_id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetItemEntitlementResult> InvokeAsync(GetItemEntitlementArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetItemEntitlementResult>("vra:catalog/getItemEntitlement:getItemEntitlement", args ?? new GetItemEntitlementArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides information about a catalog item entitlement in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA catalog item entitlement by its id:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Catalog.GetItemEntitlement.Invoke(new()
        ///     {
        ///         Id = @var.Catalog_item_entitlement_id,
        ///         ProjectId = @var.Project_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA catalog item entitlement by its catalog item id:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Catalog.GetItemEntitlement.Invoke(new()
        ///     {
        ///         CatalogItemId = @var.Catalog_item_id,
        ///         ProjectId = @var.Project_id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetItemEntitlementResult> Invoke(GetItemEntitlementInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetItemEntitlementResult>("vra:catalog/getItemEntitlement:getItemEntitlement", args ?? new GetItemEntitlementInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetItemEntitlementArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the catalog item to find the entitlement. One of `catalog_item_id` or `id` must be provided.
        /// </summary>
        [Input("catalogItemId")]
        public string? CatalogItemId { get; set; }

        /// <summary>
        /// The id of entitlement. One of `catalog_item_id` or `id` must be provided.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// The id of the project that this entitlement belongs to.
        /// </summary>
        [Input("projectId", required: true)]
        public string ProjectId { get; set; } = null!;

        public GetItemEntitlementArgs()
        {
        }
        public static new GetItemEntitlementArgs Empty => new GetItemEntitlementArgs();
    }

    public sealed class GetItemEntitlementInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the catalog item to find the entitlement. One of `catalog_item_id` or `id` must be provided.
        /// </summary>
        [Input("catalogItemId")]
        public Input<string>? CatalogItemId { get; set; }

        /// <summary>
        /// The id of entitlement. One of `catalog_item_id` or `id` must be provided.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// The id of the project that this entitlement belongs to.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        public GetItemEntitlementInvokeArgs()
        {
        }
        public static new GetItemEntitlementInvokeArgs Empty => new GetItemEntitlementInvokeArgs();
    }


    [OutputType]
    public sealed class GetItemEntitlementResult
    {
        public readonly string? CatalogItemId;
        /// <summary>
        /// Represents a catalog item that is linked to a project via an entitlement.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetItemEntitlementDefinitionResult> Definitions;
        /// <summary>
        /// Id of the catalog item.
        /// </summary>
        public readonly string? Id;
        public readonly string ProjectId;

        [OutputConstructor]
        private GetItemEntitlementResult(
            string? catalogItemId,

            ImmutableArray<Outputs.GetItemEntitlementDefinitionResult> definitions,

            string? id,

            string projectId)
        {
            CatalogItemId = catalogItemId;
            Definitions = definitions;
            Id = id;
            ProjectId = projectId;
        }
    }
}
