1. Packages
  2. Unifi
  3. API Docs
  4. port
  5. AlFile
Unifi v0.2.0 published on Tuesday, Feb 17, 2026 by Pulumiverse
unifi logo
Unifi v0.2.0 published on Tuesday, Feb 17, 2026 by Pulumiverse

    The unifi.port.AlFile resource manages files uploaded to the UniFi guest portal. This resource allows you to upload images that can be used in customizing the UniFi guest portal interface.

    Note: This resource uploads files to the UniFi controller. The file must exist on the local filesystem where Terraform is executed.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumiverse/unifi";
    
    const file = new unifi.port.AlFile("file", {filePath: "/Users/username/Downloads/portal.png"});
    
    import pulumi
    import pulumiverse_unifi as unifi
    
    file = unifi.port.AlFile("file", file_path="/Users/username/Downloads/portal.png")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/port"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := port.NewAlFile(ctx, "file", &port.AlFileArgs{
    			FilePath: pulumi.String("/Users/username/Downloads/portal.png"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Unifi = Pulumiverse.Unifi;
    
    return await Deployment.RunAsync(() => 
    {
        var file = new Unifi.Port.AlFile("file", new()
        {
            FilePath = "/Users/username/Downloads/portal.png",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.unifi.port.AlFile;
    import com.pulumiverse.unifi.port.AlFileArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var file = new AlFile("file", AlFileArgs.builder()
                .filePath("/Users/username/Downloads/portal.png")
                .build());
    
        }
    }
    
    resources:
      file:
        type: unifi:port:AlFile
        properties:
          filePath: /Users/username/Downloads/portal.png
    

    Create AlFile Resource

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

    Constructor syntax

    new AlFile(name: string, args: AlFileArgs, opts?: CustomResourceOptions);
    @overload
    def AlFile(resource_name: str,
               args: AlFileArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlFile(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               file_path: Optional[str] = None,
               site: Optional[str] = None)
    func NewAlFile(ctx *Context, name string, args AlFileArgs, opts ...ResourceOption) (*AlFile, error)
    public AlFile(string name, AlFileArgs args, CustomResourceOptions? opts = null)
    public AlFile(String name, AlFileArgs args)
    public AlFile(String name, AlFileArgs args, CustomResourceOptions options)
    
    type: unifi:port:AlFile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AlFileArgs
    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 AlFileArgs
    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 AlFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlFileArgs
    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 alFileResource = new Unifi.Port.AlFile("alFileResource", new()
    {
        FilePath = "string",
        Site = "string",
    });
    
    example, err := port.NewAlFile(ctx, "alFileResource", &port.AlFileArgs{
    	FilePath: pulumi.String("string"),
    	Site:     pulumi.String("string"),
    })
    
    var alFileResource = new AlFile("alFileResource", AlFileArgs.builder()
        .filePath("string")
        .site("string")
        .build());
    
    al_file_resource = unifi.port.AlFile("alFileResource",
        file_path="string",
        site="string")
    
    const alFileResource = new unifi.port.AlFile("alFileResource", {
        filePath: "string",
        site: "string",
    });
    
    type: unifi:port:AlFile
    properties:
        filePath: string
        site: string
    

    AlFile 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 AlFile resource accepts the following input properties:

    FilePath string
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    FilePath string
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    filePath String
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    filePath string
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    file_path str
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    filePath String
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.

    Outputs

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

    ContentType string
    MIME type of the file.
    FileSize int
    Size of the file in bytes.
    Filename string
    Name of the file as stored in the UniFi controller.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified int
    Timestamp when the file was last modified.
    Md5 string
    MD5 hash of the file content.
    Url string
    URL where the file can be accessed on the UniFi controller.
    ContentType string
    MIME type of the file.
    FileSize int
    Size of the file in bytes.
    Filename string
    Name of the file as stored in the UniFi controller.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified int
    Timestamp when the file was last modified.
    Md5 string
    MD5 hash of the file content.
    Url string
    URL where the file can be accessed on the UniFi controller.
    contentType String
    MIME type of the file.
    fileSize Integer
    Size of the file in bytes.
    filename String
    Name of the file as stored in the UniFi controller.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified Integer
    Timestamp when the file was last modified.
    md5 String
    MD5 hash of the file content.
    url String
    URL where the file can be accessed on the UniFi controller.
    contentType string
    MIME type of the file.
    fileSize number
    Size of the file in bytes.
    filename string
    Name of the file as stored in the UniFi controller.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified number
    Timestamp when the file was last modified.
    md5 string
    MD5 hash of the file content.
    url string
    URL where the file can be accessed on the UniFi controller.
    content_type str
    MIME type of the file.
    file_size int
    Size of the file in bytes.
    filename str
    Name of the file as stored in the UniFi controller.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified int
    Timestamp when the file was last modified.
    md5 str
    MD5 hash of the file content.
    url str
    URL where the file can be accessed on the UniFi controller.
    contentType String
    MIME type of the file.
    fileSize Number
    Size of the file in bytes.
    filename String
    Name of the file as stored in the UniFi controller.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified Number
    Timestamp when the file was last modified.
    md5 String
    MD5 hash of the file content.
    url String
    URL where the file can be accessed on the UniFi controller.

    Look up Existing AlFile Resource

    Get an existing AlFile 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>, state?: AlFileState, opts?: CustomResourceOptions): AlFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content_type: Optional[str] = None,
            file_path: Optional[str] = None,
            file_size: Optional[int] = None,
            filename: Optional[str] = None,
            last_modified: Optional[int] = None,
            md5: Optional[str] = None,
            site: Optional[str] = None,
            url: Optional[str] = None) -> AlFile
    func GetAlFile(ctx *Context, name string, id IDInput, state *AlFileState, opts ...ResourceOption) (*AlFile, error)
    public static AlFile Get(string name, Input<string> id, AlFileState? state, CustomResourceOptions? opts = null)
    public static AlFile get(String name, Output<String> id, AlFileState state, CustomResourceOptions options)
    resources:  _:    type: unifi:port:AlFile    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ContentType string
    MIME type of the file.
    FilePath string
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    FileSize int
    Size of the file in bytes.
    Filename string
    Name of the file as stored in the UniFi controller.
    LastModified int
    Timestamp when the file was last modified.
    Md5 string
    MD5 hash of the file content.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Url string
    URL where the file can be accessed on the UniFi controller.
    ContentType string
    MIME type of the file.
    FilePath string
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    FileSize int
    Size of the file in bytes.
    Filename string
    Name of the file as stored in the UniFi controller.
    LastModified int
    Timestamp when the file was last modified.
    Md5 string
    MD5 hash of the file content.
    Site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    Url string
    URL where the file can be accessed on the UniFi controller.
    contentType String
    MIME type of the file.
    filePath String
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    fileSize Integer
    Size of the file in bytes.
    filename String
    Name of the file as stored in the UniFi controller.
    lastModified Integer
    Timestamp when the file was last modified.
    md5 String
    MD5 hash of the file content.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    url String
    URL where the file can be accessed on the UniFi controller.
    contentType string
    MIME type of the file.
    filePath string
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    fileSize number
    Size of the file in bytes.
    filename string
    Name of the file as stored in the UniFi controller.
    lastModified number
    Timestamp when the file was last modified.
    md5 string
    MD5 hash of the file content.
    site string
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    url string
    URL where the file can be accessed on the UniFi controller.
    content_type str
    MIME type of the file.
    file_path str
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    file_size int
    Size of the file in bytes.
    filename str
    Name of the file as stored in the UniFi controller.
    last_modified int
    Timestamp when the file was last modified.
    md5 str
    MD5 hash of the file content.
    site str
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    url str
    URL where the file can be accessed on the UniFi controller.
    contentType String
    MIME type of the file.
    filePath String
    Path to the file on the local filesystem to upload to the UniFi controller. The file must exist and be readable.
    fileSize Number
    Size of the file in bytes.
    filename String
    Name of the file as stored in the UniFi controller.
    lastModified Number
    Timestamp when the file was last modified.
    md5 String
    MD5 hash of the file content.
    site String
    The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
    url String
    URL where the file can be accessed on the UniFi controller.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Unifi v0.2.0 published on Tuesday, Feb 17, 2026 by Pulumiverse
      Meet Neo: Your AI Platform Teammate