You can add a Traffic Manager endpoint to Azure CLI 2.0 by running the following cmdlet:
az network traffic-manager endpoint create --name CLIEndpoint --profile-name CLIProfile --resource-group PacktPub --type azureEndpoints --target-resource-id <Enter the resource id>