<filename>sdk/dotnet/Pvtz/UserVpcAuthorization.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;

namespace Pulumi.AliCloud.Pvtz
{
    /// <summary>
    /// Provides a Private Zone User Vpc Authorization resource.
    /// 
    /// &gt; **NOTE:** Available in v1.138.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new AliCloud.Pvtz.UserVpcAuthorization("example", new()
    ///     {
    ///         AuthChannel = "RESOURCE_DIRECTORY",
    ///         AuthType = "NORMAL",
    ///         AuthorizedUserId = "example_value",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Private Zone User Vpc Authorization can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:pvtz/userVpcAuthorization:UserVpcAuthorization example &lt;authorized_user_id&gt;:&lt;auth_type&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:pvtz/userVpcAuthorization:UserVpcAuthorization")]
    public partial class UserVpcAuthorization : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The auth channel. Valid values: `RESOURCE_DIRECTORY`.
        /// </summary>
        [Output("authChannel")]
        public Output<string?> AuthChannel { get; private set; } = null!;

        /// <summary>
        /// The type of Authorization. Valid values: `NORMAL` and `CLOUD_PRODUCT`.
        /// </summary>
        [Output("authType")]
        public Output<string?> AuthType { get; private set; } = null!;

        /// <summary>
        /// The primary account ID of the user who authorizes the resource.
        /// </summary>
        [Output("authorizedUserId")]
        public Output<string> AuthorizedUserId { get; private set; } = null!;


        /// <summary>
        /// Create a UserVpcAuthorization 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 UserVpcAuthorization(string name, UserVpcAuthorizationArgs args, CustomResourceOptions? options = null)
            : base("alicloud:pvtz/userVpcAuthorization:UserVpcAuthorization", name, args ?? new UserVpcAuthorizationArgs(), MakeResourceOptions(options, ""))
        {
        }

        private UserVpcAuthorization(string name, Input<string> id, UserVpcAuthorizationState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:pvtz/userVpcAuthorization:UserVpcAuthorization", 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 UserVpcAuthorization 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 UserVpcAuthorization Get(string name, Input<string> id, UserVpcAuthorizationState? state = null, CustomResourceOptions? options = null)
        {
            return new UserVpcAuthorization(name, id, state, options);
        }
    }

    public sealed class UserVpcAuthorizationArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The auth channel. Valid values: `RESOURCE_DIRECTORY`.
        /// </summary>
        [Input("authChannel")]
        public Input<string>? AuthChannel { get; set; }

        /// <summary>
        /// The type of Authorization. Valid values: `NORMAL` and `CLOUD_PRODUCT`.
        /// </summary>
        [Input("authType")]
        public Input<string>? AuthType { get; set; }

        /// <summary>
        /// The primary account ID of the user who authorizes the resource.
        /// </summary>
        [Input("authorizedUserId", required: true)]
        public Input<string> AuthorizedUserId { get; set; } = null!;

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

    public sealed class UserVpcAuthorizationState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The auth channel. Valid values: `RESOURCE_DIRECTORY`.
        /// </summary>
        [Input("authChannel")]
        public Input<string>? AuthChannel { get; set; }

        /// <summary>
        /// The type of Authorization. Valid values: `NORMAL` and `CLOUD_PRODUCT`.
        /// </summary>
        [Input("authType")]
        public Input<string>? AuthType { get; set; }

        /// <summary>
        /// The primary account ID of the user who authorizes the resource.
        /// </summary>
        [Input("authorizedUserId")]
        public Input<string>? AuthorizedUserId { get; set; }

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