<filename>sdk/dotnet/GraphDatabase/DbInstance.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.GraphDatabase
{
    /// <summary>
    /// Provides a Graph Database Db Instance resource.
    /// 
    /// For information about Graph Database Db Instance and how to use it, see [What is Db Instance](https://help.aliyun.com/document_detail/102865.html).
    /// 
    /// &gt; **NOTE:** Available in v1.136.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.GraphDatabase.DbInstance("example", new()
    ///     {
    ///         DbInstanceCategory = "HA",
    ///         DbInstanceDescription = "example_value",
    ///         DbInstanceNetworkType = "vpc",
    ///         DbInstanceStorageType = "cloud_ssd",
    ///         DbNodeClass = "gdb.r.2xlarge",
    ///         DbNodeStorage = "example_value",
    ///         DbVersion = "1.0",
    ///         PaymentType = "PayAsYouGo",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Graph Database Db Instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:graphdatabase/dbInstance:DbInstance example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:graphdatabase/dbInstance:DbInstance")]
    public partial class DbInstance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// (Available in 1.196.0+)  The connection string of the instance.
        /// </summary>
        [Output("connectionString")]
        public Output<string> ConnectionString { get; private set; } = null!;

        /// <summary>
        /// The category of the db instance. Valid values: `HA`, `SINGLE`(Available in 1.173.0+).
        /// </summary>
        [Output("dbInstanceCategory")]
        public Output<string> DbInstanceCategory { get; private set; } = null!;

        /// <summary>
        /// According to the practical example or notes.
        /// </summary>
        [Output("dbInstanceDescription")]
        public Output<string?> DbInstanceDescription { get; private set; } = null!;

        /// <summary>
        /// IP ADDRESS whitelist for the instance group list. See the following `Block db_instance_ip_array`.
        /// </summary>
        [Output("dbInstanceIpArrays")]
        public Output<ImmutableArray<Outputs.DbInstanceDbInstanceIpArray>> DbInstanceIpArrays { get; private set; } = null!;

        /// <summary>
        /// The network type of the db instance. Valid values: `vpc`.
        /// </summary>
        [Output("dbInstanceNetworkType")]
        public Output<string> DbInstanceNetworkType { get; private set; } = null!;

        /// <summary>
        /// Disk storage type. Valid values: `cloud_essd`, `cloud_ssd`. Modification is not supported.
        /// </summary>
        [Output("dbInstanceStorageType")]
        public Output<string> DbInstanceStorageType { get; private set; } = null!;

        /// <summary>
        /// The class of the db node. Valid values: `gdb.r.xlarge`, `gdb.r.2xlarge`, `gdb.r.4xlarge`, `gdb.r.8xlarge`, `gdb.r.16xlarge`, `gdb.r.xlarge_basic`, `gdb.r.2xlarge_basic`, `gdb.r.4xlarge_basic`, `gdb.r.8xlarge_basic`, `gdb.r.16xlarge_basic`.
        /// </summary>
        [Output("dbNodeClass")]
        public Output<string> DbNodeClass { get; private set; } = null!;

        /// <summary>
        /// Instance storage space, which is measured in GB.
        /// </summary>
        [Output("dbNodeStorage")]
        public Output<int> DbNodeStorage { get; private set; } = null!;

        /// <summary>
        /// Kernel Version. Valid values: `1.0` or `1.0-OpenCypher`. `1.0`: represented as gremlin, `1.0-OpenCypher`: said opencypher.
        /// </summary>
        [Output("dbVersion")]
        public Output<string> DbVersion { get; private set; } = null!;

        /// <summary>
        /// The paymen type of the resource. Valid values: `PayAsYouGo`.
        /// </summary>
        [Output("paymentType")]
        public Output<string> PaymentType { get; private set; } = null!;

        /// <summary>
        /// (Available in 1.196.0+) The connection port of the instance.
        /// </summary>
        [Output("port")]
        public Output<string> Port { get; private set; } = null!;

        /// <summary>
        /// Instance status. Value range: `Creating`, `Running`, `Deleting`, `Rebooting`, `DBInstanceClassChanging`, `NetAddressCreating` and `NetAddressDeleting`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// ID of the VPC.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;

        /// <summary>
        /// The ID of attaching vswitch to instance.
        /// </summary>
        [Output("vswitchId")]
        public Output<string> VswitchId { get; private set; } = null!;

        /// <summary>
        /// The zone ID of the resource.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a DbInstance 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 DbInstance(string name, DbInstanceArgs args, CustomResourceOptions? options = null)
            : base("alicloud:graphdatabase/dbInstance:DbInstance", name, args ?? new DbInstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class DbInstanceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The category of the db instance. Valid values: `HA`, `SINGLE`(Available in 1.173.0+).
        /// </summary>
        [Input("dbInstanceCategory", required: true)]
        public Input<string> DbInstanceCategory { get; set; } = null!;

        /// <summary>
        /// According to the practical example or notes.
        /// </summary>
        [Input("dbInstanceDescription")]
        public Input<string>? DbInstanceDescription { get; set; }

        [Input("dbInstanceIpArrays")]
        private InputList<Inputs.DbInstanceDbInstanceIpArrayArgs>? _dbInstanceIpArrays;

        /// <summary>
        /// IP ADDRESS whitelist for the instance group list. See the following `Block db_instance_ip_array`.
        /// </summary>
        public InputList<Inputs.DbInstanceDbInstanceIpArrayArgs> DbInstanceIpArrays
        {
            get => _dbInstanceIpArrays ?? (_dbInstanceIpArrays = new InputList<Inputs.DbInstanceDbInstanceIpArrayArgs>());
            set => _dbInstanceIpArrays = value;
        }

        /// <summary>
        /// The network type of the db instance. Valid values: `vpc`.
        /// </summary>
        [Input("dbInstanceNetworkType", required: true)]
        public Input<string> DbInstanceNetworkType { get; set; } = null!;

        /// <summary>
        /// Disk storage type. Valid values: `cloud_essd`, `cloud_ssd`. Modification is not supported.
        /// </summary>
        [Input("dbInstanceStorageType", required: true)]
        public Input<string> DbInstanceStorageType { get; set; } = null!;

        /// <summary>
        /// The class of the db node. Valid values: `gdb.r.xlarge`, `gdb.r.2xlarge`, `gdb.r.4xlarge`, `gdb.r.8xlarge`, `gdb.r.16xlarge`, `gdb.r.xlarge_basic`, `gdb.r.2xlarge_basic`, `gdb.r.4xlarge_basic`, `gdb.r.8xlarge_basic`, `gdb.r.16xlarge_basic`.
        /// </summary>
        [Input("dbNodeClass", required: true)]
        public Input<string> DbNodeClass { get; set; } = null!;

        /// <summary>
        /// Instance storage space, which is measured in GB.
        /// </summary>
        [Input("dbNodeStorage", required: true)]
        public Input<int> DbNodeStorage { get; set; } = null!;

        /// <summary>
        /// Kernel Version. Valid values: `1.0` or `1.0-OpenCypher`. `1.0`: represented as gremlin, `1.0-OpenCypher`: said opencypher.
        /// </summary>
        [Input("dbVersion", required: true)]
        public Input<string> DbVersion { get; set; } = null!;

        /// <summary>
        /// The paymen type of the resource. Valid values: `PayAsYouGo`.
        /// </summary>
        [Input("paymentType", required: true)]
        public Input<string> PaymentType { get; set; } = null!;

        /// <summary>
        /// ID of the VPC.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The ID of attaching vswitch to instance.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The zone ID of the resource.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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

    public sealed class DbInstanceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// (Available in 1.196.0+)  The connection string of the instance.
        /// </summary>
        [Input("connectionString")]
        public Input<string>? ConnectionString { get; set; }

        /// <summary>
        /// The category of the db instance. Valid values: `HA`, `SINGLE`(Available in 1.173.0+).
        /// </summary>
        [Input("dbInstanceCategory")]
        public Input<string>? DbInstanceCategory { get; set; }

        /// <summary>
        /// According to the practical example or notes.
        /// </summary>
        [Input("dbInstanceDescription")]
        public Input<string>? DbInstanceDescription { get; set; }

        [Input("dbInstanceIpArrays")]
        private InputList<Inputs.DbInstanceDbInstanceIpArrayGetArgs>? _dbInstanceIpArrays;

        /// <summary>
        /// IP ADDRESS whitelist for the instance group list. See the following `Block db_instance_ip_array`.
        /// </summary>
        public InputList<Inputs.DbInstanceDbInstanceIpArrayGetArgs> DbInstanceIpArrays
        {
            get => _dbInstanceIpArrays ?? (_dbInstanceIpArrays = new InputList<Inputs.DbInstanceDbInstanceIpArrayGetArgs>());
            set => _dbInstanceIpArrays = value;
        }

        /// <summary>
        /// The network type of the db instance. Valid values: `vpc`.
        /// </summary>
        [Input("dbInstanceNetworkType")]
        public Input<string>? DbInstanceNetworkType { get; set; }

        /// <summary>
        /// Disk storage type. Valid values: `cloud_essd`, `cloud_ssd`. Modification is not supported.
        /// </summary>
        [Input("dbInstanceStorageType")]
        public Input<string>? DbInstanceStorageType { get; set; }

        /// <summary>
        /// The class of the db node. Valid values: `gdb.r.xlarge`, `gdb.r.2xlarge`, `gdb.r.4xlarge`, `gdb.r.8xlarge`, `gdb.r.16xlarge`, `gdb.r.xlarge_basic`, `gdb.r.2xlarge_basic`, `gdb.r.4xlarge_basic`, `gdb.r.8xlarge_basic`, `gdb.r.16xlarge_basic`.
        /// </summary>
        [Input("dbNodeClass")]
        public Input<string>? DbNodeClass { get; set; }

        /// <summary>
        /// Instance storage space, which is measured in GB.
        /// </summary>
        [Input("dbNodeStorage")]
        public Input<int>? DbNodeStorage { get; set; }

        /// <summary>
        /// Kernel Version. Valid values: `1.0` or `1.0-OpenCypher`. `1.0`: represented as gremlin, `1.0-OpenCypher`: said opencypher.
        /// </summary>
        [Input("dbVersion")]
        public Input<string>? DbVersion { get; set; }

        /// <summary>
        /// The paymen type of the resource. Valid values: `PayAsYouGo`.
        /// </summary>
        [Input("paymentType")]
        public Input<string>? PaymentType { get; set; }

        /// <summary>
        /// (Available in 1.196.0+) The connection port of the instance.
        /// </summary>
        [Input("port")]
        public Input<string>? Port { get; set; }

        /// <summary>
        /// Instance status. Value range: `Creating`, `Running`, `Deleting`, `Rebooting`, `DBInstanceClassChanging`, `NetAddressCreating` and `NetAddressDeleting`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// ID of the VPC.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The ID of attaching vswitch to instance.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The zone ID of the resource.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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