// *** 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.Tsf
{
    /// <summary>
    /// Provides a resource to create a tsf path_rewrite
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var pathRewrite = new Tencentcloud.Tsf.PathRewrite("pathRewrite", new Tencentcloud.Tsf.PathRewriteArgs
    ///         {
    ///             Blocked = "N",
    ///             GatewayGroupId = "group-a2j9zxpv",
    ///             Order = 2,
    ///             Regex = "/test",
    ///             Replacement = "/tt",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tsf path_rewrite can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tsf/pathRewrite:PathRewrite path_rewrite rewrite-nygq33v2
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tsf/pathRewrite:PathRewrite")]
    public partial class PathRewrite : Pulumi.CustomResource
    {
        /// <summary>
        /// Whether to shield the mapped path, Y: Yes N: No.
        /// </summary>
        [Output("blocked")]
        public Output<string> Blocked { get; private set; } = null!;

        /// <summary>
        /// gateway deployment group ID.
        /// </summary>
        [Output("gatewayGroupId")]
        public Output<string> GatewayGroupId { get; private set; } = null!;

        /// <summary>
        /// rule order, the smaller the higher the priority.
        /// </summary>
        [Output("order")]
        public Output<int> Order { get; private set; } = null!;

        /// <summary>
        /// path rewrite rule ID.
        /// </summary>
        [Output("pathRewriteId")]
        public Output<string> PathRewriteId { get; private set; } = null!;

        /// <summary>
        /// regular expression.
        /// </summary>
        [Output("regex")]
        public Output<string> Regex { get; private set; } = null!;

        /// <summary>
        /// content to replace.
        /// </summary>
        [Output("replacement")]
        public Output<string> Replacement { get; private set; } = null!;


        /// <summary>
        /// Create a PathRewrite 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 PathRewrite(string name, PathRewriteArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Tsf/pathRewrite:PathRewrite", name, args ?? new PathRewriteArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class PathRewriteArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to shield the mapped path, Y: Yes N: No.
        /// </summary>
        [Input("blocked", required: true)]
        public Input<string> Blocked { get; set; } = null!;

        /// <summary>
        /// gateway deployment group ID.
        /// </summary>
        [Input("gatewayGroupId", required: true)]
        public Input<string> GatewayGroupId { get; set; } = null!;

        /// <summary>
        /// rule order, the smaller the higher the priority.
        /// </summary>
        [Input("order", required: true)]
        public Input<int> Order { get; set; } = null!;

        /// <summary>
        /// regular expression.
        /// </summary>
        [Input("regex", required: true)]
        public Input<string> Regex { get; set; } = null!;

        /// <summary>
        /// content to replace.
        /// </summary>
        [Input("replacement", required: true)]
        public Input<string> Replacement { get; set; } = null!;

        public PathRewriteArgs()
        {
        }
    }

    public sealed class PathRewriteState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to shield the mapped path, Y: Yes N: No.
        /// </summary>
        [Input("blocked")]
        public Input<string>? Blocked { get; set; }

        /// <summary>
        /// gateway deployment group ID.
        /// </summary>
        [Input("gatewayGroupId")]
        public Input<string>? GatewayGroupId { get; set; }

        /// <summary>
        /// rule order, the smaller the higher the priority.
        /// </summary>
        [Input("order")]
        public Input<int>? Order { get; set; }

        /// <summary>
        /// path rewrite rule ID.
        /// </summary>
        [Input("pathRewriteId")]
        public Input<string>? PathRewriteId { get; set; }

        /// <summary>
        /// regular expression.
        /// </summary>
        [Input("regex")]
        public Input<string>? Regex { get; set; }

        /// <summary>
        /// content to replace.
        /// </summary>
        [Input("replacement")]
        public Input<string>? Replacement { get; set; }

        public PathRewriteState()
        {
        }
    }
}
