def METHOD_NAME(client,
                                     resource_group_name,
                                     resource_name,
                                     location=None,
                                     tags=None,
                                     namespace=None,
                                     extension_properties=None,
                                     maintenance_scope=None,
                                     visibility=None,
                                     start_date_time=None,
                                     expiration_date_time=None,
                                     duration=None,
                                     time_zone=None,
                                     recur_every=None,
                                     reboot_setting=None,
                                     windows_parameters=None,
                                     linux_parameters=None,
                                     pre_tasks=None,
                                     post_tasks=None):
    configuration = {}
    if location is not None:
        configuration['location'] = location
    if tags is not None:
        configuration['tags'] = tags
    if namespace is not None:
        configuration['namespace'] = namespace
    if extension_properties is not None:
        configuration['extension_properties'] = extension_properties
    if maintenance_scope is not None:
        configuration['maintenance_scope'] = maintenance_scope
    if visibility is not None:
        configuration['visibility'] = visibility
    if start_date_time is not None:
        configuration['start_date_time'] = start_date_time
    if expiration_date_time is not None:
        configuration['expiration_date_time'] = expiration_date_time
    if duration is not None:
        configuration['duration'] = duration
    if time_zone is not None:
        configuration['time_zone'] = time_zone
    if recur_every is not None:
        configuration['recur_every'] = recur_every
    configuration['install_patches'] = {}
    if reboot_setting is not None:
        configuration['install_patches']['reboot_setting'] = reboot_setting
    if windows_parameters is not None:
        configuration['install_patches']['windows_parameters'] = windows_parameters
    if linux_parameters is not None:
        configuration['install_patches']['linux_parameters'] = linux_parameters
    if pre_tasks is not None:
        configuration['install_patches']['pre_tasks'] = pre_tasks
    if post_tasks is not None:
        configuration['install_patches']['post_tasks'] = post_tasks
    if len(configuration['install_patches']) == 0:
        del configuration['install_patches']
    return client.create_or_update(resource_group_name=resource_group_name,
                                   resource_name=resource_name,
                                   configuration=configuration)