// *** 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.Tcr
{
    /// <summary>
    /// Use this resource to create tcr namespace.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var foo = new Tencentcloud.Tcr.Namespace("foo", new Tencentcloud.Tcr.NamespaceArgs
    ///         {
    ///             CveWhitelistItems = 
    ///             {
    ///                 new Tencentcloud.Tcr.Inputs.NamespaceCveWhitelistItemArgs
    ///                 {
    ///                     CveId = "cve-xxxxx",
    ///                 },
    ///             },
    ///             InstanceId = "",
    ///             IsAutoScan = true,
    ///             IsPreventVul = true,
    ///             IsPublic = true,
    ///             Severity = "medium",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tcr namespace can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tcr/namespace:Namespace foo cls-cda1iex1#namespace
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tcr/namespace:Namespace")]
    public partial class Namespace : Pulumi.CustomResource
    {
        /// <summary>
        /// Vulnerability Whitelist.
        /// </summary>
        [Output("cveWhitelistItems")]
        public Output<ImmutableArray<Outputs.NamespaceCveWhitelistItem>> CveWhitelistItems { get; private set; } = null!;

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

        /// <summary>
        /// Scanning level, `True` is automatic, `False` is manual. Default is `false`.
        /// </summary>
        [Output("isAutoScan")]
        public Output<bool?> IsAutoScan { get; private set; } = null!;

        /// <summary>
        /// Blocking switch, `True` is open, `False` is closed. Default is `false`.
        /// </summary>
        [Output("isPreventVul")]
        public Output<bool?> IsPreventVul { get; private set; } = null!;

        /// <summary>
        /// Indicate that the namespace is public or not. Default is `false`.
        /// </summary>
        [Output("isPublic")]
        public Output<bool?> IsPublic { get; private set; } = null!;

        /// <summary>
        /// Name of the TCR namespace. Valid length is [2~30]. It can only contain lowercase letters, numbers and separators (`.`, `_`, `-`), and cannot start, end or continue with separators.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Block vulnerability level, currently only supports `low`, `medium`, `high`.
        /// </summary>
        [Output("severity")]
        public Output<string?> Severity { get; private set; } = null!;


        /// <summary>
        /// Create a Namespace 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 Namespace(string name, NamespaceArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Tcr/namespace:Namespace", name, args ?? new NamespaceArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class NamespaceArgs : Pulumi.ResourceArgs
    {
        [Input("cveWhitelistItems")]
        private InputList<Inputs.NamespaceCveWhitelistItemArgs>? _cveWhitelistItems;

        /// <summary>
        /// Vulnerability Whitelist.
        /// </summary>
        public InputList<Inputs.NamespaceCveWhitelistItemArgs> CveWhitelistItems
        {
            get => _cveWhitelistItems ?? (_cveWhitelistItems = new InputList<Inputs.NamespaceCveWhitelistItemArgs>());
            set => _cveWhitelistItems = value;
        }

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

        /// <summary>
        /// Scanning level, `True` is automatic, `False` is manual. Default is `false`.
        /// </summary>
        [Input("isAutoScan")]
        public Input<bool>? IsAutoScan { get; set; }

        /// <summary>
        /// Blocking switch, `True` is open, `False` is closed. Default is `false`.
        /// </summary>
        [Input("isPreventVul")]
        public Input<bool>? IsPreventVul { get; set; }

        /// <summary>
        /// Indicate that the namespace is public or not. Default is `false`.
        /// </summary>
        [Input("isPublic")]
        public Input<bool>? IsPublic { get; set; }

        /// <summary>
        /// Name of the TCR namespace. Valid length is [2~30]. It can only contain lowercase letters, numbers and separators (`.`, `_`, `-`), and cannot start, end or continue with separators.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Block vulnerability level, currently only supports `low`, `medium`, `high`.
        /// </summary>
        [Input("severity")]
        public Input<string>? Severity { get; set; }

        public NamespaceArgs()
        {
        }
    }

    public sealed class NamespaceState : Pulumi.ResourceArgs
    {
        [Input("cveWhitelistItems")]
        private InputList<Inputs.NamespaceCveWhitelistItemGetArgs>? _cveWhitelistItems;

        /// <summary>
        /// Vulnerability Whitelist.
        /// </summary>
        public InputList<Inputs.NamespaceCveWhitelistItemGetArgs> CveWhitelistItems
        {
            get => _cveWhitelistItems ?? (_cveWhitelistItems = new InputList<Inputs.NamespaceCveWhitelistItemGetArgs>());
            set => _cveWhitelistItems = value;
        }

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

        /// <summary>
        /// Scanning level, `True` is automatic, `False` is manual. Default is `false`.
        /// </summary>
        [Input("isAutoScan")]
        public Input<bool>? IsAutoScan { get; set; }

        /// <summary>
        /// Blocking switch, `True` is open, `False` is closed. Default is `false`.
        /// </summary>
        [Input("isPreventVul")]
        public Input<bool>? IsPreventVul { get; set; }

        /// <summary>
        /// Indicate that the namespace is public or not. Default is `false`.
        /// </summary>
        [Input("isPublic")]
        public Input<bool>? IsPublic { get; set; }

        /// <summary>
        /// Name of the TCR namespace. Valid length is [2~30]. It can only contain lowercase letters, numbers and separators (`.`, `_`, `-`), and cannot start, end or continue with separators.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Block vulnerability level, currently only supports `low`, `medium`, `high`.
        /// </summary>
        [Input("severity")]
        public Input<string>? Severity { get; set; }

        public NamespaceState()
        {
        }
    }
}
