<reponame>pulumiverse/pulumi-vra// *** 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 GetSourceEntitlement
    {
        /// <summary>
        /// This data source provides information about a catalog source entitlement in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA catalog source entitlement by its id:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Catalog.GetSourceEntitlement.Invoke(new()
        ///     {
        ///         Id = @var.Catalog_source_entitlement_id,
        ///         ProjectId = @var.Project_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA catalog source entitlement by its catalog source id:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Catalog.GetSourceEntitlement.Invoke(new()
        ///     {
        ///         CatalogSourceId = @var.Catalog_source_id,
        ///         ProjectId = @var.Project_id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetSourceEntitlementResult> InvokeAsync(GetSourceEntitlementArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetSourceEntitlementResult>("vra:catalog/getSourceEntitlement:getSourceEntitlement", args ?? new GetSourceEntitlementArgs(), options.WithDefaults());

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


    public sealed class GetSourceEntitlementArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the catalog source to find the entitlement. One of `catalog_source_id` or `id` must be provided.
        /// </summary>
        [Input("catalogSourceId")]
        public string? CatalogSourceId { get; set; }

        /// <summary>
        /// The id of entitlement. One of `catalog_source_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 GetSourceEntitlementArgs()
        {
        }
        public static new GetSourceEntitlementArgs Empty => new GetSourceEntitlementArgs();
    }

    public sealed class GetSourceEntitlementInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the catalog source to find the entitlement. One of `catalog_source_id` or `id` must be provided.
        /// </summary>
        [Input("catalogSourceId")]
        public Input<string>? CatalogSourceId { get; set; }

        /// <summary>
        /// The id of entitlement. One of `catalog_source_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 GetSourceEntitlementInvokeArgs()
        {
        }
        public static new GetSourceEntitlementInvokeArgs Empty => new GetSourceEntitlementInvokeArgs();
    }


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

        [OutputConstructor]
        private GetSourceEntitlementResult(
            string? catalogSourceId,

            ImmutableArray<Outputs.GetSourceEntitlementDefinitionResult> definitions,

            string? id,

            string projectId)
        {
            CatalogSourceId = catalogSourceId;
            Definitions = definitions;
            Id = id;
            ProjectId = projectId;
        }
    }
}
