routeros.IpTftp
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const file = new routeros.IpTftp("file", {
ipAddresses: ["10.0.0.0/24"],
reqFilename: "file.txt",
realFilename: routeros_file.file.name,
readOnly: true,
});
import pulumi
import pulumi_routeros as routeros
file = routeros.IpTftp("file",
ip_addresses=["10.0.0.0/24"],
req_filename="file.txt",
real_filename=routeros_file["file"]["name"],
read_only=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := routeros.NewIpTftp(ctx, "file", &routeros.IpTftpArgs{
IpAddresses: pulumi.StringArray{
pulumi.String("10.0.0.0/24"),
},
ReqFilename: pulumi.String("file.txt"),
RealFilename: pulumi.Any(routeros_file.File.Name),
ReadOnly: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;
return await Deployment.RunAsync(() =>
{
var file = new Routeros.IpTftp("file", new()
{
IpAddresses = new[]
{
"10.0.0.0/24",
},
ReqFilename = "file.txt",
RealFilename = routeros_file.File.Name,
ReadOnly = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.IpTftp;
import com.pulumi.routeros.IpTftpArgs;
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 IpTftp("file", IpTftpArgs.builder()
.ipAddresses("10.0.0.0/24")
.reqFilename("file.txt")
.realFilename(routeros_file.file().name())
.readOnly(true)
.build());
}
}
resources:
file:
type: routeros:IpTftp
properties:
ipAddresses:
- 10.0.0.0/24
reqFilename: file.txt
realFilename: ${routeros_file.file.name}
readOnly: true
Create IpTftp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpTftp(name: string, args?: IpTftpArgs, opts?: CustomResourceOptions);
@overload
def IpTftp(resource_name: str,
args: Optional[IpTftpArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IpTftp(resource_name: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
___skip_: Optional[str] = None,
allow: Optional[bool] = None,
allow_overwrite: Optional[bool] = None,
allow_rollover: Optional[bool] = None,
disabled: Optional[bool] = None,
ip_addresses: Optional[Sequence[str]] = None,
ip_tftp_id: Optional[str] = None,
read_only: Optional[bool] = None,
reading_window_size: Optional[str] = None,
real_filename: Optional[str] = None,
req_filename: Optional[str] = None)
func NewIpTftp(ctx *Context, name string, args *IpTftpArgs, opts ...ResourceOption) (*IpTftp, error)
public IpTftp(string name, IpTftpArgs? args = null, CustomResourceOptions? opts = null)
public IpTftp(String name, IpTftpArgs args)
public IpTftp(String name, IpTftpArgs args, CustomResourceOptions options)
type: routeros:IpTftp
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 IpTftpArgs
- 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 IpTftpArgs
- 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 IpTftpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpTftpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpTftpArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
IpTftp 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 IpTftp resource accepts the following input properties:
- Allow bool
- Allow connection.
- Allow
Overwrite bool - If
true
, overwriting the file is allowed. - Allow
Rollover bool - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- Disabled bool
- Ip
Addresses List<string> - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - Ip
Tftp stringId - The ID of this resource.
- Read
Only bool - Sets if file can be written to. If set to
false
write attempts will fail with an error. - Reading
Window stringSize - TFTP Windowsize option value.
- Real
Filename string - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - Req
Filename string - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
. - ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- Allow bool
- Allow connection.
- Allow
Overwrite bool - If
true
, overwriting the file is allowed. - Allow
Rollover bool - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- Disabled bool
- Ip
Addresses []string - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - Ip
Tftp stringId - The ID of this resource.
- Read
Only bool - Sets if file can be written to. If set to
false
write attempts will fail with an error. - Reading
Window stringSize - TFTP Windowsize option value.
- Real
Filename string - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - Req
Filename string - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
. - ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow Boolean
- Allow connection.
- allow
Overwrite Boolean - If
true
, overwriting the file is allowed. - allow
Rollover Boolean - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled Boolean
- ip
Addresses List<String> - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip
Tftp StringId - The ID of this resource.
- read
Only Boolean - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading
Window StringSize - TFTP Windowsize option value.
- real
Filename String - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req
Filename String - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow boolean
- Allow connection.
- allow
Overwrite boolean - If
true
, overwriting the file is allowed. - allow
Rollover boolean - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled boolean
- ip
Addresses string[] - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip
Tftp stringId - The ID of this resource.
- read
Only boolean - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading
Window stringSize - TFTP Windowsize option value.
- real
Filename string - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req
Filename string - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ str - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow bool
- Allow connection.
- allow_
overwrite bool - If
true
, overwriting the file is allowed. - allow_
rollover bool - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled bool
- ip_
addresses Sequence[str] - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip_
tftp_ strid - The ID of this resource.
- read_
only bool - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading_
window_ strsize - TFTP Windowsize option value.
- real_
filename str - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req_
filename str - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow Boolean
- Allow connection.
- allow
Overwrite Boolean - If
true
, overwriting the file is allowed. - allow
Rollover Boolean - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled Boolean
- ip
Addresses List<String> - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip
Tftp StringId - The ID of this resource.
- read
Only Boolean - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading
Window StringSize - TFTP Windowsize option value.
- real
Filename String - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req
Filename String - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpTftp resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing IpTftp Resource
Get an existing IpTftp 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?: IpTftpState, opts?: CustomResourceOptions): IpTftp
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
___skip_: Optional[str] = None,
allow: Optional[bool] = None,
allow_overwrite: Optional[bool] = None,
allow_rollover: Optional[bool] = None,
disabled: Optional[bool] = None,
ip_addresses: Optional[Sequence[str]] = None,
ip_tftp_id: Optional[str] = None,
read_only: Optional[bool] = None,
reading_window_size: Optional[str] = None,
real_filename: Optional[str] = None,
req_filename: Optional[str] = None) -> IpTftp
func GetIpTftp(ctx *Context, name string, id IDInput, state *IpTftpState, opts ...ResourceOption) (*IpTftp, error)
public static IpTftp Get(string name, Input<string> id, IpTftpState? state, CustomResourceOptions? opts = null)
public static IpTftp get(String name, Output<String> id, IpTftpState state, CustomResourceOptions options)
resources: _: type: routeros:IpTftp 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.
- Allow bool
- Allow connection.
- Allow
Overwrite bool - If
true
, overwriting the file is allowed. - Allow
Rollover bool - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- Disabled bool
- Ip
Addresses List<string> - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - Ip
Tftp stringId - The ID of this resource.
- Read
Only bool - Sets if file can be written to. If set to
false
write attempts will fail with an error. - Reading
Window stringSize - TFTP Windowsize option value.
- Real
Filename string - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - Req
Filename string - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
. - ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- Allow bool
- Allow connection.
- Allow
Overwrite bool - If
true
, overwriting the file is allowed. - Allow
Rollover bool - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- Disabled bool
- Ip
Addresses []string - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - Ip
Tftp stringId - The ID of this resource.
- Read
Only bool - Sets if file can be written to. If set to
false
write attempts will fail with an error. - Reading
Window stringSize - TFTP Windowsize option value.
- Real
Filename string - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - Req
Filename string - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
. - ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow Boolean
- Allow connection.
- allow
Overwrite Boolean - If
true
, overwriting the file is allowed. - allow
Rollover Boolean - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled Boolean
- ip
Addresses List<String> - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip
Tftp StringId - The ID of this resource.
- read
Only Boolean - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading
Window StringSize - TFTP Windowsize option value.
- real
Filename String - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req
Filename String - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ string - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow boolean
- Allow connection.
- allow
Overwrite boolean - If
true
, overwriting the file is allowed. - allow
Rollover boolean - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled boolean
- ip
Addresses string[] - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip
Tftp stringId - The ID of this resource.
- read
Only boolean - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading
Window stringSize - TFTP Windowsize option value.
- real
Filename string - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req
Filename string - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ str - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow bool
- Allow connection.
- allow_
overwrite bool - If
true
, overwriting the file is allowed. - allow_
rollover bool - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled bool
- ip_
addresses Sequence[str] - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip_
tftp_ strid - The ID of this resource.
- read_
only bool - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading_
window_ strsize - TFTP Windowsize option value.
- real_
filename str - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req_
filename str - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
skip_ String - A set of transformations for field names. This is an internal service field, setting a value is not required.
- allow Boolean
- Allow connection.
- allow
Overwrite Boolean - If
true
, overwriting the file is allowed. - allow
Rollover Boolean - If set, server will allow sequence number to roll over when maximum value is reached. This is used to enable large downloads using TFTP server.
- disabled Boolean
- ip
Addresses List<String> - Range of IP addresses accepted as clients. If empty
0.0.0.0/0
will be used. - ip
Tftp StringId - The ID of this resource.
- read
Only Boolean - Sets if file can be written to. If set to
false
write attempts will fail with an error. - reading
Window StringSize - TFTP Windowsize option value.
- real
Filename String - If
req-filename
andreal-filename
values are set and valid, the requested filename will be replaced with matched file. This field has to be set. If multiple regex are specified inreq-filename
, with this field you can set which ones should match, so this rule is validated.real-filename
format for using multiple regex isfilename\0\5\6
. - req
Filename String - Requested filename as regular expression (regex) if field is left empty it defaults to
.*
.
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/ip/tftp get [print show-ids]]
$ pulumi import routeros:index/ipTftp:IpTftp file "*0"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- routeros terraform-routeros/terraform-provider-routeros
- License
- Notes
- This Pulumi package is based on the
routeros
Terraform Provider.