// *** 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;

namespace Pulumi.AliCloud.CS
{
    [AliCloudResourceType("alicloud:cs/kubernetesPermission:KubernetesPermission")]
    public partial class KubernetesPermission : global::Pulumi.CustomResource
    {
        /// <summary>
        /// A list of user permission.
        /// </summary>
        [Output("permissions")]
        public Output<ImmutableArray<Outputs.KubernetesPermissionPermission>> Permissions { get; private set; } = null!;

        /// <summary>
        /// The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set `is_ram_role` to `true` during authorization.
        /// </summary>
        [Output("uid")]
        public Output<string> Uid { get; private set; } = null!;


        /// <summary>
        /// Create a KubernetesPermission resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public KubernetesPermission(string name, KubernetesPermissionArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cs/kubernetesPermission:KubernetesPermission", name, args ?? new KubernetesPermissionArgs(), MakeResourceOptions(options, ""))
        {
        }

        private KubernetesPermission(string name, Input<string> id, KubernetesPermissionState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cs/kubernetesPermission:KubernetesPermission", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing KubernetesPermission resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static KubernetesPermission Get(string name, Input<string> id, KubernetesPermissionState? state = null, CustomResourceOptions? options = null)
        {
            return new KubernetesPermission(name, id, state, options);
        }
    }

    public sealed class KubernetesPermissionArgs : global::Pulumi.ResourceArgs
    {
        [Input("permissions")]
        private InputList<Inputs.KubernetesPermissionPermissionArgs>? _permissions;

        /// <summary>
        /// A list of user permission.
        /// </summary>
        public InputList<Inputs.KubernetesPermissionPermissionArgs> Permissions
        {
            get => _permissions ?? (_permissions = new InputList<Inputs.KubernetesPermissionPermissionArgs>());
            set => _permissions = value;
        }

        /// <summary>
        /// The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set `is_ram_role` to `true` during authorization.
        /// </summary>
        [Input("uid", required: true)]
        public Input<string> Uid { get; set; } = null!;

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

    public sealed class KubernetesPermissionState : global::Pulumi.ResourceArgs
    {
        [Input("permissions")]
        private InputList<Inputs.KubernetesPermissionPermissionGetArgs>? _permissions;

        /// <summary>
        /// A list of user permission.
        /// </summary>
        public InputList<Inputs.KubernetesPermissionPermissionGetArgs> Permissions
        {
            get => _permissions ?? (_permissions = new InputList<Inputs.KubernetesPermissionPermissionGetArgs>());
            set => _permissions = value;
        }

        /// <summary>
        /// The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set `is_ram_role` to `true` during authorization.
        /// </summary>
        [Input("uid")]
        public Input<string>? Uid { get; set; }

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