Description

The addVDBUpdateImmediate operation handles configuration related to VDBUpdateImmediate model.  This API call is not allowed on the standby unit in an HA pair.

HTTP request

POST /api/fdm/v3/action/updatevdb

Data Parameters

Parameter Required Type Description
scheduleType False string A mandatory enum value that specifies the type of job schedule. Only allowed value is:

IMMEDIATE - the job will be posted when the request is received.

Note that the job will be posted in the queue when it is received, but the actual execution can be delayed if other jobs were scheduled for execution at the same time or are being currently processed. After a system restart the job will not be recovered.

user False string System provided ID of the user who scheduled the job.
Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist)
forceOperation False boolean For Internal use.
jobHistoryUuid False string For Internal use.
Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist)
ipAddress False string IP address of actor who initiated a job execution
Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist)
name False string The name of this VDB update.
Field level constraints: length must be between 0 and 32 (inclusive), must match pattern ^[a-zA-Z0-9][a-zA-Z0-9_+-]*$. (Note: Additional constraints might exist)
description False string A string describing this object.
Field level constraints: length must be between 0 and 200 (inclusive). (Note: Additional constraints might exist)
deployAfterUpdate False boolean A Boolean value, TRUE or FALSE (the default). The TRUE value indicates that the VDB update will be deployed after it is completed.
jobName False string See derived class.
type True string A UTF8 string, all letters lower-case, that represents the class-type. This corresponds to the class name.

Example

curl -X POST \
    --header "Accept: application/json" \
    --header "Authorization: Bearer ${ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    -d '{
        "deployAfterUpdate": true,
        "description": "string",
        "forceOperation": true,
        "id": "string",
        "ipAddress": "string",
        "jobHistoryUuid": "string",
        "jobName": "string",
        "name": "string",
        "scheduleType": "NONE",
        "type": "vdbupdateimmediate",
        "user": "string",
        "version": "string"
    }' \
    "https://${HOST}:${PORT}/api/fdm/v3/action/updatevdb"
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient


def get_client(host, token):
    http_client = RequestsClient()
    http_client.ssl_verify = False
    http_client.set_api_key(
        host,
        "Bearer {}".format(token),
        param_name="Authorization",
        param_in="header"
    )
    return SwaggerClient.from_url(
        "https://{}/apispec/ngfw.json".format(host),
        http_client=http_client,
        config={
            "validate_responses": False,
            "validate_swagger_spec": False
        }
    )


def add_vdb_update_immediate(client, body):
    return client.VDBUpdateImmediate.addVDBUpdateImmediate(
        body=body
    ).response().result


if __name__ == "__main__":
    host = "ftd.example.com"
    token = "access_token"
    client = get_client(host, token)

    body = {'deployAfterUpdate': True,
 'description': 'string',
 'forceOperation': True,
 'ipAddress': 'string',
 'jobHistoryUuid': 'string',
 'jobName': 'string',
 'name': 'string',
 'scheduleType': 'NONE',
 'type': 'vdbupdateimmediate',
 'user': 'string'}

    add_vdb_update_immediate(client, body)