<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.Nas
{
    /// <summary>
    /// Provides a Nas File System resource.
    /// 
    /// After activating NAS, you can create a file system and purchase a storage package for it in the NAS console. The NAS console also enables you to view the file system details and remove unnecessary file systems.
    /// 
    /// For information about NAS file system and how to use it, see [Manage file systems](https://www.alibabacloud.com/help/doc-detail/27530.htm)
    /// 
    /// &gt; **NOTE:** Available in v1.33.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var foo = new AliCloud.Nas.FileSystem("foo", new()
    ///     {
    ///         Description = "tf-testAccNasConfig",
    ///         EncryptType = 1,
    ///         ProtocolType = "NFS",
    ///         StorageType = "Performance",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var foo = new AliCloud.Nas.FileSystem("foo", new()
    ///     {
    ///         Capacity = 100,
    ///         Description = "tf-testAccNasConfig",
    ///         FileSystemType = "extreme",
    ///         ProtocolType = "NFS",
    ///         StorageType = "standard",
    ///         ZoneId = "cn-hangzhou-f",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultZones = AliCloud.Nas.GetZones.Invoke(new()
    ///     {
    ///         FileSystemType = "cpfs",
    ///     });
    /// 
    ///     var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
    ///     {
    ///         NameRegex = "default-NODELETING",
    ///     });
    /// 
    ///     var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
    ///     {
    ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
    ///         ZoneId = defaultZones.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.ZoneId),
    ///     });
    /// 
    ///     var foo = new AliCloud.Nas.FileSystem("foo", new()
    ///     {
    ///         ProtocolType = "cpfs",
    ///         StorageType = "advance_200",
    ///         FileSystemType = "cpfs",
    ///         Capacity = 3600,
    ///         Description = "tf-testacc",
    ///         ZoneId = defaultZones.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.ZoneId),
    ///         VpcId = defaultNetworks.Apply(getNetworksResult =&gt; getNetworksResult.Ids[0]),
    ///         VswitchId = defaultSwitches.Apply(getSwitchesResult =&gt; getSwitchesResult.Ids[0]),
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Nas File System can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:nas/fileSystem:FileSystem foo 1337849c59
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:nas/fileSystem:FileSystem")]
    public partial class FileSystem : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The capacity of the file system. The `capacity` is required when the `file_system_type` is `extreme`.
        /// Unit: gib; **Note**: The minimum value is 100.
        /// </summary>
        [Output("capacity")]
        public Output<int> Capacity { get; private set; } = null!;

        /// <summary>
        /// The File System description.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Whether the file system is encrypted. Using kms service escrow key to encrypt and store the file system data. When reading and writing encrypted data, there is no need to decrypt. 
        /// * Valid values:
        /// </summary>
        [Output("encryptType")]
        public Output<int?> EncryptType { get; private set; } = null!;

        /// <summary>
        /// the type of the file system. 
        /// Valid values:
        /// `standard` (Default),
        /// `extreme`,
        /// `cpfs`.
        /// </summary>
        [Output("fileSystemType")]
        public Output<string?> FileSystemType { get; private set; } = null!;

        /// <summary>
        /// The id of the KMS key. The `kms_key_id` is required when the `encrypt_type` is `2`.
        /// </summary>
        [Output("kmsKeyId")]
        public Output<string> KmsKeyId { get; private set; } = null!;

        /// <summary>
        /// The protocol type of the file system.
        /// Valid values:
        /// `NFS`,
        /// `SMB` (Available when the `file_system_type` is `standard`),
        /// `cpfs` (Available when the `file_system_type` is `cpfs`).
        /// </summary>
        [Output("protocolType")]
        public Output<string> ProtocolType { get; private set; } = null!;

        /// <summary>
        /// The storage type of the file System. 
        /// * Valid values:
        /// </summary>
        [Output("storageType")]
        public Output<string> StorageType { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The id of the VPC. The `vpc_id` is required when the `file_system_type` is `cpfs`.
        /// </summary>
        [Output("vpcId")]
        public Output<string?> VpcId { get; private set; } = null!;

        /// <summary>
        /// The id of the vSwitch. The `vswitch_id` is required when the `file_system_type` is `cpfs`.
        /// </summary>
        [Output("vswitchId")]
        public Output<string?> VswitchId { get; private set; } = null!;

        /// <summary>
        /// The available zones information that supports nas.When FileSystemType=standard, this parameter is not required. **Note:** By default, a qualified availability zone is randomly selected according to the `protocol_type` and `storage_type` configuration.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a FileSystem 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 FileSystem(string name, FileSystemArgs args, CustomResourceOptions? options = null)
            : base("alicloud:nas/fileSystem:FileSystem", name, args ?? new FileSystemArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class FileSystemArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The capacity of the file system. The `capacity` is required when the `file_system_type` is `extreme`.
        /// Unit: gib; **Note**: The minimum value is 100.
        /// </summary>
        [Input("capacity")]
        public Input<int>? Capacity { get; set; }

        /// <summary>
        /// The File System description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Whether the file system is encrypted. Using kms service escrow key to encrypt and store the file system data. When reading and writing encrypted data, there is no need to decrypt. 
        /// * Valid values:
        /// </summary>
        [Input("encryptType")]
        public Input<int>? EncryptType { get; set; }

        /// <summary>
        /// the type of the file system. 
        /// Valid values:
        /// `standard` (Default),
        /// `extreme`,
        /// `cpfs`.
        /// </summary>
        [Input("fileSystemType")]
        public Input<string>? FileSystemType { get; set; }

        /// <summary>
        /// The id of the KMS key. The `kms_key_id` is required when the `encrypt_type` is `2`.
        /// </summary>
        [Input("kmsKeyId")]
        public Input<string>? KmsKeyId { get; set; }

        /// <summary>
        /// The protocol type of the file system.
        /// Valid values:
        /// `NFS`,
        /// `SMB` (Available when the `file_system_type` is `standard`),
        /// `cpfs` (Available when the `file_system_type` is `cpfs`).
        /// </summary>
        [Input("protocolType", required: true)]
        public Input<string> ProtocolType { get; set; } = null!;

        /// <summary>
        /// The storage type of the file System. 
        /// * Valid values:
        /// </summary>
        [Input("storageType", required: true)]
        public Input<string> StorageType { get; set; } = null!;

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The id of the VPC. The `vpc_id` is required when the `file_system_type` is `cpfs`.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The id of the vSwitch. The `vswitch_id` is required when the `file_system_type` is `cpfs`.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The available zones information that supports nas.When FileSystemType=standard, this parameter is not required. **Note:** By default, a qualified availability zone is randomly selected according to the `protocol_type` and `storage_type` configuration.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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

    public sealed class FileSystemState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The capacity of the file system. The `capacity` is required when the `file_system_type` is `extreme`.
        /// Unit: gib; **Note**: The minimum value is 100.
        /// </summary>
        [Input("capacity")]
        public Input<int>? Capacity { get; set; }

        /// <summary>
        /// The File System description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Whether the file system is encrypted. Using kms service escrow key to encrypt and store the file system data. When reading and writing encrypted data, there is no need to decrypt. 
        /// * Valid values:
        /// </summary>
        [Input("encryptType")]
        public Input<int>? EncryptType { get; set; }

        /// <summary>
        /// the type of the file system. 
        /// Valid values:
        /// `standard` (Default),
        /// `extreme`,
        /// `cpfs`.
        /// </summary>
        [Input("fileSystemType")]
        public Input<string>? FileSystemType { get; set; }

        /// <summary>
        /// The id of the KMS key. The `kms_key_id` is required when the `encrypt_type` is `2`.
        /// </summary>
        [Input("kmsKeyId")]
        public Input<string>? KmsKeyId { get; set; }

        /// <summary>
        /// The protocol type of the file system.
        /// Valid values:
        /// `NFS`,
        /// `SMB` (Available when the `file_system_type` is `standard`),
        /// `cpfs` (Available when the `file_system_type` is `cpfs`).
        /// </summary>
        [Input("protocolType")]
        public Input<string>? ProtocolType { get; set; }

        /// <summary>
        /// The storage type of the file System. 
        /// * Valid values:
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The id of the VPC. The `vpc_id` is required when the `file_system_type` is `cpfs`.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The id of the vSwitch. The `vswitch_id` is required when the `file_system_type` is `cpfs`.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The available zones information that supports nas.When FileSystemType=standard, this parameter is not required. **Note:** By default, a qualified availability zone is randomly selected according to the `protocol_type` and `storage_type` configuration.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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