I'm writing a Python script that will require access to non-token-based ArcGIS Server services. Looking at the ArcPy documentation, the approach is to use ImportCredentials.
In its simplest form, here's my Python script:
import arcpy
arcpy.ImportCredentials(my_ags_file)
Attempting to lint or run this code in Visual Studio Code results in the error:
Module 'arcpy' has no 'ImportCredentials' member
What am I doing wrong?
Using ArcGIS Pro 2.5.1 and ArcGIS Server 10.8.1