<filename>sdk/dotnet/GetPermission.cs// *** 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 PiersKarsenbarg.Nutanix
{
    public static class GetPermission
    {
        /// <summary>
        /// Describe a Nutanix Permission and its values (if it has them).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var byuuid = Output.Create(Nutanix.GetPermission.InvokeAsync(new Nutanix.GetPermissionArgs
        ///         {
        ///             PermissionId = "26b81a55-2bca-48c6-9fab-4f82c6bb4284",
        ///         }));
        ///         var byname = Output.Create(Nutanix.GetPermission.InvokeAsync(new Nutanix.GetPermissionArgs
        ///         {
        ///             PermissionName = "Access_Console_Virtual_Machine",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetPermissionResult> InvokeAsync(GetPermissionArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetPermissionResult>("nutanix:index/getPermission:getPermission", args ?? new GetPermissionArgs(), options.WithDefaults());

        /// <summary>
        /// Describe a Nutanix Permission and its values (if it has them).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var byuuid = Output.Create(Nutanix.GetPermission.InvokeAsync(new Nutanix.GetPermissionArgs
        ///         {
        ///             PermissionId = "26b81a55-2bca-48c6-9fab-4f82c6bb4284",
        ///         }));
        ///         var byname = Output.Create(Nutanix.GetPermission.InvokeAsync(new Nutanix.GetPermissionArgs
        ///         {
        ///             PermissionName = "Access_Console_Virtual_Machine",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetPermissionResult> Invoke(GetPermissionInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetPermissionResult>("nutanix:index/getPermission:getPermission", args ?? new GetPermissionInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetPermissionArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private List<Inputs.GetPermissionCategoryArgs>? _categories;
        public List<Inputs.GetPermissionCategoryArgs> Categories
        {
            get => _categories ?? (_categories = new List<Inputs.GetPermissionCategoryArgs>());
            set => _categories = value;
        }

        [Input("permissionId")]
        public string? PermissionId { get; set; }

        [Input("permissionName")]
        public string? PermissionName { get; set; }

        public GetPermissionArgs()
        {
        }
    }

    public sealed class GetPermissionInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private InputList<Inputs.GetPermissionCategoryInputArgs>? _categories;
        public InputList<Inputs.GetPermissionCategoryInputArgs> Categories
        {
            get => _categories ?? (_categories = new InputList<Inputs.GetPermissionCategoryInputArgs>());
            set => _categories = value;
        }

        [Input("permissionId")]
        public Input<string>? PermissionId { get; set; }

        [Input("permissionName")]
        public Input<string>? PermissionName { get; set; }

        public GetPermissionInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetPermissionResult
    {
        public readonly string ApiVersion;
        public readonly ImmutableArray<Outputs.GetPermissionCategoryResult> Categories;
        public readonly string Description;
        public readonly ImmutableArray<Outputs.GetPermissionFieldResult> Fields;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// (Required) The kind name (Default value: `project`).
        /// </summary>
        public readonly string Kind;
        public readonly ImmutableDictionary<string, string> Metadata;
        /// <summary>
        /// the name.
        /// </summary>
        public readonly string Name;
        public readonly string Operation;
        public readonly ImmutableDictionary<string, string> OwnerReference;
        public readonly string? PermissionId;
        public readonly string? PermissionName;
        public readonly ImmutableDictionary<string, string> ProjectReference;
        public readonly string State;

        [OutputConstructor]
        private GetPermissionResult(
            string apiVersion,

            ImmutableArray<Outputs.GetPermissionCategoryResult> categories,

            string description,

            ImmutableArray<Outputs.GetPermissionFieldResult> fields,

            string id,

            string kind,

            ImmutableDictionary<string, string> metadata,

            string name,

            string operation,

            ImmutableDictionary<string, string> ownerReference,

            string? permissionId,

            string? permissionName,

            ImmutableDictionary<string, string> projectReference,

            string state)
        {
            ApiVersion = apiVersion;
            Categories = categories;
            Description = description;
            Fields = fields;
            Id = id;
            Kind = kind;
            Metadata = metadata;
            Name = name;
            Operation = operation;
            OwnerReference = ownerReference;
            PermissionId = permissionId;
            PermissionName = permissionName;
            ProjectReference = projectReference;
            State = state;
        }
    }
}
