// *** 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.Audit
{
    /// <summary>
    /// Provides a resource to create a audit track
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var track = new Tencentcloud.Audit.Track("track", new Tencentcloud.Audit.TrackArgs
    ///         {
    ///             ActionType = "Read",
    ///             EventNames = 
    ///             {
    ///                 "*",
    ///             },
    ///             ResourceType = "*",
    ///             Status = 1,
    ///             Storage = new Tencentcloud.Audit.Inputs.TrackStorageArgs
    ///             {
    ///                 StorageName = "db90b92c-91d2-46b0-94ac-debbbb21dc4e",
    ///                 StoragePrefix = "cloudaudit",
    ///                 StorageRegion = "ap-guangzhou",
    ///                 StorageType = "cls",
    ///             },
    ///             TrackForAllMembers = 0,
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// audit track can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Audit/track:Track track track_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Audit/track:Track")]
    public partial class Track : Pulumi.CustomResource
    {
        /// <summary>
        /// Track interface type, optional:- `Read`: Read interface- `Write`: Write interface- `*`: All interface.
        /// </summary>
        [Output("actionType")]
        public Output<string> ActionType { get; private set; } = null!;

        /// <summary>
        /// Track create time.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Track interface name list:- when ResourceType is `*`, EventNames is must `[&amp;amp;quot;*&amp;amp;quot;]`- when ResourceType is a single product, EventNames support all interface:`[&amp;amp;quot;*&amp;amp;quot;]`- when ResourceType is a single product, EventNames support some interface, up to 10.
        /// </summary>
        [Output("eventNames")]
        public Output<ImmutableArray<string>> EventNames { get; private set; } = null!;

        /// <summary>
        /// Track name.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Track product, optional:- `*`: All product- Single product, such as `cos`.
        /// </summary>
        [Output("resourceType")]
        public Output<string> ResourceType { get; private set; } = null!;

        /// <summary>
        /// Track status, optional:- `0`: Close- `1`: Open.
        /// </summary>
        [Output("status")]
        public Output<int> Status { get; private set; } = null!;

        /// <summary>
        /// Track Storage, support `cos` and `cls`.
        /// </summary>
        [Output("storage")]
        public Output<Outputs.TrackStorage> Storage { get; private set; } = null!;

        /// <summary>
        /// Whether to enable the delivery of group member operation logs to the group management account or trusted service management account, optional:- `0`: Close- `1`: Open.
        /// </summary>
        [Output("trackForAllMembers")]
        public Output<int?> TrackForAllMembers { get; private set; } = null!;


        /// <summary>
        /// Create a Track 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 Track(string name, TrackArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Audit/track:Track", name, args ?? new TrackArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Track(string name, Input<string> id, TrackState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Audit/track:Track", 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 Track 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 Track Get(string name, Input<string> id, TrackState? state = null, CustomResourceOptions? options = null)
        {
            return new Track(name, id, state, options);
        }
    }

    public sealed class TrackArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Track interface type, optional:- `Read`: Read interface- `Write`: Write interface- `*`: All interface.
        /// </summary>
        [Input("actionType", required: true)]
        public Input<string> ActionType { get; set; } = null!;

        [Input("eventNames", required: true)]
        private InputList<string>? _eventNames;

        /// <summary>
        /// Track interface name list:- when ResourceType is `*`, EventNames is must `[&amp;amp;quot;*&amp;amp;quot;]`- when ResourceType is a single product, EventNames support all interface:`[&amp;amp;quot;*&amp;amp;quot;]`- when ResourceType is a single product, EventNames support some interface, up to 10.
        /// </summary>
        public InputList<string> EventNames
        {
            get => _eventNames ?? (_eventNames = new InputList<string>());
            set => _eventNames = value;
        }

        /// <summary>
        /// Track name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Track product, optional:- `*`: All product- Single product, such as `cos`.
        /// </summary>
        [Input("resourceType", required: true)]
        public Input<string> ResourceType { get; set; } = null!;

        /// <summary>
        /// Track status, optional:- `0`: Close- `1`: Open.
        /// </summary>
        [Input("status", required: true)]
        public Input<int> Status { get; set; } = null!;

        /// <summary>
        /// Track Storage, support `cos` and `cls`.
        /// </summary>
        [Input("storage", required: true)]
        public Input<Inputs.TrackStorageArgs> Storage { get; set; } = null!;

        /// <summary>
        /// Whether to enable the delivery of group member operation logs to the group management account or trusted service management account, optional:- `0`: Close- `1`: Open.
        /// </summary>
        [Input("trackForAllMembers")]
        public Input<int>? TrackForAllMembers { get; set; }

        public TrackArgs()
        {
        }
    }

    public sealed class TrackState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Track interface type, optional:- `Read`: Read interface- `Write`: Write interface- `*`: All interface.
        /// </summary>
        [Input("actionType")]
        public Input<string>? ActionType { get; set; }

        /// <summary>
        /// Track create time.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        [Input("eventNames")]
        private InputList<string>? _eventNames;

        /// <summary>
        /// Track interface name list:- when ResourceType is `*`, EventNames is must `[&amp;amp;quot;*&amp;amp;quot;]`- when ResourceType is a single product, EventNames support all interface:`[&amp;amp;quot;*&amp;amp;quot;]`- when ResourceType is a single product, EventNames support some interface, up to 10.
        /// </summary>
        public InputList<string> EventNames
        {
            get => _eventNames ?? (_eventNames = new InputList<string>());
            set => _eventNames = value;
        }

        /// <summary>
        /// Track name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Track product, optional:- `*`: All product- Single product, such as `cos`.
        /// </summary>
        [Input("resourceType")]
        public Input<string>? ResourceType { get; set; }

        /// <summary>
        /// Track status, optional:- `0`: Close- `1`: Open.
        /// </summary>
        [Input("status")]
        public Input<int>? Status { get; set; }

        /// <summary>
        /// Track Storage, support `cos` and `cls`.
        /// </summary>
        [Input("storage")]
        public Input<Inputs.TrackStorageGetArgs>? Storage { get; set; }

        /// <summary>
        /// Whether to enable the delivery of group member operation logs to the group management account or trusted service management account, optional:- `0`: Close- `1`: Open.
        /// </summary>
        [Input("trackForAllMembers")]
        public Input<int>? TrackForAllMembers { get; set; }

        public TrackState()
        {
        }
    }
}
