// *** 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 TencentCloudIAC.PulumiPackage.Tencentcloud.Vpc
{
    /// <summary>
    /// Provides a resource to create a vpc flow_log
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var flowLog = new Tencentcloud.Vpc.FlowLog("flowLog", new Tencentcloud.Vpc.FlowLogArgs
    ///         {
    ///             CloudLogId = "a1b2c3d4-e5f6a7b8-c9d0e1f2-a3b4c5d6",
    ///             FlowLogDescription = "My testing log",
    ///             FlowLogName = "foo",
    ///             ResourceId = "eni-xxxxxxxx",
    ///             ResourceType = "NETWORKINTERFACE",
    ///             StorageType = "cls",
    ///             Tags = 
    ///             {
    ///                 { "createdBy", "terraform" },
    ///             },
    ///             TrafficType = "ALL",
    ///             VpcId = "vpc-xxxxxxxx",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// vpc flow_log can be imported using the flow log Id combine vpc Id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Vpc/flowLog:FlowLog flow_log flow_log_id fl-xxxx1234#vpc-yyyy5678
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Vpc/flowLog:FlowLog")]
    public partial class FlowLog : Pulumi.CustomResource
    {
        /// <summary>
        /// Specify flow log storage id.
        /// </summary>
        [Output("cloudLogId")]
        public Output<string?> CloudLogId { get; private set; } = null!;

        /// <summary>
        /// Specify flow log storage region, default using current.
        /// </summary>
        [Output("cloudLogRegion")]
        public Output<string> CloudLogRegion { get; private set; } = null!;

        /// <summary>
        /// Specify flow Log description.
        /// </summary>
        [Output("flowLogDescription")]
        public Output<string?> FlowLogDescription { get; private set; } = null!;

        /// <summary>
        /// Specify flow log name.
        /// </summary>
        [Output("flowLogName")]
        public Output<string> FlowLogName { get; private set; } = null!;

        /// <summary>
        /// Specify consumer detail, required while `storage_type` is `ckafka`.
        /// </summary>
        [Output("flowLogStorage")]
        public Output<Outputs.FlowLogFlowLogStorage> FlowLogStorage { get; private set; } = null!;

        /// <summary>
        /// Specify resource unique Id of `resource_type` configured.
        /// </summary>
        [Output("resourceId")]
        public Output<string> ResourceId { get; private set; } = null!;

        /// <summary>
        /// Specify resource type. NOTE: Only support `NETWORKINTERFACE` for now. Values: `VPC`, `SUBNET`, `NETWORKINTERFACE`, `CCN`, `NAT`, `DCG`.
        /// </summary>
        [Output("resourceType")]
        public Output<string> ResourceType { get; private set; } = null!;

        /// <summary>
        /// Specify consumer type, values: `cls`, `ckafka`.
        /// </summary>
        [Output("storageType")]
        public Output<string?> StorageType { get; private set; } = null!;

        /// <summary>
        /// Tag description list.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// Specify log traffic type, values: `ACCEPT`, `REJECT`, `ALL`.
        /// </summary>
        [Output("trafficType")]
        public Output<string> TrafficType { get; private set; } = null!;

        /// <summary>
        /// Specify vpc Id, ignore while `resource_type` is `CCN` (unsupported) but required while other types.
        /// </summary>
        [Output("vpcId")]
        public Output<string?> VpcId { get; private set; } = null!;


        /// <summary>
        /// Create a FlowLog 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 FlowLog(string name, FlowLogArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Vpc/flowLog:FlowLog", name, args ?? new FlowLogArgs(), MakeResourceOptions(options, ""))
        {
        }

        private FlowLog(string name, Input<string> id, FlowLogState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Vpc/flowLog:FlowLog", 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/tencentcloudstack",
            };
            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 FlowLog 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 FlowLog Get(string name, Input<string> id, FlowLogState? state = null, CustomResourceOptions? options = null)
        {
            return new FlowLog(name, id, state, options);
        }
    }

    public sealed class FlowLogArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify flow log storage id.
        /// </summary>
        [Input("cloudLogId")]
        public Input<string>? CloudLogId { get; set; }

        /// <summary>
        /// Specify flow log storage region, default using current.
        /// </summary>
        [Input("cloudLogRegion")]
        public Input<string>? CloudLogRegion { get; set; }

        /// <summary>
        /// Specify flow Log description.
        /// </summary>
        [Input("flowLogDescription")]
        public Input<string>? FlowLogDescription { get; set; }

        /// <summary>
        /// Specify flow log name.
        /// </summary>
        [Input("flowLogName", required: true)]
        public Input<string> FlowLogName { get; set; } = null!;

        /// <summary>
        /// Specify consumer detail, required while `storage_type` is `ckafka`.
        /// </summary>
        [Input("flowLogStorage")]
        public Input<Inputs.FlowLogFlowLogStorageArgs>? FlowLogStorage { get; set; }

        /// <summary>
        /// Specify resource unique Id of `resource_type` configured.
        /// </summary>
        [Input("resourceId", required: true)]
        public Input<string> ResourceId { get; set; } = null!;

        /// <summary>
        /// Specify resource type. NOTE: Only support `NETWORKINTERFACE` for now. Values: `VPC`, `SUBNET`, `NETWORKINTERFACE`, `CCN`, `NAT`, `DCG`.
        /// </summary>
        [Input("resourceType", required: true)]
        public Input<string> ResourceType { get; set; } = null!;

        /// <summary>
        /// Specify consumer type, values: `cls`, `ckafka`.
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

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

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Specify log traffic type, values: `ACCEPT`, `REJECT`, `ALL`.
        /// </summary>
        [Input("trafficType", required: true)]
        public Input<string> TrafficType { get; set; } = null!;

        /// <summary>
        /// Specify vpc Id, ignore while `resource_type` is `CCN` (unsupported) but required while other types.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        public FlowLogArgs()
        {
        }
    }

    public sealed class FlowLogState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify flow log storage id.
        /// </summary>
        [Input("cloudLogId")]
        public Input<string>? CloudLogId { get; set; }

        /// <summary>
        /// Specify flow log storage region, default using current.
        /// </summary>
        [Input("cloudLogRegion")]
        public Input<string>? CloudLogRegion { get; set; }

        /// <summary>
        /// Specify flow Log description.
        /// </summary>
        [Input("flowLogDescription")]
        public Input<string>? FlowLogDescription { get; set; }

        /// <summary>
        /// Specify flow log name.
        /// </summary>
        [Input("flowLogName")]
        public Input<string>? FlowLogName { get; set; }

        /// <summary>
        /// Specify consumer detail, required while `storage_type` is `ckafka`.
        /// </summary>
        [Input("flowLogStorage")]
        public Input<Inputs.FlowLogFlowLogStorageGetArgs>? FlowLogStorage { get; set; }

        /// <summary>
        /// Specify resource unique Id of `resource_type` configured.
        /// </summary>
        [Input("resourceId")]
        public Input<string>? ResourceId { get; set; }

        /// <summary>
        /// Specify resource type. NOTE: Only support `NETWORKINTERFACE` for now. Values: `VPC`, `SUBNET`, `NETWORKINTERFACE`, `CCN`, `NAT`, `DCG`.
        /// </summary>
        [Input("resourceType")]
        public Input<string>? ResourceType { get; set; }

        /// <summary>
        /// Specify consumer type, values: `cls`, `ckafka`.
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

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

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Specify log traffic type, values: `ACCEPT`, `REJECT`, `ALL`.
        /// </summary>
        [Input("trafficType")]
        public Input<string>? TrafficType { get; set; }

        /// <summary>
        /// Specify vpc Id, ignore while `resource_type` is `CCN` (unsupported) but required while other types.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        public FlowLogState()
        {
        }
    }
}
