Description

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

HTTP request

POST /api/fdm/v6/devicesettings/default/ddnsservices

Data Parameters

Parameter Required Type Description
name True string A string containing the name of the object, up to 235 characters in length
webUpdateType True string An enum value that specifies the types of addresses to be updated, based on what is supported by your DDNS service provider. Supported values are ['ALL_ADDRESSES', 'IPV4_ADDRESS', 'IPV4_ONE_IPV6_ADDRESS', 'ONE_IPV6_ADDRESS', 'ALL_IPV6_ADDRESSES']
Field level constraints: cannot be null. (Note: Additional constraints might exist)
serviceProvider True string An enum value that specifies the type of service provider. Supported values are ['NO_IP', 'DYNDNS', 'GOOGLE', 'FMC_LTP', 'CUSTOM_URL']
Field level constraints: cannot be null. (Note: Additional constraints might exist)
customWebURL False string The URL of the Custom Service Provider
Field level constraints: length must be between 0 and 511 (inclusive). (Note: Additional constraints might exist)
userName False string The username of the DDNS Service Provider
password False string The password of the DDNS Service Provider
ddnsInterfaceSettings True [object] An object containing list of ddns interface settings.
Field level constraints: cannot be null. (Note: Additional constraints might exist)
updateInterval True string An enum value that specifies the type of update interval. Supported values are ['ON_CHANGE', 'HOURLY', 'DAILY', 'MONTHLY']
Field level constraints: cannot be null. (Note: Additional constraints might exist)
runTimes False string A mandatory UTF8 string containing a cron specification (following the Java(tm)/Spring(tm) conventions).

The string must contain six space-separated fields representing the seconds, minutes, hours, dayOfTheMonth, month, dayOfTheWeek, year (time is in UTC). Depending on the scheduleType some values are not allowed. For the HOURLY schedule type the following constraints apply: seconds = 0; minutes: 0, hours: , dayOfTheMonth: ?, month: *, dayOfTheWeek: *, year: .
For the DAILY schedule type the following constraints apply: seconds = 0; minutes: 0-59, hours: 0-23, dayOfTheMonth: *, month: *, dayOfTheWeek: *, year: .
For the MONTHLY schedule type the following constraints apply: seconds = 0; minutes: 0-59, hours: 0-23, dayOfTheMonth: 1-31, month: *, dayOfTheWeek: ?, year: .

Examples:
'0 0 12 * * ? ' - schedule at 12:00 PM (noon) every day.

'0 15 10 15 * ? ' - schedule at 10:15 AM on the 15th day of every month.
'0 59 23 31 1 ? 2020' schedule at 11:59 PM on Jan/31 2020.
Field level constraints: length must be between 0 and 200 (inclusive), must match pattern ^((?!;).)

$. (Note: Additional constraints might exist)

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 '{
        "customWebURL": "string",
        "ddnsInterfaceSettings": [
            {
                "hostName": "string",
                "interface": {
                    "id": "string",
                    "name": "string",
                    "type": "string",
                    "version": "string"
                },
                "type": "ddnsinterfacesettings"
            }
        ],
        "id": "string",
        "name": "string",
        "password": "string",
        "runTimes": "string",
        "serviceProvider": "NO_IP",
        "type": "ddnsservice",
        "updateInterval": "ON_CHANGE",
        "userName": "string",
        "version": "string",
        "webUpdateType": "ALL_ADDRESSES"
    }' \
    "https://${HOST}:${PORT}/api/fdm/v6/devicesettings/default/ddnsservices"
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_ddns_service(client, body):
    return client.DDNSService.addDDNSService(
        body=body
    ).response().result


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

    body = {'customWebURL': 'string',
 'ddnsInterfaceSettings': [{'hostName': 'string',
                            'interface': {'id': 'string',
                                          'name': 'string',
                                          'type': 'string',
                                          'version': 'string'},
                            'type': 'ddnsinterfacesettings'}],
 'name': 'string',
 'password': 'string',
 'runTimes': 'string',
 'serviceProvider': 'NO_IP',
 'type': 'ddnsservice',
 'updateInterval': 'ON_CHANGE',
 'userName': 'string',
 'webUpdateType': 'ALL_ADDRESSES'}

    add_ddns_service(client, body)