1
我想使用boto在我的SimpleDB中修改ItemNames。雖然我已經能夠使用item ['attr'] = xxxxxx輕鬆更改屬性,但我一直無法弄清楚如何自己更改ItemNames。我的失敗嘗試如下所示。任何指導將不勝感激。使用boto在SimpleDB中更改ItemName(主鍵)
connection = boto.connect_sdb(ACCESS_KEY,SECRET_KEY)
domain = connection.get_domain(domain_name)
new_unique_name = 'MyNewPrimaryKey'
item = domain.get_item('CurrentPrimaryKey')
item.name = new_unique_name
item.save
謝謝Ashish。我想更改爲ItemNames的新命名模式,因此我將重新創建它們並刪除舊記錄,因爲ItemNames無法修改。 – SnowPuffKing