You can add a nested endpoint by running the following command – consider changing the parameters' values to your values:
az network traffic-manager endpoint create --name CLIEndpoint --profile-name CLIProfile --resource-group PacktPub --type externalEndpoints --target-resource-id <Enter the resource id> --endpoint-location westeurope –-target childprofile.trafficmanager.net --min-child-endpoints 1