<gh_stars>0// *** 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;
using Pulumi;

namespace luxifer.Scaleway
{
    /// <summary>
    /// Creates and manages Scaleway Database instance authorized IPs.
    /// For more information, see [the documentation](https://developers.scaleway.com/en/products/rdb/api/#acl-rules-allowed-ips).
    /// 
    /// ## Examples
    /// 
    /// ### Basic
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Scaleway = luxifer.Scaleway;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var main = new Scaleway.RdbAcl("main", new()
    ///     {
    ///         InstanceId = scaleway_rdb_instance.Main.Id,
    ///         AclRules = new[]
    ///         {
    ///             new Scaleway.Inputs.RdbAclAclRuleArgs
    ///             {
    ///                 Ip = "1.2.3.4/32",
    ///                 Description = "foo",
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Database Instance can be imported using the `{region}/{id}`, e.g. bash
    /// 
    /// ```sh
    ///  $ pulumi import scaleway:index/rdbAcl:RdbAcl acl01 fr-par/11111111-1111-1111-1111-111111111111
    /// ```
    /// </summary>
    [ScalewayResourceType("scaleway:index/rdbAcl:RdbAcl")]
    public partial class RdbAcl : global::Pulumi.CustomResource
    {
        /// <summary>
        /// A list of ACLs (structure is described below)
        /// </summary>
        [Output("aclRules")]
        public Output<ImmutableArray<Outputs.RdbAclAclRule>> AclRules { get; private set; } = null!;

        /// <summary>
        /// UUID of the rdb instance.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// `region`) The region in which the Database Instance should be created.
        /// </summary>
        [Output("region")]
        public Output<string> Region { get; private set; } = null!;


        /// <summary>
        /// Create a RdbAcl 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 RdbAcl(string name, RdbAclArgs args, CustomResourceOptions? options = null)
            : base("scaleway:index/rdbAcl:RdbAcl", name, args ?? new RdbAclArgs(), MakeResourceOptions(options, ""))
        {
        }

        private RdbAcl(string name, Input<string> id, RdbAclState? state = null, CustomResourceOptions? options = null)
            : base("scaleway:index/rdbAcl:RdbAcl", 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/luxifer/pulumi-scaleway",
            };
            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 RdbAcl 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 RdbAcl Get(string name, Input<string> id, RdbAclState? state = null, CustomResourceOptions? options = null)
        {
            return new RdbAcl(name, id, state, options);
        }
    }

    public sealed class RdbAclArgs : global::Pulumi.ResourceArgs
    {
        [Input("aclRules", required: true)]
        private InputList<Inputs.RdbAclAclRuleArgs>? _aclRules;

        /// <summary>
        /// A list of ACLs (structure is described below)
        /// </summary>
        public InputList<Inputs.RdbAclAclRuleArgs> AclRules
        {
            get => _aclRules ?? (_aclRules = new InputList<Inputs.RdbAclAclRuleArgs>());
            set => _aclRules = value;
        }

        /// <summary>
        /// UUID of the rdb instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// `region`) The region in which the Database Instance should be created.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

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

    public sealed class RdbAclState : global::Pulumi.ResourceArgs
    {
        [Input("aclRules")]
        private InputList<Inputs.RdbAclAclRuleGetArgs>? _aclRules;

        /// <summary>
        /// A list of ACLs (structure is described below)
        /// </summary>
        public InputList<Inputs.RdbAclAclRuleGetArgs> AclRules
        {
            get => _aclRules ?? (_aclRules = new InputList<Inputs.RdbAclAclRuleGetArgs>());
            set => _aclRules = value;
        }

        /// <summary>
        /// UUID of the rdb instance.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// `region`) The region in which the Database Instance should be created.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

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