// *** 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/port:Port")]
public partial class Port : global::Pulumi.CustomResource
{
///
/// Application this port belongs to.
///
[Output("applicationId")]
public Output ApplicationId { get; private set; } = null!;
///
/// Transport protocol. Valid values: `Tcp`, `Udp`.
///
[Output("protocol")]
public Output Protocol { get; private set; } = null!;
///
/// Docker Swarm publish mode. `Host` binds directly to the node; `Ingress` uses the swarm routing mesh. Valid values: `Ingress`, `Host`.
///
[Output("publishMode")]
public Output PublishMode { get; private set; } = null!;
///
/// Port exposed on the host.
///
[Output("publishedPort")]
public Output PublishedPort { get; private set; } = null!;
///
/// Port the container listens on.
///
[Output("targetPort")]
public Output TargetPort { get; private set; } = null!;
///
/// Create a Port 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 Port(string name, PortArgs args, CustomResourceOptions? options = null)
: base("dokploy:index/port:Port", name, args ?? new PortArgs(), MakeResourceOptions(options, ""))
{
}
private Port(string name, Input id, PortState? state = null, CustomResourceOptions? options = null)
: base("dokploy:index/port:Port", name, state, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
};
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 Port 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 Port Get(string name, Input id, PortState? state = null, CustomResourceOptions? options = null)
{
return new Port(name, id, state, options);
}
}
public sealed class PortArgs : global::Pulumi.ResourceArgs
{
///
/// Application this port belongs to.
///
[Input("applicationId", required: true)]
public Input ApplicationId { get; set; } = null!;
///
/// Transport protocol. Valid values: `Tcp`, `Udp`.
///
[Input("protocol", required: true)]
public Input Protocol { get; set; } = null!;
///
/// Docker Swarm publish mode. `Host` binds directly to the node; `Ingress` uses the swarm routing mesh. Valid values: `Ingress`, `Host`.
///
[Input("publishMode")]
public Input? PublishMode { get; set; }
///
/// Port exposed on the host.
///
[Input("publishedPort", required: true)]
public Input PublishedPort { get; set; } = null!;
///
/// Port the container listens on.
///
[Input("targetPort", required: true)]
public Input TargetPort { get; set; } = null!;
public PortArgs()
{
}
public static new PortArgs Empty => new PortArgs();
}
public sealed class PortState : global::Pulumi.ResourceArgs
{
///
/// Application this port belongs to.
///
[Input("applicationId")]
public Input? ApplicationId { get; set; }
///
/// Transport protocol. Valid values: `Tcp`, `Udp`.
///
[Input("protocol")]
public Input? Protocol { get; set; }
///
/// Docker Swarm publish mode. `Host` binds directly to the node; `Ingress` uses the swarm routing mesh. Valid values: `Ingress`, `Host`.
///
[Input("publishMode")]
public Input? PublishMode { get; set; }
///
/// Port exposed on the host.
///
[Input("publishedPort")]
public Input? PublishedPort { get; set; }
///
/// Port the container listens on.
///
[Input("targetPort")]
public Input? TargetPort { get; set; }
public PortState()
{
}
public static new PortState Empty => new PortState();
}
}