Fortinet white logo
Fortinet white logo

Administration Guide

Update a FortiFlex configuration

Update a FortiFlex configuration

Use the fortiflexvm_configs_update module to update a FortiFlex configuration under a program.

Parameters

The following parameters are included:

Parameter

Type

Description

username

String (Optional)

The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME.

password

String (Optional)

The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD.

id

Integer

The ID of the configuration you want to update.

name

String (Optional)

The name of your FortiFlex configuration.

status

String (Optional)

The status of the configuration, either ACTIVE or DISABLED.

bypass_validation

Boolean (Optional)

Only set this to true when the module schema differs with FortiFlex API structure. The module continues to execute without validating parameters. The default value is false.

check_parameters

Boolean (Optional)

Will check whether the parameters are set correctly before sending the data. If it is set to true, FortiFlex Ansible will check the parameter correctness based on the rules. The default value is false.

This is only for debugging purposes. It is not recommended to set it as true in case the FortiFlex Ansible rules are outdated.

fortigateBundle

Dictionary (Optional)

The FortiGate Virtual Machine - Service Bundle.

fortiManager

Dictionary (Optional)

The FortiManager Virtual Machine.

fortiWeb

Dictionary (Optional)

The FortiWeb Virtual Machine - Service Bundle.

fortiGateLCS

Dictionary (Optional)

The FortiGate Virtual Machine - A La Carte Services.

fortiAnalyzer

Dictionary (Optional)

The FortiAnalyzer Virtual Machine.

fortiPortal

Dictionary (Optional)

The FortiPortal Virtual Machine.

fortiADC

Dictionary (Optional)

The FortiADC Virtual Machine.

fortiGateHardware

Dictionary (Optional)

The FortiGate Hardware.

The fortigateBundle dictionary includes:

Attribute

Type

Description

cpu

String

The number of CPUs. This value can be "1", "2", "4", "8", "16", "32", or "2147483647" (unlimited).

service

String

The value can be either "FC" (FortiCare), "UTM", "ENT" (Enterprise), or "ATP".

vdom

Integer (Optional)

The number of VDOMs between 0 and 500. The default value is 0.

The fortiManager dictionary includes:

Attribute

Type

Description

device

Integer

The number of managed devices between 1 and 100000.

adom

Integer

The number of ADOMs between 1 and 100000.

The fortiWeb dictionary includes:

Attribute

Type

Description

cpu

String

The number of CPUs. This value can be "1", "2", "4", "8", or "16".

service

String

The service package can be "FWBSTD" (Standard) or "FWBADV" (Advanced).

The fortiGateLCS dictionary includes:

Attribute

Type

Description

cpu

Integer

The number of CPUs between 1 and 96.

fortiGuardServices

List (Optional)

The FortiGuard services this FortiGate Virtual Machine supports. The default value is an empty list but may contain "IPS", "AVDB", "FURL", "IOTH", "FGSA", and "ISSS".

supportService

String

The value can be "FC247" (FortiCare 24x7) or "ASET" (FortiCare Elite).

vdom

Integer

The number of VDOMs between 1 and 500.

cloudServices

List (Optional)

The cloud services this FortiGate Virtual Machine supports. The default value is an empty list but may contain "FAMS", "SWNM", "FMGC", and "AFAC".

The fortiAnalyzer dictionary includes:

Attribute

Type

Description

storage

Integer

The daily storage (GB) between 5 and 8300.

adom

Integer

The number of ADOMs between 0 and 1200.

service

String

The support service. "FAZFC247" (FortiCare Premium) is currently the only available option and is the default.

The fortiPortal dictionary includes:

Attribute

Type

Description

device

Integer

The number of managed devices between 0 and 100000.

The fortiADC dictionary includes:

Attribute

Type

Description

cpu

String

The number of CPUs. This value can be "1", "2", "4", "8", "16", or 32.

service

String

The support service can be "FDVSTD" (Standard), "FDVADV" (Advanced), or "FDVFC247" (FortiCare Premium).

The fortiGateHardware dictionary includes:

Attribute

Type

Description

model

String

The device model. This value can be FGT40F (FortiGate-40F), FGT60F (FortiGate-60F), FGT70F (FortiGate-70F), FGT80F (FortiGate-80F), FG100F (FortiGate-100F), FGT60E (FortiGate-60E), FGT61F (FortiGate-61F), FG100E (FortiGate-100E), FG101F (FortiGate-101F), FG200E (FortiGate-200E), FG200F (FortiGate-200F), FG201F (FortiGate-201F), FG4H0F (FortiGate-400F), or FG6H0F (FortiGate-600F).

service

String

The support service can be FGHWFC247 (FortiCare Premium), FGHWFCEL (FortiCare Elite), FDVFC247 (ATP), FGHWUTP (UTP) or FGHWENT (Enterprise).

addons

String (Optional)

The add ons. Currently only supports the default value of "NONE".

Example

The following is an example use of this module:

- name: Update a FortiFlex configuration
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Update a FortiFlex configuration
      fortinet.fortiflexvm.fortiflexvm_configs_update:
        username: "{{ username }}"
        password: "{{ password }}"
        id: 3643
        name: "ansible_modify"
        status: "DISABLED" # ACTIVE or DISABLED

        # If FortiFlex API supports new params while FortiFlex Ansible does not support them yet,
        # you can set bypass_validation: true. The FortiFlex Ansible will allow you to use new param
        # without perforam any sanity check. The default value is false.
        bypass_validation: false

        # Check whether the parameters are set correctly before sending the data. The default value is false.
        # If set to true, FortiFlexVM Ansible will check the parameter correctness based on the rules.
        # It is only for debugging purposes, not recommended to set it as true since the rules in FortiFlexVM Ansible may be outdated.
        check_parameters: false

        # Please only use zero or one of the following.
        # If you want to update the configuration, please use the type you declared in fortiflexvm_configs_create.

        fortiGateBundle:
          cpu: "2"      # "1", "2", "4", "8", "16", "32", "2147483647"
          service: "FC" # "FC", "UTM", "ENT", "ATP"
          vdom: 10      # 0 ~ 500

        # fortiManager:
        #   device: 1                         # 1 ~ 100000
        #   adom: 1                           # 1 ~ 100000

        # fortiWeb:
        #   cpu: "4"                          # "1", "2", "4", "8", "16"
        #   service: "FWBSTD"                 # "FWBSTD" or "FWBADV"

        # fortiGateLCS:
        #   cpu: 4                            # 1 ~ 96
        #   fortiGuardServices: []            # "IPS", "AVDB", "FGSA", "DLDB", "FAIS", "FURLDNS"
        #   supportService: "FC247"           # "FC247", "ASET"
        #   vdom: 1                           # 1 ~ 500
        #   cloudServices: ["FAMS", "SWNM"]   # "FAMS", "SWNM", "AFAC", "FAZC"

        # fortiAnalyzer:
        #   storage: 5                        # 5 ~ 8300
        #   adom: 1                           # 0 ~ 1200
        #   service: "FAZFC247"               # "FAZFC247"

        # fortiPortal:
        #   device: 1                         # 0 ~ 100000

        # fortiADC:
        #   cpu: "1"                          # "1", "2", "4", "8", "16", "32"
        #   service: "FDVSTD"                 # "FDVSTD", "FDVADV" or "FDVFC247"

        # fortiGateHardware:
        #   model: "FGT40F"                   # "FGT40F", "FGT60F", "FGT70F", "FGT80F", "FG100F", "FGT60E", "FGT61F",
        #                                     # "FG100E", "FG101F", "FG200E", "FG200F", "FG201F", "FG4H0F", "FG6H0F"
        #   service: "FGHWFC247"              # "FGHWFC247", "FGHWFCEL", "FDVFC247", "FGHWUTP" or "FGHWENT"
        #   addons: "NONE"

      register: result

    - name: Display response
      debug:
        var: result.configs

Return values

The following parameters are returned:

Parameter

Type Returned

Description

configs

Dictionary

The configuration you update.

The configs dictionary includes:

Parameter

Type Returned

Description

id

Integer

The ID of the configuration.

name

String

The name of the configuration.

programSerialNumber

String

The program serial number the configuration belongs to.

status

String

The status of the configuration.

fortigateBundle

Dictionary (Changed)

The FortiGate Virtual Machine - Service Bundle.

fortiManager

Dictionary (Changed)

The FortiManager Virtual Machine.

fortiWeb

Dictionary (Changed)

The FortiWeb Virtual Machine - Service Bundle.

fortiGateLCS

Dictionary (Changed)

The FortiGate Virtual Machine - A La Carte Services.

fortiAnalyzer

Dictionary (Changed)

The FortiAnalyzer Virtual Machine.

fortiPortal

Dictionary (Changed)

The FortiPortal Virtual Machine.

fortiADC

Dictionary (Changed)

The FortiADC Virtual Machine.

fortiGateHardware

Dictionary (Changed)

The FortiGate Hardware.

See the Parameters for dictionary attributes that are always returned.

Update a FortiFlex configuration

Update a FortiFlex configuration

Use the fortiflexvm_configs_update module to update a FortiFlex configuration under a program.

Parameters

The following parameters are included:

Parameter

Type

Description

username

String (Optional)

The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME.

password

String (Optional)

The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD.

id

Integer

The ID of the configuration you want to update.

name

String (Optional)

The name of your FortiFlex configuration.

status

String (Optional)

The status of the configuration, either ACTIVE or DISABLED.

bypass_validation

Boolean (Optional)

Only set this to true when the module schema differs with FortiFlex API structure. The module continues to execute without validating parameters. The default value is false.

check_parameters

Boolean (Optional)

Will check whether the parameters are set correctly before sending the data. If it is set to true, FortiFlex Ansible will check the parameter correctness based on the rules. The default value is false.

This is only for debugging purposes. It is not recommended to set it as true in case the FortiFlex Ansible rules are outdated.

fortigateBundle

Dictionary (Optional)

The FortiGate Virtual Machine - Service Bundle.

fortiManager

Dictionary (Optional)

The FortiManager Virtual Machine.

fortiWeb

Dictionary (Optional)

The FortiWeb Virtual Machine - Service Bundle.

fortiGateLCS

Dictionary (Optional)

The FortiGate Virtual Machine - A La Carte Services.

fortiAnalyzer

Dictionary (Optional)

The FortiAnalyzer Virtual Machine.

fortiPortal

Dictionary (Optional)

The FortiPortal Virtual Machine.

fortiADC

Dictionary (Optional)

The FortiADC Virtual Machine.

fortiGateHardware

Dictionary (Optional)

The FortiGate Hardware.

The fortigateBundle dictionary includes:

Attribute

Type

Description

cpu

String

The number of CPUs. This value can be "1", "2", "4", "8", "16", "32", or "2147483647" (unlimited).

service

String

The value can be either "FC" (FortiCare), "UTM", "ENT" (Enterprise), or "ATP".

vdom

Integer (Optional)

The number of VDOMs between 0 and 500. The default value is 0.

The fortiManager dictionary includes:

Attribute

Type

Description

device

Integer

The number of managed devices between 1 and 100000.

adom

Integer

The number of ADOMs between 1 and 100000.

The fortiWeb dictionary includes:

Attribute

Type

Description

cpu

String

The number of CPUs. This value can be "1", "2", "4", "8", or "16".

service

String

The service package can be "FWBSTD" (Standard) or "FWBADV" (Advanced).

The fortiGateLCS dictionary includes:

Attribute

Type

Description

cpu

Integer

The number of CPUs between 1 and 96.

fortiGuardServices

List (Optional)

The FortiGuard services this FortiGate Virtual Machine supports. The default value is an empty list but may contain "IPS", "AVDB", "FURL", "IOTH", "FGSA", and "ISSS".

supportService

String

The value can be "FC247" (FortiCare 24x7) or "ASET" (FortiCare Elite).

vdom

Integer

The number of VDOMs between 1 and 500.

cloudServices

List (Optional)

The cloud services this FortiGate Virtual Machine supports. The default value is an empty list but may contain "FAMS", "SWNM", "FMGC", and "AFAC".

The fortiAnalyzer dictionary includes:

Attribute

Type

Description

storage

Integer

The daily storage (GB) between 5 and 8300.

adom

Integer

The number of ADOMs between 0 and 1200.

service

String

The support service. "FAZFC247" (FortiCare Premium) is currently the only available option and is the default.

The fortiPortal dictionary includes:

Attribute

Type

Description

device

Integer

The number of managed devices between 0 and 100000.

The fortiADC dictionary includes:

Attribute

Type

Description

cpu

String

The number of CPUs. This value can be "1", "2", "4", "8", "16", or 32.

service

String

The support service can be "FDVSTD" (Standard), "FDVADV" (Advanced), or "FDVFC247" (FortiCare Premium).

The fortiGateHardware dictionary includes:

Attribute

Type

Description

model

String

The device model. This value can be FGT40F (FortiGate-40F), FGT60F (FortiGate-60F), FGT70F (FortiGate-70F), FGT80F (FortiGate-80F), FG100F (FortiGate-100F), FGT60E (FortiGate-60E), FGT61F (FortiGate-61F), FG100E (FortiGate-100E), FG101F (FortiGate-101F), FG200E (FortiGate-200E), FG200F (FortiGate-200F), FG201F (FortiGate-201F), FG4H0F (FortiGate-400F), or FG6H0F (FortiGate-600F).

service

String

The support service can be FGHWFC247 (FortiCare Premium), FGHWFCEL (FortiCare Elite), FDVFC247 (ATP), FGHWUTP (UTP) or FGHWENT (Enterprise).

addons

String (Optional)

The add ons. Currently only supports the default value of "NONE".

Example

The following is an example use of this module:

- name: Update a FortiFlex configuration
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Update a FortiFlex configuration
      fortinet.fortiflexvm.fortiflexvm_configs_update:
        username: "{{ username }}"
        password: "{{ password }}"
        id: 3643
        name: "ansible_modify"
        status: "DISABLED" # ACTIVE or DISABLED

        # If FortiFlex API supports new params while FortiFlex Ansible does not support them yet,
        # you can set bypass_validation: true. The FortiFlex Ansible will allow you to use new param
        # without perforam any sanity check. The default value is false.
        bypass_validation: false

        # Check whether the parameters are set correctly before sending the data. The default value is false.
        # If set to true, FortiFlexVM Ansible will check the parameter correctness based on the rules.
        # It is only for debugging purposes, not recommended to set it as true since the rules in FortiFlexVM Ansible may be outdated.
        check_parameters: false

        # Please only use zero or one of the following.
        # If you want to update the configuration, please use the type you declared in fortiflexvm_configs_create.

        fortiGateBundle:
          cpu: "2"      # "1", "2", "4", "8", "16", "32", "2147483647"
          service: "FC" # "FC", "UTM", "ENT", "ATP"
          vdom: 10      # 0 ~ 500

        # fortiManager:
        #   device: 1                         # 1 ~ 100000
        #   adom: 1                           # 1 ~ 100000

        # fortiWeb:
        #   cpu: "4"                          # "1", "2", "4", "8", "16"
        #   service: "FWBSTD"                 # "FWBSTD" or "FWBADV"

        # fortiGateLCS:
        #   cpu: 4                            # 1 ~ 96
        #   fortiGuardServices: []            # "IPS", "AVDB", "FGSA", "DLDB", "FAIS", "FURLDNS"
        #   supportService: "FC247"           # "FC247", "ASET"
        #   vdom: 1                           # 1 ~ 500
        #   cloudServices: ["FAMS", "SWNM"]   # "FAMS", "SWNM", "AFAC", "FAZC"

        # fortiAnalyzer:
        #   storage: 5                        # 5 ~ 8300
        #   adom: 1                           # 0 ~ 1200
        #   service: "FAZFC247"               # "FAZFC247"

        # fortiPortal:
        #   device: 1                         # 0 ~ 100000

        # fortiADC:
        #   cpu: "1"                          # "1", "2", "4", "8", "16", "32"
        #   service: "FDVSTD"                 # "FDVSTD", "FDVADV" or "FDVFC247"

        # fortiGateHardware:
        #   model: "FGT40F"                   # "FGT40F", "FGT60F", "FGT70F", "FGT80F", "FG100F", "FGT60E", "FGT61F",
        #                                     # "FG100E", "FG101F", "FG200E", "FG200F", "FG201F", "FG4H0F", "FG6H0F"
        #   service: "FGHWFC247"              # "FGHWFC247", "FGHWFCEL", "FDVFC247", "FGHWUTP" or "FGHWENT"
        #   addons: "NONE"

      register: result

    - name: Display response
      debug:
        var: result.configs

Return values

The following parameters are returned:

Parameter

Type Returned

Description

configs

Dictionary

The configuration you update.

The configs dictionary includes:

Parameter

Type Returned

Description

id

Integer

The ID of the configuration.

name

String

The name of the configuration.

programSerialNumber

String

The program serial number the configuration belongs to.

status

String

The status of the configuration.

fortigateBundle

Dictionary (Changed)

The FortiGate Virtual Machine - Service Bundle.

fortiManager

Dictionary (Changed)

The FortiManager Virtual Machine.

fortiWeb

Dictionary (Changed)

The FortiWeb Virtual Machine - Service Bundle.

fortiGateLCS

Dictionary (Changed)

The FortiGate Virtual Machine - A La Carte Services.

fortiAnalyzer

Dictionary (Changed)

The FortiAnalyzer Virtual Machine.

fortiPortal

Dictionary (Changed)

The FortiPortal Virtual Machine.

fortiADC

Dictionary (Changed)

The FortiADC Virtual Machine.

fortiGateHardware

Dictionary (Changed)

The FortiGate Hardware.

See the Parameters for dictionary attributes that are always returned.