I am trying to access a feature layer within my Portal using the layers path. I have been accessing the data within Visual Studio Code using the feature layers ID like this:
feature_service_layer = gis.content.get('964b4b7b112347e9ff76609bfc75432').layers[0]
I'd like to make a Geoprocessing tool out of the code. The tool would accept the parameter under the format of the URL which would be something along the lines of: 'https://maps.portaladdress.com/arcgis/rest/services/Hosted/Feature_layer/FeatureServer/0'
I have tried to add the URL to the code but it is unsuccessful. Here is what it looked like (I also tried the .Search method):
feature_service_layer = gis.content.get(https://maps.portaladdress.com/arcgis/rest/services/Hosted/Feature_layer/FeatureServer/0)
feature_service_layer = gis.content.search(https://maps.portaladdress.com/arcgis/rest/services/Hosted/Feature_layer/FeatureServer/0)
If I can't use these methods how am I supposed to take a feature layer in as a parameter and access its data?