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.

    Supporting Types

    PortProtocol, PortProtocolArgs

    Tcp
    tcp TCP protocol (tcp).
    Udp
    udp UDP protocol (udp).
    PortProtocolTcp
    tcp TCP protocol (tcp).
    PortProtocolUdp
    udp UDP protocol (udp).
    "tcp"
    tcp TCP protocol (tcp).
    "udp"
    udp UDP protocol (udp).
    Tcp
    tcp TCP protocol (tcp).
    Udp
    udp UDP protocol (udp).
    Tcp
    tcp TCP protocol (tcp).
    Udp
    udp UDP protocol (udp).
    TCP
    tcp TCP protocol (tcp).
    UDP
    udp UDP protocol (udp).
    "tcp"
    tcp TCP protocol (tcp).
    "udp"
    udp UDP protocol (udp).

    PortPublishMode, PortPublishModeArgs

    Ingress
    ingress Ingress publish mode (ingress).
    Host
    host Host publish mode (host).
    PortPublishModeIngress
    ingress Ingress publish mode (ingress).
    PortPublishModeHost
    host Host publish mode (host).
    "ingress"
    ingress Ingress publish mode (ingress).
    "host"
    host Host publish mode (host).
    Ingress
    ingress Ingress publish mode (ingress).
    Host
    host Host publish mode (host).
    Ingress
    ingress Ingress publish mode (ingress).
    Host
    host Host publish mode (host).
    INGRESS
    ingress Ingress publish mode (ingress).
    HOST
    host Host publish mode (host).
    "ingress"
    ingress Ingress publish mode (ingress).
    "host"
    host Host 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