Thanks for following up on my reply. I have a little better handle on this now, but I am still unsure how to connect to an existing feature. I would assume that I would use the url on the feature layer page, but I am not able to find the function that would connect something like that. as far as the rest of the script that I have put together. I am using the overwrite() function
current_file = FeatureLayerCollection.fromitem.fromitem('https://metroas08.metrostlouis.org/arcserver/rest/services/MetroBusStopsByLine_191021/MapServer/0')
current_file.manager.overwrite(current_file.manager.overwrite('AutomationExports.gdb/MetroBusStopsByLine_191021'))
and I am getting the following error
Traceback (most recent call last):
File "W:/Research&Development/Data-Share/layers/trapeze/MetroBusStops/AutomationExports/py/CSV_2_FeatureClass_2_DataStore.py", line 69, in <module>
current_file = FeatureLayerCollection.fromitem('https://url/arcserver/rest/services/MetroBusStopsByLine_191021/MapServer/0')
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 9509, in fromitem
if not item.type.lower().endswith('service'):
AttributeError: 'str' object has no attribute 'type'