Describe the bug
The following script works for registered databases, as long as they have not been created as an item in Portal. https://support.esri.com/en-us/knowledge-base/how-to-programmatically-update-a-password-change-in-an--000022551. If a Portal item exists, management is required via the Portal item rather than arcgis/admin/data/item/enterpriseDatabases//edit which returns "The data store item can only be managed via Portal". Following the steps in the KB, ds.update() returns False. Attempts to update the Portal item result in the Portal item being updated, but not the Server datastore.
To Reproduce
- Register a database. This can be done through ArcGIS Pro (which natively creates a Portal item), or through Manager and then clicking the Create Item button (user profile icon)
- Follow steps in above KB article
- Observe the ds.update() returns False
- Attempt to update the Portal item
item = gis.content.get(<item_id>)
print(item.get_data())
# Replace the connectionString with what was generated from the KB steps
new_data = {"path", "type", "connectionString", etc...}
item.update(data=new_data)
- Navigate to the Portal item and settings. View that the Database Connection section shows the updated connectionString info, but the Server section no longer validates.
- Navigate to the datastore item in arcgis/admin. View that the connectionString does not match what was updated in Portal.
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
Successful update of datastore when Portal item exists and management is required via Portal.
Platform (please complete the following information):
- OS: Windows Server 2022
- Browser: NA
- Python API Version: 2.4.3
Additional context
Info also posted to https://community.esri.com/t5/arcgis-enterprise-ideas/expose-database-datastore-item-update-password-to/idi-p/1701215
Describe the bug
The following script works for registered databases, as long as they have not been created as an item in Portal. https://support.esri.com/en-us/knowledge-base/how-to-programmatically-update-a-password-change-in-an--000022551. If a Portal item exists, management is required via the Portal item rather than arcgis/admin/data/item/enterpriseDatabases//edit which returns "The data store item can only be managed via Portal". Following the steps in the KB, ds.update() returns False. Attempts to update the Portal item result in the Portal item being updated, but not the Server datastore.
To Reproduce
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
Successful update of datastore when Portal item exists and management is required via Portal.
Platform (please complete the following information):
Additional context
Info also posted to https://community.esri.com/t5/arcgis-enterprise-ideas/expose-database-datastore-item-update-password-to/idi-p/1701215