// *** WARNING: this file was generated by pulumi-language-dotnet. *** // *** 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 Maxvojtkov.Dokploy { [DokployResourceType("dokploy:index/redirect:Redirect")] public partial class Redirect : global::Pulumi.CustomResource { /// /// Application this redirect belongs to. /// [Output("applicationId")] public Output ApplicationId { get; private set; } = null!; /// /// RFC 3339 timestamp of when the redirect was created. /// [Output("createdAt")] public Output CreatedAt { get; private set; } = null!; /// /// Issue a permanent (301) redirect instead of a temporary (302) one. /// [Output("permanent")] public Output Permanent { get; private set; } = null!; /// /// Regular expression matched against the incoming URL. /// [Output("regex")] public Output Regex { get; private set; } = null!; /// /// Replacement URL, which may reference capture groups such as `${1}`. /// [Output("replacement")] public Output Replacement { get; private set; } = null!; /// /// Create a Redirect resource with the given unique name, arguments, and options. /// /// /// The unique name of the resource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Redirect(string name, RedirectArgs args, CustomResourceOptions? options = null) : base("dokploy:index/redirect:Redirect", name, args ?? new RedirectArgs(), MakeResourceOptions(options, "")) { } private Redirect(string name, Input id, RedirectState? state = null, CustomResourceOptions? options = null) : base("dokploy:index/redirect:Redirect", name, state, MakeResourceOptions(options, id)) { } private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) { var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}", }; 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; } /// /// Get an existing Redirect resource's state with the given name, ID, and optional extra /// properties used to qualify the lookup. /// /// /// The unique name of the resulting resource. /// The unique provider ID of the resource to lookup. /// Any extra arguments used during the lookup. /// A bag of options that control this resource's behavior public static Redirect Get(string name, Input id, RedirectState? state = null, CustomResourceOptions? options = null) { return new Redirect(name, id, state, options); } } public sealed class RedirectArgs : global::Pulumi.ResourceArgs { /// /// Application this redirect belongs to. /// [Input("applicationId", required: true)] public Input ApplicationId { get; set; } = null!; /// /// Issue a permanent (301) redirect instead of a temporary (302) one. /// [Input("permanent")] public Input? Permanent { get; set; } /// /// Regular expression matched against the incoming URL. /// [Input("regex", required: true)] public Input Regex { get; set; } = null!; /// /// Replacement URL, which may reference capture groups such as `${1}`. /// [Input("replacement", required: true)] public Input Replacement { get; set; } = null!; public RedirectArgs() { } public static new RedirectArgs Empty => new RedirectArgs(); } public sealed class RedirectState : global::Pulumi.ResourceArgs { /// /// Application this redirect belongs to. /// [Input("applicationId")] public Input? ApplicationId { get; set; } /// /// RFC 3339 timestamp of when the redirect was created. /// [Input("createdAt")] public Input? CreatedAt { get; set; } /// /// Issue a permanent (301) redirect instead of a temporary (302) one. /// [Input("permanent")] public Input? Permanent { get; set; } /// /// Regular expression matched against the incoming URL. /// [Input("regex")] public Input? Regex { get; set; } /// /// Replacement URL, which may reference capture groups such as `${1}`. /// [Input("replacement")] public Input? Replacement { get; set; } public RedirectState() { } public static new RedirectState Empty => new RedirectState(); } }