fortios.system.Autoscript
Explore with Pulumi AI
Configure auto script.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";
const auto2 = new fortios.system.Autoscript("auto2", {
interval: 1,
outputSize: 10,
repeat: 1,
script: `config firewall address
edit "111"
set color 3
set subnet 1.1.1.1 255.255.255.255
next
end
`,
start: "auto",
});
import pulumi
import pulumiverse_fortios as fortios
auto2 = fortios.system.Autoscript("auto2",
interval=1,
output_size=10,
repeat=1,
script="""config firewall address
edit "111"
set color 3
set subnet 1.1.1.1 255.255.255.255
next
end
""",
start="auto")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/system"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := system.NewAutoscript(ctx, "auto2", &system.AutoscriptArgs{
Interval: pulumi.Int(1),
OutputSize: pulumi.Int(10),
Repeat: pulumi.Int(1),
Script: pulumi.String(`config firewall address
edit "111"
set color 3
set subnet 1.1.1.1 255.255.255.255
next
end
`),
Start: pulumi.String("auto"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;
return await Deployment.RunAsync(() =>
{
var auto2 = new Fortios.System.Autoscript("auto2", new()
{
Interval = 1,
OutputSize = 10,
Repeat = 1,
Script = @"config firewall address
edit ""111""
set color 3
set subnet 1.1.1.1 255.255.255.255
next
end
",
Start = "auto",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.system.Autoscript;
import com.pulumi.fortios.system.AutoscriptArgs;
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 auto2 = new Autoscript("auto2", AutoscriptArgs.builder()
.interval(1)
.outputSize(10)
.repeat(1)
.script("""
config firewall address
edit "111"
set color 3
set subnet 1.1.1.1 255.255.255.255
next
end
""")
.start("auto")
.build());
}
}
resources:
auto2:
type: fortios:system:Autoscript
properties:
interval: 1
outputSize: 10
repeat: 1
script: |+
config firewall address
edit "111"
set color 3
set subnet 1.1.1.1 255.255.255.255
next
end
start: auto
Create Autoscript Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Autoscript(name: string, args?: AutoscriptArgs, opts?: CustomResourceOptions);
@overload
def Autoscript(resource_name: str,
args: Optional[AutoscriptArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Autoscript(resource_name: str,
opts: Optional[ResourceOptions] = None,
interval: Optional[int] = None,
name: Optional[str] = None,
output_size: Optional[int] = None,
repeat: Optional[int] = None,
script: Optional[str] = None,
start: Optional[str] = None,
timeout: Optional[int] = None,
vdomparam: Optional[str] = None)
func NewAutoscript(ctx *Context, name string, args *AutoscriptArgs, opts ...ResourceOption) (*Autoscript, error)
public Autoscript(string name, AutoscriptArgs? args = null, CustomResourceOptions? opts = null)
public Autoscript(String name, AutoscriptArgs args)
public Autoscript(String name, AutoscriptArgs args, CustomResourceOptions options)
type: fortios:system:Autoscript
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 AutoscriptArgs
- 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 AutoscriptArgs
- 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 AutoscriptArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutoscriptArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutoscriptArgs
- 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 autoscriptResource = new Fortios.System.Autoscript("autoscriptResource", new()
{
Interval = 0,
Name = "string",
OutputSize = 0,
Repeat = 0,
Script = "string",
Start = "string",
Timeout = 0,
Vdomparam = "string",
});
example, err := system.NewAutoscript(ctx, "autoscriptResource", &system.AutoscriptArgs{
Interval: pulumi.Int(0),
Name: pulumi.String("string"),
OutputSize: pulumi.Int(0),
Repeat: pulumi.Int(0),
Script: pulumi.String("string"),
Start: pulumi.String("string"),
Timeout: pulumi.Int(0),
Vdomparam: pulumi.String("string"),
})
var autoscriptResource = new Autoscript("autoscriptResource", AutoscriptArgs.builder()
.interval(0)
.name("string")
.outputSize(0)
.repeat(0)
.script("string")
.start("string")
.timeout(0)
.vdomparam("string")
.build());
autoscript_resource = fortios.system.Autoscript("autoscriptResource",
interval=0,
name="string",
output_size=0,
repeat=0,
script="string",
start="string",
timeout=0,
vdomparam="string")
const autoscriptResource = new fortios.system.Autoscript("autoscriptResource", {
interval: 0,
name: "string",
outputSize: 0,
repeat: 0,
script: "string",
start: "string",
timeout: 0,
vdomparam: "string",
});
type: fortios:system:Autoscript
properties:
interval: 0
name: string
outputSize: 0
repeat: 0
script: string
start: string
timeout: 0
vdomparam: string
Autoscript 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 Autoscript resource accepts the following input properties:
- Interval int
- Repeat interval in seconds.
- Name string
- Auto script name.
- Output
Size int - Number of megabytes to limit script output to (10 - 1024, default = 10).
- Repeat int
- Number of times to repeat this script (0 = infinite).
- Script string
- List of FortiOS CLI commands to repeat.
- Start string
- Script starting mode. Valid values:
manual
,auto
. - Timeout int
- Maximum running time for this script in seconds (0 = no timeout).
- Vdomparam string
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- Interval int
- Repeat interval in seconds.
- Name string
- Auto script name.
- Output
Size int - Number of megabytes to limit script output to (10 - 1024, default = 10).
- Repeat int
- Number of times to repeat this script (0 = infinite).
- Script string
- List of FortiOS CLI commands to repeat.
- Start string
- Script starting mode. Valid values:
manual
,auto
. - Timeout int
- Maximum running time for this script in seconds (0 = no timeout).
- Vdomparam string
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval Integer
- Repeat interval in seconds.
- name String
- Auto script name.
- output
Size Integer - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat Integer
- Number of times to repeat this script (0 = infinite).
- script String
- List of FortiOS CLI commands to repeat.
- start String
- Script starting mode. Valid values:
manual
,auto
. - timeout Integer
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam String
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval number
- Repeat interval in seconds.
- name string
- Auto script name.
- output
Size number - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat number
- Number of times to repeat this script (0 = infinite).
- script string
- List of FortiOS CLI commands to repeat.
- start string
- Script starting mode. Valid values:
manual
,auto
. - timeout number
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam string
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval int
- Repeat interval in seconds.
- name str
- Auto script name.
- output_
size int - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat int
- Number of times to repeat this script (0 = infinite).
- script str
- List of FortiOS CLI commands to repeat.
- start str
- Script starting mode. Valid values:
manual
,auto
. - timeout int
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam str
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval Number
- Repeat interval in seconds.
- name String
- Auto script name.
- output
Size Number - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat Number
- Number of times to repeat this script (0 = infinite).
- script String
- List of FortiOS CLI commands to repeat.
- start String
- Script starting mode. Valid values:
manual
,auto
. - timeout Number
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam String
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Outputs
All input properties are implicitly available as output properties. Additionally, the Autoscript 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 Autoscript Resource
Get an existing Autoscript 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?: AutoscriptState, opts?: CustomResourceOptions): Autoscript
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
interval: Optional[int] = None,
name: Optional[str] = None,
output_size: Optional[int] = None,
repeat: Optional[int] = None,
script: Optional[str] = None,
start: Optional[str] = None,
timeout: Optional[int] = None,
vdomparam: Optional[str] = None) -> Autoscript
func GetAutoscript(ctx *Context, name string, id IDInput, state *AutoscriptState, opts ...ResourceOption) (*Autoscript, error)
public static Autoscript Get(string name, Input<string> id, AutoscriptState? state, CustomResourceOptions? opts = null)
public static Autoscript get(String name, Output<String> id, AutoscriptState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Interval int
- Repeat interval in seconds.
- Name string
- Auto script name.
- Output
Size int - Number of megabytes to limit script output to (10 - 1024, default = 10).
- Repeat int
- Number of times to repeat this script (0 = infinite).
- Script string
- List of FortiOS CLI commands to repeat.
- Start string
- Script starting mode. Valid values:
manual
,auto
. - Timeout int
- Maximum running time for this script in seconds (0 = no timeout).
- Vdomparam string
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- Interval int
- Repeat interval in seconds.
- Name string
- Auto script name.
- Output
Size int - Number of megabytes to limit script output to (10 - 1024, default = 10).
- Repeat int
- Number of times to repeat this script (0 = infinite).
- Script string
- List of FortiOS CLI commands to repeat.
- Start string
- Script starting mode. Valid values:
manual
,auto
. - Timeout int
- Maximum running time for this script in seconds (0 = no timeout).
- Vdomparam string
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval Integer
- Repeat interval in seconds.
- name String
- Auto script name.
- output
Size Integer - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat Integer
- Number of times to repeat this script (0 = infinite).
- script String
- List of FortiOS CLI commands to repeat.
- start String
- Script starting mode. Valid values:
manual
,auto
. - timeout Integer
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam String
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval number
- Repeat interval in seconds.
- name string
- Auto script name.
- output
Size number - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat number
- Number of times to repeat this script (0 = infinite).
- script string
- List of FortiOS CLI commands to repeat.
- start string
- Script starting mode. Valid values:
manual
,auto
. - timeout number
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam string
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval int
- Repeat interval in seconds.
- name str
- Auto script name.
- output_
size int - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat int
- Number of times to repeat this script (0 = infinite).
- script str
- List of FortiOS CLI commands to repeat.
- start str
- Script starting mode. Valid values:
manual
,auto
. - timeout int
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam str
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
- interval Number
- Repeat interval in seconds.
- name String
- Auto script name.
- output
Size Number - Number of megabytes to limit script output to (10 - 1024, default = 10).
- repeat Number
- Number of times to repeat this script (0 = infinite).
- script String
- List of FortiOS CLI commands to repeat.
- start String
- Script starting mode. Valid values:
manual
,auto
. - timeout Number
- Maximum running time for this script in seconds (0 = no timeout).
- vdomparam String
- Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Import
System AutoScript can be imported using any of these accepted formats:
$ pulumi import fortios:system/autoscript:Autoscript labelname {{name}}
If you do not want to import arguments of block:
$ export “FORTIOS_IMPORT_TABLE”=“false”
$ pulumi import fortios:system/autoscript:Autoscript labelname {{name}}
$ unset “FORTIOS_IMPORT_TABLE”
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- fortios pulumiverse/pulumi-fortios
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fortios
Terraform Provider.