Description

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

When an FMCRegistrationSettings object is present, FDM configuration access will be limited to read only, except the following APIs:
  - /devices/default/fmcregistrationsettings
  - /devices/default/fmcregistrationsettings/{objId}
  - /operational/deploy
  - /action/connecttest
  - /action/registerfmc

HTTP request

POST /api/fdm/v6/devices/default/fmcregistrationsettings

Data Parameters

Parameter Required Type Description
name False string A string that represents the name of the object
fmcConnectivityInterface False object The device interface through which the FMC will manage the device.
Allowed types are: [PhysicalInterface]
fmcHost False string The FQDN or IP address of the FMC.
Field level constraints: must be a valid host (FQDN or IP)
registrationKey True string A one-time registration key of your choice that you will also specify on the FMC when you register the FTD.
Field level constraints: length must be between 2 and 36 (inclusive), must match pattern ^[A-Za-z0-9-]+$
Field level constraints: cannot be blank or empty. (Note: Additional constraints might exist)
natId False string A unique, one-time string of your choice that you will also specify on the FMC when you register the FTD when one side does not specify a reachable IP address or hostname. This ID cannot be used for any other devices registering to the FMC.
Field level constraints: length must be between 2 and 36 (inclusive), must match pattern ^[A-Za-z0-9]*$
useManagementInterface False boolean A boolean value, TRUE or FALSE (the default). The value TRUE would allow the use of management Interface in NON_CONVERGED mode through which the FMC will manage the device. FALSE would allow the use of data Interfaces through which the FMC will manage the device.
preserveCloud False boolean A boolean value, TRUE or FALSE (the default). The value TRUE indicates that device cloud enrollment will not be unregistered when the device moves to offbox mode. FALSE indicates that device cloud enrollment will be unregistered when the device moves to offbox mode.
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 '{
        "fmcConnectivityInterface": {
            "id": "string",
            "name": "string",
            "type": "string",
            "version": "string"
        },
        "fmcHost": "string",
        "id": "string",
        "name": "string",
        "natId": "string",
        "preserveCloud": true,
        "registrationKey": "string",
        "type": "fmcregistrationsettings",
        "useManagementInterface": true,
        "version": "string"
    }' \
    "https://${HOST}:${PORT}/api/fdm/v6/devices/default/fmcregistrationsettings"
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_fmc_registration_settings(client, body):
    return client.FMCRegistration.addFMCRegistrationSettings(
        body=body
    ).response().result


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

    body = {'fmcConnectivityInterface': {'id': 'string',
                              'name': 'string',
                              'type': 'string',
                              'version': 'string'},
 'fmcHost': 'string',
 'name': 'string',
 'natId': 'string',
 'preserveCloud': True,
 'registrationKey': 'string',
 'type': 'fmcregistrationsettings',
 'useManagementInterface': True}

    add_fmc_registration_settings(client, body)