1. Packages
  2. Packages
  3. Freebox
  4. API Docs
  5. downloads
  6. File
Viewing docs for Freebox v0.3.11
published on Friday, Jul 3, 2026 by OlivierPaquien
freebox logo
Viewing docs for Freebox v0.3.11
published on Friday, Jul 3, 2026 by OlivierPaquien

    Create File Resource

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

    Constructor syntax

    new File(name: string, args: FileArgs, opts?: CustomResourceOptions);
    @overload
    def File(resource_name: str,
             args: FileArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def File(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             destination_path: Optional[str] = None,
             authentication: Optional[_root_inputs.RemoteFileAuthenticationArgs] = None,
             checksum: Optional[str] = None,
             extract: Optional[_root_inputs.RemoteFileExtractArgs] = None,
             parents: Optional[bool] = None,
             polling: Optional[_root_inputs.RemoteFilePollingArgs] = None,
             source_content: Optional[str] = None,
             source_local_file: Optional[str] = None,
             source_remote_file: Optional[str] = None,
             source_url: Optional[str] = None)
    func NewFile(ctx *Context, name string, args FileArgs, opts ...ResourceOption) (*File, error)
    public File(string name, FileArgs args, CustomResourceOptions? opts = null)
    public File(String name, FileArgs args)
    public File(String name, FileArgs args, CustomResourceOptions options)
    
    type: freebox:downloads:File
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "freebox_downloads_file" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args FileArgs
    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 FileArgs
    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 FileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FileArgs
    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 fileResource = new Freebox.Downloads.File("fileResource", new()
    {
        DestinationPath = "string",
        Authentication = new Freebox.Inputs.RemoteFileAuthenticationArgs
        {
            BasicAuth = new Freebox.Inputs.RemoteFileBasicAuthArgs
            {
                Password = "string",
                Username = "string",
            },
        },
        Checksum = "string",
        Extract = new Freebox.Inputs.RemoteFileExtractArgs
        {
            DestinationPath = "string",
            Overwrite = false,
            Password = "string",
        },
        Parents = false,
        Polling = new Freebox.Inputs.RemoteFilePollingArgs
        {
            ChecksumCompute = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
            Copy = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
            Delete = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
            Download = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
            Extract = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
            Move = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
            Upload = new Freebox.Inputs.PollingSpecArgs
            {
                Interval = 0,
                Timeout = 0,
            },
        },
        SourceContent = "string",
        SourceLocalFile = "string",
        SourceRemoteFile = "string",
        SourceUrl = "string",
    });
    
    example, err := downloads.NewFile(ctx, "fileResource", &downloads.FileArgs{
    	DestinationPath: pulumi.String("string"),
    	Authentication: &freebox.RemoteFileAuthenticationArgs{
    		BasicAuth: &freebox.RemoteFileBasicAuthArgs{
    			Password: pulumi.String("string"),
    			Username: pulumi.String("string"),
    		},
    	},
    	Checksum: pulumi.String("string"),
    	Extract: &freebox.RemoteFileExtractArgs{
    		DestinationPath: pulumi.String("string"),
    		Overwrite:       pulumi.Bool(false),
    		Password:        pulumi.String("string"),
    	},
    	Parents: pulumi.Bool(false),
    	Polling: &freebox.RemoteFilePollingArgs{
    		ChecksumCompute: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    		Copy: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    		Delete: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    		Download: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    		Extract: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    		Move: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    		Upload: &freebox.PollingSpecArgs{
    			Interval: pulumi.Int(0),
    			Timeout:  pulumi.Int(0),
    		},
    	},
    	SourceContent:    pulumi.String("string"),
    	SourceLocalFile:  pulumi.String("string"),
    	SourceRemoteFile: pulumi.String("string"),
    	SourceUrl:        pulumi.String("string"),
    })
    
    resource "freebox_downloads_file" "fileResource" {
      destination_path = "string"
      authentication = {
        basic_auth = {
          password = "string"
          username = "string"
        }
      }
      checksum = "string"
      extract = {
        destination_path = "string"
        overwrite        = false
        password         = "string"
      }
      parents = false
      polling = {
        checksum_compute = {
          interval = 0
          timeout  = 0
        }
        copy = {
          interval = 0
          timeout  = 0
        }
        delete = {
          interval = 0
          timeout  = 0
        }
        download = {
          interval = 0
          timeout  = 0
        }
        extract = {
          interval = 0
          timeout  = 0
        }
        move = {
          interval = 0
          timeout  = 0
        }
        upload = {
          interval = 0
          timeout  = 0
        }
      }
      source_content     = "string"
      source_local_file  = "string"
      source_remote_file = "string"
      source_url         = "string"
    }
    
    var fileResource = new File("fileResource", FileArgs.builder()
        .destinationPath("string")
        .authentication(RemoteFileAuthenticationArgs.builder()
            .basicAuth(RemoteFileBasicAuthArgs.builder()
                .password("string")
                .username("string")
                .build())
            .build())
        .checksum("string")
        .extract(RemoteFileExtractArgs.builder()
            .destinationPath("string")
            .overwrite(false)
            .password("string")
            .build())
        .parents(false)
        .polling(RemoteFilePollingArgs.builder()
            .checksumCompute(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .copy(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .delete(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .download(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .extract(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .move(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .upload(PollingSpecArgs.builder()
                .interval(0)
                .timeout(0)
                .build())
            .build())
        .sourceContent("string")
        .sourceLocalFile("string")
        .sourceRemoteFile("string")
        .sourceUrl("string")
        .build());
    
    file_resource = freebox.downloads.File("fileResource",
        destination_path="string",
        authentication={
            "basic_auth": {
                "password": "string",
                "username": "string",
            },
        },
        checksum="string",
        extract={
            "destination_path": "string",
            "overwrite": False,
            "password": "string",
        },
        parents=False,
        polling={
            "checksum_compute": {
                "interval": 0,
                "timeout": 0,
            },
            "copy": {
                "interval": 0,
                "timeout": 0,
            },
            "delete": {
                "interval": 0,
                "timeout": 0,
            },
            "download": {
                "interval": 0,
                "timeout": 0,
            },
            "extract": {
                "interval": 0,
                "timeout": 0,
            },
            "move": {
                "interval": 0,
                "timeout": 0,
            },
            "upload": {
                "interval": 0,
                "timeout": 0,
            },
        },
        source_content="string",
        source_local_file="string",
        source_remote_file="string",
        source_url="string")
    
    const fileResource = new freebox.downloads.File("fileResource", {
        destinationPath: "string",
        authentication: {
            basicAuth: {
                password: "string",
                username: "string",
            },
        },
        checksum: "string",
        extract: {
            destinationPath: "string",
            overwrite: false,
            password: "string",
        },
        parents: false,
        polling: {
            checksumCompute: {
                interval: 0,
                timeout: 0,
            },
            copy: {
                interval: 0,
                timeout: 0,
            },
            "delete": {
                interval: 0,
                timeout: 0,
            },
            download: {
                interval: 0,
                timeout: 0,
            },
            extract: {
                interval: 0,
                timeout: 0,
            },
            move: {
                interval: 0,
                timeout: 0,
            },
            upload: {
                interval: 0,
                timeout: 0,
            },
        },
        sourceContent: "string",
        sourceLocalFile: "string",
        sourceRemoteFile: "string",
        sourceUrl: "string",
    });
    
    type: freebox:downloads:File
    properties:
        authentication:
            basicAuth:
                password: string
                username: string
        checksum: string
        destinationPath: string
        extract:
            destinationPath: string
            overwrite: false
            password: string
        parents: false
        polling:
            checksumCompute:
                interval: 0
                timeout: 0
            copy:
                interval: 0
                timeout: 0
            delete:
                interval: 0
                timeout: 0
            download:
                interval: 0
                timeout: 0
            extract:
                interval: 0
                timeout: 0
            move:
                interval: 0
                timeout: 0
            upload:
                interval: 0
                timeout: 0
        sourceContent: string
        sourceLocalFile: string
        sourceRemoteFile: string
        sourceUrl: string
    

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

    DestinationPath string
    Path on the Freebox where the file will be stored.
    Authentication OlivierPaquien.Pulumi.Freebox.Inputs.RemoteFileAuthentication
    Checksum string
    Expected checksum (method:value). Computed after create if omitted.
    Extract OlivierPaquien.Pulumi.Freebox.Inputs.RemoteFileExtract
    Parents bool
    Create parent directories if missing.
    Polling OlivierPaquien.Pulumi.Freebox.Inputs.RemoteFilePolling
    SourceContent string
    Inline file content to upload.
    SourceLocalFile string
    Path to a local file to upload (relative to the Pulumi engine).
    SourceRemoteFile string
    Path to an existing file on the Freebox to copy.
    SourceUrl string
    URL of the file to download.
    DestinationPath string
    Path on the Freebox where the file will be stored.
    Authentication RemoteFileAuthenticationArgs
    Checksum string
    Expected checksum (method:value). Computed after create if omitted.
    Extract RemoteFileExtractArgs
    Parents bool
    Create parent directories if missing.
    Polling RemoteFilePollingArgs
    SourceContent string
    Inline file content to upload.
    SourceLocalFile string
    Path to a local file to upload (relative to the Pulumi engine).
    SourceRemoteFile string
    Path to an existing file on the Freebox to copy.
    SourceUrl string
    URL of the file to download.
    destination_path string
    Path on the Freebox where the file will be stored.
    authentication object
    checksum string
    Expected checksum (method:value). Computed after create if omitted.
    extract object
    parents bool
    Create parent directories if missing.
    polling object
    source_content string
    Inline file content to upload.
    source_local_file string
    Path to a local file to upload (relative to the Pulumi engine).
    source_remote_file string
    Path to an existing file on the Freebox to copy.
    source_url string
    URL of the file to download.
    destinationPath String
    Path on the Freebox where the file will be stored.
    authentication RemoteFileAuthentication
    checksum String
    Expected checksum (method:value). Computed after create if omitted.
    extract RemoteFileExtract
    parents Boolean
    Create parent directories if missing.
    polling RemoteFilePolling
    sourceContent String
    Inline file content to upload.
    sourceLocalFile String
    Path to a local file to upload (relative to the Pulumi engine).
    sourceRemoteFile String
    Path to an existing file on the Freebox to copy.
    sourceUrl String
    URL of the file to download.
    destinationPath string
    Path on the Freebox where the file will be stored.
    authentication RemoteFileAuthentication
    checksum string
    Expected checksum (method:value). Computed after create if omitted.
    extract RemoteFileExtract
    parents boolean
    Create parent directories if missing.
    polling RemoteFilePolling
    sourceContent string
    Inline file content to upload.
    sourceLocalFile string
    Path to a local file to upload (relative to the Pulumi engine).
    sourceRemoteFile string
    Path to an existing file on the Freebox to copy.
    sourceUrl string
    URL of the file to download.
    destination_path str
    Path on the Freebox where the file will be stored.
    authentication RemoteFileAuthenticationArgs
    checksum str
    Expected checksum (method:value). Computed after create if omitted.
    extract RemoteFileExtractArgs
    parents bool
    Create parent directories if missing.
    polling RemoteFilePollingArgs
    source_content str
    Inline file content to upload.
    source_local_file str
    Path to a local file to upload (relative to the Pulumi engine).
    source_remote_file str
    Path to an existing file on the Freebox to copy.
    source_url str
    URL of the file to download.
    destinationPath String
    Path on the Freebox where the file will be stored.
    authentication Property Map
    checksum String
    Expected checksum (method:value). Computed after create if omitted.
    extract Property Map
    parents Boolean
    Create parent directories if missing.
    polling Property Map
    sourceContent String
    Inline file content to upload.
    sourceLocalFile String
    Path to a local file to upload (relative to the Pulumi engine).
    sourceRemoteFile String
    Path to an existing file on the Freebox to copy.
    sourceUrl String
    URL of the file to download.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    SizeOnDisk int
    Size in bytes of the file on disk.
    Id string
    The provider-assigned unique ID for this managed resource.
    SizeOnDisk int
    Size in bytes of the file on disk.
    id string
    The provider-assigned unique ID for this managed resource.
    size_on_disk number
    Size in bytes of the file on disk.
    id String
    The provider-assigned unique ID for this managed resource.
    sizeOnDisk Integer
    Size in bytes of the file on disk.
    id string
    The provider-assigned unique ID for this managed resource.
    sizeOnDisk number
    Size in bytes of the file on disk.
    id str
    The provider-assigned unique ID for this managed resource.
    size_on_disk int
    Size in bytes of the file on disk.
    id String
    The provider-assigned unique ID for this managed resource.
    sizeOnDisk Number
    Size in bytes of the file on disk.

    Supporting Types

    PollingSpec, PollingSpecArgs

    interval number
    timeout number
    interval Integer
    timeout Integer
    interval number
    timeout number
    interval Number
    timeout Number

    RemoteFileAuthentication, RemoteFileAuthenticationArgs

    RemoteFileBasicAuth, RemoteFileBasicAuthArgs

    Password string
    Username string
    Password string
    Username string
    password string
    username string
    password String
    username String
    password string
    username string
    password String
    username String

    RemoteFileExtract, RemoteFileExtractArgs

    destinationPath String
    overwrite Boolean
    password String
    destinationPath string
    overwrite boolean
    password string
    destinationPath String
    overwrite Boolean
    password String

    RemoteFilePolling, RemoteFilePollingArgs

    Package Details

    Repository
    freebox
    License
    freebox logo
    Viewing docs for Freebox v0.3.11
    published on Friday, Jul 3, 2026 by OlivierPaquien

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial