// *** 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.AliCloud.CR
{
    /// <summary>
    /// Provides a CR Chart Namespace resource.
    /// 
    /// For information about CR Chart Namespace and how to use it, see [What is Chart Namespace](https://www.alibabacloud.com/help/doc-detail/145313.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.149.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultRegistryEnterpriseInstance = new AliCloud.CR.RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance", new()
    ///     {
    ///         PaymentType = "Subscription",
    ///         Period = 1,
    ///         InstanceType = "Advanced",
    ///         InstanceName = "name",
    ///     });
    /// 
    ///     var defaultChartNamespace = new AliCloud.CR.ChartNamespace("defaultChartNamespace", new()
    ///     {
    ///         InstanceId = defaultRegistryEnterpriseInstance.Id,
    ///         NamespaceName = "name",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// CR Chart Namespace can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cr/chartNamespace:ChartNamespace example &lt;instance_id&gt;:&lt;namespace_name&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cr/chartNamespace:ChartNamespace")]
    public partial class ChartNamespace : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Specifies whether to automatically create repositories in the namespace. Valid values:
        /// </summary>
        [Output("autoCreateRepo")]
        public Output<bool> AutoCreateRepo { get; private set; } = null!;

        /// <summary>
        /// DefaultRepoType. Valid values: `PRIVATE`, `PUBLIC`.
        /// </summary>
        [Output("defaultRepoType")]
        public Output<string> DefaultRepoType { get; private set; } = null!;

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

        /// <summary>
        /// The name of the namespace that you want to create.
        /// </summary>
        [Output("namespaceName")]
        public Output<string> NamespaceName { get; private set; } = null!;


        /// <summary>
        /// Create a ChartNamespace 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 ChartNamespace(string name, ChartNamespaceArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cr/chartNamespace:ChartNamespace", name, args ?? new ChartNamespaceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ChartNamespace(string name, Input<string> id, ChartNamespaceState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cr/chartNamespace:ChartNamespace", 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/rhysmdnz/pulumi-alicloud",
            };
            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 ChartNamespace 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 ChartNamespace Get(string name, Input<string> id, ChartNamespaceState? state = null, CustomResourceOptions? options = null)
        {
            return new ChartNamespace(name, id, state, options);
        }
    }

    public sealed class ChartNamespaceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specifies whether to automatically create repositories in the namespace. Valid values:
        /// </summary>
        [Input("autoCreateRepo")]
        public Input<bool>? AutoCreateRepo { get; set; }

        /// <summary>
        /// DefaultRepoType. Valid values: `PRIVATE`, `PUBLIC`.
        /// </summary>
        [Input("defaultRepoType")]
        public Input<string>? DefaultRepoType { get; set; }

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

        /// <summary>
        /// The name of the namespace that you want to create.
        /// </summary>
        [Input("namespaceName", required: true)]
        public Input<string> NamespaceName { get; set; } = null!;

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

    public sealed class ChartNamespaceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specifies whether to automatically create repositories in the namespace. Valid values:
        /// </summary>
        [Input("autoCreateRepo")]
        public Input<bool>? AutoCreateRepo { get; set; }

        /// <summary>
        /// DefaultRepoType. Valid values: `PRIVATE`, `PUBLIC`.
        /// </summary>
        [Input("defaultRepoType")]
        public Input<string>? DefaultRepoType { get; set; }

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

        /// <summary>
        /// The name of the namespace that you want to create.
        /// </summary>
        [Input("namespaceName")]
        public Input<string>? NamespaceName { get; set; }

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