<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.Hbr
{
    /// <summary>
    /// Provides a Hybrid Backup Recovery (HBR) Hana Instance resource.
    /// 
    /// For information about Hybrid Backup Recovery (HBR) Hana Instance and how to use it, see [What is Hana Instance](https://www.alibabacloud.com/help/en/hybrid-backup-recovery/latest/api-doc-hbr-2017-09-08-api-doc-createhanainstance).
    /// 
    /// &gt; **NOTE:** Available in v1.178.0+.
    /// 
    /// &gt; **NOTE:** The `sid` attribute is required when destroying resources.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var exampleVault = new AliCloud.Hbr.Vault("exampleVault", new()
    ///     {
    ///         VaultName = @var.Name,
    ///     });
    /// 
    ///     var exampleResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
    ///     {
    ///         Status = "OK",
    ///     });
    /// 
    ///     var exampleHanaInstance = new AliCloud.Hbr.HanaInstance("exampleHanaInstance", new()
    ///     {
    ///         AlertSetting = "INHERITED",
    ///         HanaName = @var.Name,
    ///         Host = "1.1.1.1",
    ///         InstanceNumber = 1,
    ///         Password = "YouPassword123",
    ///         ResourceGroupId = exampleResourceGroups.Apply(getResourceGroupsResult =&gt; getResourceGroupsResult.Groups[0]?.Id),
    ///         Sid = "HXE",
    ///         UseSsl = false,
    ///         UserName = "admin",
    ///         ValidateCertificate = false,
    ///         VaultId = exampleVault.Id,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Hybrid Backup Recovery (HBR) Hana Instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:hbr/hanaInstance:HanaInstance example &lt;vault_id&gt;:&lt;hana_instance_id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:hbr/hanaInstance:HanaInstance")]
    public partial class HanaInstance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The alert settings. Valid value: `INHERITED`, which indicates that the backup client sends alert notifications in the same way as the backup vault.
        /// </summary>
        [Output("alertSetting")]
        public Output<string> AlertSetting { get; private set; } = null!;

        /// <summary>
        /// The IDs of ECS instances that host the SAP HANA instance to be registered. HBR installs backup clients on the specified ECS instances.
        /// </summary>
        [Output("ecsInstanceIds")]
        public Output<ImmutableArray<string>> EcsInstanceIds { get; private set; } = null!;

        /// <summary>
        /// The id of the Hana Instance.
        /// </summary>
        [Output("hanaInstanceId")]
        public Output<string> HanaInstanceId { get; private set; } = null!;

        /// <summary>
        /// The name of the SAP HANA instance.
        /// </summary>
        [Output("hanaName")]
        public Output<string?> HanaName { get; private set; } = null!;

        /// <summary>
        /// The private or internal IP address of the host where the primary node of the SAP HANA instance resides.
        /// </summary>
        [Output("host")]
        public Output<string?> Host { get; private set; } = null!;

        /// <summary>
        /// The instance number of the SAP HANA system.
        /// </summary>
        [Output("instanceNumber")]
        public Output<int?> InstanceNumber { get; private set; } = null!;

        /// <summary>
        /// The password that is used to connect with the SAP HANA database.
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

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

        /// <summary>
        /// The security identifier (SID) of the SAP HANA database.
        /// </summary>
        [Output("sid")]
        public Output<string?> Sid { get; private set; } = null!;

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

        /// <summary>
        /// Specifies whether to connect with the SAP HANA database over Secure Sockets Layer (SSL).
        /// </summary>
        [Output("useSsl")]
        public Output<bool?> UseSsl { get; private set; } = null!;

        /// <summary>
        /// The username of the SYSTEMDB database.
        /// </summary>
        [Output("userName")]
        public Output<string?> UserName { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to verify the SSL certificate of the SAP HANA database.
        /// </summary>
        [Output("validateCertificate")]
        public Output<bool?> ValidateCertificate { get; private set; } = null!;

        /// <summary>
        /// The ID of the backup vault.
        /// </summary>
        [Output("vaultId")]
        public Output<string> VaultId { get; private set; } = null!;


        /// <summary>
        /// Create a HanaInstance 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 HanaInstance(string name, HanaInstanceArgs args, CustomResourceOptions? options = null)
            : base("alicloud:hbr/hanaInstance:HanaInstance", name, args ?? new HanaInstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class HanaInstanceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The alert settings. Valid value: `INHERITED`, which indicates that the backup client sends alert notifications in the same way as the backup vault.
        /// </summary>
        [Input("alertSetting")]
        public Input<string>? AlertSetting { get; set; }

        [Input("ecsInstanceIds")]
        private InputList<string>? _ecsInstanceIds;

        /// <summary>
        /// The IDs of ECS instances that host the SAP HANA instance to be registered. HBR installs backup clients on the specified ECS instances.
        /// </summary>
        public InputList<string> EcsInstanceIds
        {
            get => _ecsInstanceIds ?? (_ecsInstanceIds = new InputList<string>());
            set => _ecsInstanceIds = value;
        }

        /// <summary>
        /// The name of the SAP HANA instance.
        /// </summary>
        [Input("hanaName")]
        public Input<string>? HanaName { get; set; }

        /// <summary>
        /// The private or internal IP address of the host where the primary node of the SAP HANA instance resides.
        /// </summary>
        [Input("host")]
        public Input<string>? Host { get; set; }

        /// <summary>
        /// The instance number of the SAP HANA system.
        /// </summary>
        [Input("instanceNumber")]
        public Input<int>? InstanceNumber { get; set; }

        /// <summary>
        /// The password that is used to connect with the SAP HANA database.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

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

        /// <summary>
        /// The security identifier (SID) of the SAP HANA database.
        /// </summary>
        [Input("sid")]
        public Input<string>? Sid { get; set; }

        /// <summary>
        /// Specifies whether to connect with the SAP HANA database over Secure Sockets Layer (SSL).
        /// </summary>
        [Input("useSsl")]
        public Input<bool>? UseSsl { get; set; }

        /// <summary>
        /// The username of the SYSTEMDB database.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { get; set; }

        /// <summary>
        /// Specifies whether to verify the SSL certificate of the SAP HANA database.
        /// </summary>
        [Input("validateCertificate")]
        public Input<bool>? ValidateCertificate { get; set; }

        /// <summary>
        /// The ID of the backup vault.
        /// </summary>
        [Input("vaultId", required: true)]
        public Input<string> VaultId { get; set; } = null!;

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

    public sealed class HanaInstanceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The alert settings. Valid value: `INHERITED`, which indicates that the backup client sends alert notifications in the same way as the backup vault.
        /// </summary>
        [Input("alertSetting")]
        public Input<string>? AlertSetting { get; set; }

        [Input("ecsInstanceIds")]
        private InputList<string>? _ecsInstanceIds;

        /// <summary>
        /// The IDs of ECS instances that host the SAP HANA instance to be registered. HBR installs backup clients on the specified ECS instances.
        /// </summary>
        public InputList<string> EcsInstanceIds
        {
            get => _ecsInstanceIds ?? (_ecsInstanceIds = new InputList<string>());
            set => _ecsInstanceIds = value;
        }

        /// <summary>
        /// The id of the Hana Instance.
        /// </summary>
        [Input("hanaInstanceId")]
        public Input<string>? HanaInstanceId { get; set; }

        /// <summary>
        /// The name of the SAP HANA instance.
        /// </summary>
        [Input("hanaName")]
        public Input<string>? HanaName { get; set; }

        /// <summary>
        /// The private or internal IP address of the host where the primary node of the SAP HANA instance resides.
        /// </summary>
        [Input("host")]
        public Input<string>? Host { get; set; }

        /// <summary>
        /// The instance number of the SAP HANA system.
        /// </summary>
        [Input("instanceNumber")]
        public Input<int>? InstanceNumber { get; set; }

        /// <summary>
        /// The password that is used to connect with the SAP HANA database.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

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

        /// <summary>
        /// The security identifier (SID) of the SAP HANA database.
        /// </summary>
        [Input("sid")]
        public Input<string>? Sid { get; set; }

        /// <summary>
        /// The status of the resource.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Specifies whether to connect with the SAP HANA database over Secure Sockets Layer (SSL).
        /// </summary>
        [Input("useSsl")]
        public Input<bool>? UseSsl { get; set; }

        /// <summary>
        /// The username of the SYSTEMDB database.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { get; set; }

        /// <summary>
        /// Specifies whether to verify the SSL certificate of the SAP HANA database.
        /// </summary>
        [Input("validateCertificate")]
        public Input<bool>? ValidateCertificate { get; set; }

        /// <summary>
        /// The ID of the backup vault.
        /// </summary>
        [Input("vaultId")]
        public Input<string>? VaultId { get; set; }

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