1. Registry
  2. Packages
  3. Dokploy
  4. API Docs
  5. Port
Viewing docs for Dokploy v0.4.4
published on Thursday, Nov 5, 2026 by dimeskigj
dokploy logo Dokploy
Viewing docs for Dokploy v0.4.4
published on Thursday, Nov 5, 2026 by dimeskigj

    A Dokploy application port mapping.

    Create Port Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Port(name: string, args: PortArgs, opts?: CustomResourceOptions);
    @overload
    def Port(resource_name: str,
             args: PortArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Port(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             application_id: Optional[str] = None,
             published_port: Optional[int] = None,
             target_port: Optional[int] = None,
             protocol: Optional[PortProtocol] = None,
             publish_mode: Optional[PortPublishMode] = None)
    func NewPort(ctx *Context, name string, args PortArgs, opts ...ResourceOption) (*Port, error)
    public Port(string name, PortArgs args, CustomResourceOptions? opts = null)
    public Port(String name, PortArgs args)
    public Port(String name, PortArgs args, CustomResourceOptions options)
    
    type: dokploy:Port
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dokploy_port" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PortArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PortArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PortArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PortArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PortArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var portResource = new Dokploy.Port("portResource", new()
    {
        ApplicationId = "string",
        PublishedPort = 0,
        TargetPort = 0,
        Protocol = Dokploy.PortProtocol.Tcp,
        PublishMode = Dokploy.PortPublishMode.Ingress,
    });
    
    example, err := dokploy.NewPort(ctx, "portResource", &dokploy.PortArgs{
    	ApplicationId: pulumi.String("string"),
    	PublishedPort: pulumi.Int(0),
    	TargetPort:    pulumi.Int(0),
    	Protocol:      dokploy.PortProtocolTcp,
    	PublishMode:   dokploy.PortPublishModeIngress,
    })
    
    resource "dokploy_port" "portResource" {
      lifecycle {
        create_before_destroy = true
      }
      application_id = "string"
      published_port = 0
      target_port    = 0
      protocol       = "tcp"
      publish_mode   = "ingress"
    }
    
    var portResource = new Port("portResource", PortArgs.builder()
        .applicationId("string")
        .publishedPort(0)
        .targetPort(0)
        .protocol(com.dimeskigj.dokploy.enums.PortProtocol.Tcp)
        .publishMode(com.dimeskigj.dokploy.enums.PortPublishMode.Ingress)
        .build());
    
    port_resource = dokploy.Port("portResource",
        application_id="string",
        published_port=0,
        target_port=0,
        protocol=dokploy.PortProtocol.TCP,
        publish_mode=dokploy.PortPublishMode.INGRESS)
    
    const portResource = new dokploy.Port("portResource", {
        applicationId: "string",
        publishedPort: 0,
        targetPort: 0,
        protocol: dokploy.PortProtocol.Tcp,
        publishMode: dokploy.PortPublishMode.Ingress,
    });
    
    type: dokploy:Port
    properties:
        applicationId: string
        protocol: tcp
        publishMode: ingress
        publishedPort: 0
        targetPort: 0
    

    Port Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Port resource accepts the following input properties:

    ApplicationId string
    The Dokploy application ID.
    PublishedPort int
    The externally published port (1-65535).
    TargetPort int
    The application target port (1-65535).
    Protocol Dimeskigj.Pulumi.Dokploy.PortProtocol
    The port protocol: tcp or udp.
    PublishMode Dimeskigj.Pulumi.Dokploy.PortPublishMode
    The port publish mode: ingress or host.
    ApplicationId string
    The Dokploy application ID.
    PublishedPort int
    The externally published port (1-65535).
    TargetPort int
    The application target port (1-65535).
    Protocol PortProtocol
    The port protocol: tcp or udp.
    PublishMode PortPublishMode
    The port publish mode: ingress or host.
    application_id string
    The Dokploy application ID.
    published_port number
    The externally published port (1-65535).
    target_port number
    The application target port (1-65535).
    protocol "tcp" | "udp"
    The port protocol: tcp or udp.
    publish_mode "ingress" | "host"
    The port publish mode: ingress or host.
    applicationId String
    The Dokploy application ID.
    publishedPort Integer
    The externally published port (1-65535).
    targetPort Integer
    The application target port (1-65535).
    protocol PortProtocol
    The port protocol: tcp or udp.
    publishMode PortPublishMode
    The port publish mode: ingress or host.
    applicationId string
    The Dokploy application ID.
    publishedPort number
    The externally published port (1-65535).
    targetPort number
    The application target port (1-65535).
    protocol PortProtocol
    The port protocol: tcp or udp.
    publishMode PortPublishMode
    The port publish mode: ingress or host.
    application_id str
    The Dokploy application ID.
    published_port int
    The externally published port (1-65535).
    target_port int
    The application target port (1-65535).
    protocol PortProtocol
    The port protocol: tcp or udp.
    publish_mode PortPublishMode
    The port publish mode: ingress or host.
    applicationId String
    The Dokploy application ID.
    publishedPort Number
    The externally published port (1-65535).
    targetPort Number
    The application target port (1-65535).
    protocol "tcp" | "udp"
    The port protocol: tcp or udp.
    publishMode "ingress" | "host"
    The port publish mode: ingress or host.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Port resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PortId string
    Stable Dokploy port ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    PortId string
    Stable Dokploy port ID.
    id string
    The provider-assigned unique ID for this managed resource.
    port_id string
    Stable Dokploy port ID.
    id String
    The provider-assigned unique ID for this managed resource.
    portId String
    Stable Dokploy port ID.
    id string
    The provider-assigned unique ID for this managed resource.
    portId string
    Stable Dokploy port ID.
    id str
    The provider-assigned unique ID for this managed resource.
    port_id str
    Stable Dokploy port ID.
    id String
    The provider-assigned unique ID for this managed resource.
    portId String
    Stable Dokploy port ID.

    Look up Existing Port Resource

    Get an existing Port resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): Port
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Port
    func GetPort(ctx *Context, name string, id IDInput, state *PortState, opts ...ResourceOption) (*Port, error)
    public static Port Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Port get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingPort:    type: dokploy:Port    get:      id: ${id}
    import {
      to = dokploy_port.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state PortState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Supporting Types

    PortProtocol

    Port protocol: tcp or udp.

    NameValueDescription
    TcptcpTCP protocol (tcp).
    UdpudpUDP protocol (udp).
    NameValueDescription
    PortProtocolTcptcpTCP protocol (tcp).
    PortProtocolUdpudpUDP protocol (udp).
    ValueDescription
    tcpTCP protocol (tcp).
    udpUDP protocol (udp).
    NameValueDescription
    TcptcpTCP protocol (tcp).
    UdpudpUDP protocol (udp).
    NameValueDescription
    TcptcpTCP protocol (tcp).
    UdpudpUDP protocol (udp).
    NameValueDescription
    TCPtcpTCP protocol (tcp).
    UDPudpUDP protocol (udp).
    ValueDescription
    tcpTCP protocol (tcp).
    udpUDP protocol (udp).

    PortPublishMode

    Port publish mode: ingress or host.

    NameValueDescription
    IngressingressIngress publish mode (ingress).
    HosthostHost publish mode (host).
    NameValueDescription
    PortPublishModeIngressingressIngress publish mode (ingress).
    PortPublishModeHosthostHost publish mode (host).
    ValueDescription
    ingressIngress publish mode (ingress).
    hostHost publish mode (host).
    NameValueDescription
    IngressingressIngress publish mode (ingress).
    HosthostHost publish mode (host).
    NameValueDescription
    IngressingressIngress publish mode (ingress).
    HosthostHost publish mode (host).
    NameValueDescription
    INGRESSingressIngress publish mode (ingress).
    HOSThostHost publish mode (host).
    ValueDescription
    ingressIngress publish mode (ingress).
    hostHost publish mode (host).

    Package Details

    Repository
    dokploy dimeskigj/pulumi-dokploy
    License
    Apache-2.0
    dokploy logo Dokploy
    Viewing docs for Dokploy v0.4.4
    published on Thursday, Nov 5, 2026 by dimeskigj

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial