<reponame>Kagashino/pulumi-tctest// *** 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.Tctest.Dayu
{
    [TctestResourceType("tctest:Dayu/ddosPolicy:DdosPolicy")]
    public partial class DdosPolicy : Pulumi.CustomResource
    {
        /// <summary>
        /// Black IP list.
        /// </summary>
        [Output("blackIps")]
        public Output<ImmutableArray<string>> BlackIps { get; private set; } = null!;

        /// <summary>
        /// Create time of the DDoS policy.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Option list of abnormal check of the DDos policy, should set at least one policy.
        /// </summary>
        [Output("dropOptions")]
        public Output<ImmutableArray<Outputs.DdosPolicyDropOption>> DropOptions { get; private set; } = null!;

        /// <summary>
        /// Name of the DDoS policy. Length should between 1 and 32.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Message filter options list.
        /// </summary>
        [Output("packetFilters")]
        public Output<ImmutableArray<Outputs.DdosPolicyPacketFilter>> PacketFilters { get; private set; } = null!;

        /// <summary>
        /// Id of policy.
        /// </summary>
        [Output("policyId")]
        public Output<string> PolicyId { get; private set; } = null!;

        /// <summary>
        /// Port limits of abnormal check of the DDos policy.
        /// </summary>
        [Output("portFilters")]
        public Output<ImmutableArray<Outputs.DdosPolicyPortFilter>> PortFilters { get; private set; } = null!;

        /// <summary>
        /// Type of the resource that the DDoS policy works for. Valid values: `bgpip`, `bgp`, `bgp-multip` and `net`.
        /// </summary>
        [Output("resourceType")]
        public Output<string> ResourceType { get; private set; } = null!;

        /// <summary>
        /// Id of policy case that the DDoS policy works for.
        /// </summary>
        [Output("sceneId")]
        public Output<string> SceneId { get; private set; } = null!;

        /// <summary>
        /// Watermark policy options, and only support one watermark policy at most.
        /// </summary>
        [Output("watermarkFilters")]
        public Output<ImmutableArray<Outputs.DdosPolicyWatermarkFilter>> WatermarkFilters { get; private set; } = null!;

        /// <summary>
        /// Watermark content.
        /// </summary>
        [Output("watermarkKeys")]
        public Output<ImmutableArray<Outputs.DdosPolicyWatermarkKey>> WatermarkKeys { get; private set; } = null!;

        /// <summary>
        /// White IP list.
        /// </summary>
        [Output("whiteIps")]
        public Output<ImmutableArray<string>> WhiteIps { get; private set; } = null!;


        /// <summary>
        /// Create a DdosPolicy 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 DdosPolicy(string name, DdosPolicyArgs args, CustomResourceOptions? options = null)
            : base("tctest:Dayu/ddosPolicy:DdosPolicy", name, args ?? new DdosPolicyArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DdosPolicy(string name, Input<string> id, DdosPolicyState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Dayu/ddosPolicy:DdosPolicy", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 DdosPolicy 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 DdosPolicy Get(string name, Input<string> id, DdosPolicyState? state = null, CustomResourceOptions? options = null)
        {
            return new DdosPolicy(name, id, state, options);
        }
    }

    public sealed class DdosPolicyArgs : Pulumi.ResourceArgs
    {
        [Input("blackIps")]
        private InputList<string>? _blackIps;

        /// <summary>
        /// Black IP list.
        /// </summary>
        public InputList<string> BlackIps
        {
            get => _blackIps ?? (_blackIps = new InputList<string>());
            set => _blackIps = value;
        }

        [Input("dropOptions", required: true)]
        private InputList<Inputs.DdosPolicyDropOptionArgs>? _dropOptions;

        /// <summary>
        /// Option list of abnormal check of the DDos policy, should set at least one policy.
        /// </summary>
        public InputList<Inputs.DdosPolicyDropOptionArgs> DropOptions
        {
            get => _dropOptions ?? (_dropOptions = new InputList<Inputs.DdosPolicyDropOptionArgs>());
            set => _dropOptions = value;
        }

        /// <summary>
        /// Name of the DDoS policy. Length should between 1 and 32.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("packetFilters")]
        private InputList<Inputs.DdosPolicyPacketFilterArgs>? _packetFilters;

        /// <summary>
        /// Message filter options list.
        /// </summary>
        public InputList<Inputs.DdosPolicyPacketFilterArgs> PacketFilters
        {
            get => _packetFilters ?? (_packetFilters = new InputList<Inputs.DdosPolicyPacketFilterArgs>());
            set => _packetFilters = value;
        }

        [Input("portFilters")]
        private InputList<Inputs.DdosPolicyPortFilterArgs>? _portFilters;

        /// <summary>
        /// Port limits of abnormal check of the DDos policy.
        /// </summary>
        public InputList<Inputs.DdosPolicyPortFilterArgs> PortFilters
        {
            get => _portFilters ?? (_portFilters = new InputList<Inputs.DdosPolicyPortFilterArgs>());
            set => _portFilters = value;
        }

        /// <summary>
        /// Type of the resource that the DDoS policy works for. Valid values: `bgpip`, `bgp`, `bgp-multip` and `net`.
        /// </summary>
        [Input("resourceType", required: true)]
        public Input<string> ResourceType { get; set; } = null!;

        [Input("watermarkFilters")]
        private InputList<Inputs.DdosPolicyWatermarkFilterArgs>? _watermarkFilters;

        /// <summary>
        /// Watermark policy options, and only support one watermark policy at most.
        /// </summary>
        public InputList<Inputs.DdosPolicyWatermarkFilterArgs> WatermarkFilters
        {
            get => _watermarkFilters ?? (_watermarkFilters = new InputList<Inputs.DdosPolicyWatermarkFilterArgs>());
            set => _watermarkFilters = value;
        }

        [Input("whiteIps")]
        private InputList<string>? _whiteIps;

        /// <summary>
        /// White IP list.
        /// </summary>
        public InputList<string> WhiteIps
        {
            get => _whiteIps ?? (_whiteIps = new InputList<string>());
            set => _whiteIps = value;
        }

        public DdosPolicyArgs()
        {
        }
    }

    public sealed class DdosPolicyState : Pulumi.ResourceArgs
    {
        [Input("blackIps")]
        private InputList<string>? _blackIps;

        /// <summary>
        /// Black IP list.
        /// </summary>
        public InputList<string> BlackIps
        {
            get => _blackIps ?? (_blackIps = new InputList<string>());
            set => _blackIps = value;
        }

        /// <summary>
        /// Create time of the DDoS policy.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        [Input("dropOptions")]
        private InputList<Inputs.DdosPolicyDropOptionGetArgs>? _dropOptions;

        /// <summary>
        /// Option list of abnormal check of the DDos policy, should set at least one policy.
        /// </summary>
        public InputList<Inputs.DdosPolicyDropOptionGetArgs> DropOptions
        {
            get => _dropOptions ?? (_dropOptions = new InputList<Inputs.DdosPolicyDropOptionGetArgs>());
            set => _dropOptions = value;
        }

        /// <summary>
        /// Name of the DDoS policy. Length should between 1 and 32.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("packetFilters")]
        private InputList<Inputs.DdosPolicyPacketFilterGetArgs>? _packetFilters;

        /// <summary>
        /// Message filter options list.
        /// </summary>
        public InputList<Inputs.DdosPolicyPacketFilterGetArgs> PacketFilters
        {
            get => _packetFilters ?? (_packetFilters = new InputList<Inputs.DdosPolicyPacketFilterGetArgs>());
            set => _packetFilters = value;
        }

        /// <summary>
        /// Id of policy.
        /// </summary>
        [Input("policyId")]
        public Input<string>? PolicyId { get; set; }

        [Input("portFilters")]
        private InputList<Inputs.DdosPolicyPortFilterGetArgs>? _portFilters;

        /// <summary>
        /// Port limits of abnormal check of the DDos policy.
        /// </summary>
        public InputList<Inputs.DdosPolicyPortFilterGetArgs> PortFilters
        {
            get => _portFilters ?? (_portFilters = new InputList<Inputs.DdosPolicyPortFilterGetArgs>());
            set => _portFilters = value;
        }

        /// <summary>
        /// Type of the resource that the DDoS policy works for. Valid values: `bgpip`, `bgp`, `bgp-multip` and `net`.
        /// </summary>
        [Input("resourceType")]
        public Input<string>? ResourceType { get; set; }

        /// <summary>
        /// Id of policy case that the DDoS policy works for.
        /// </summary>
        [Input("sceneId")]
        public Input<string>? SceneId { get; set; }

        [Input("watermarkFilters")]
        private InputList<Inputs.DdosPolicyWatermarkFilterGetArgs>? _watermarkFilters;

        /// <summary>
        /// Watermark policy options, and only support one watermark policy at most.
        /// </summary>
        public InputList<Inputs.DdosPolicyWatermarkFilterGetArgs> WatermarkFilters
        {
            get => _watermarkFilters ?? (_watermarkFilters = new InputList<Inputs.DdosPolicyWatermarkFilterGetArgs>());
            set => _watermarkFilters = value;
        }

        [Input("watermarkKeys")]
        private InputList<Inputs.DdosPolicyWatermarkKeyGetArgs>? _watermarkKeys;

        /// <summary>
        /// Watermark content.
        /// </summary>
        public InputList<Inputs.DdosPolicyWatermarkKeyGetArgs> WatermarkKeys
        {
            get => _watermarkKeys ?? (_watermarkKeys = new InputList<Inputs.DdosPolicyWatermarkKeyGetArgs>());
            set => _watermarkKeys = value;
        }

        [Input("whiteIps")]
        private InputList<string>? _whiteIps;

        /// <summary>
        /// White IP list.
        /// </summary>
        public InputList<string> WhiteIps
        {
            get => _whiteIps ?? (_whiteIps = new InputList<string>());
            set => _whiteIps = value;
        }

        public DdosPolicyState()
        {
        }
    }
}
