我想在rds快照上设置restore属性,以便我可以从另一个帐户访问它们,这是我必须实现的代码:
params = dict(DBSnapshotIdentifier=snapshot_identifier,
AttributeName=attribute_name)
if remove:
params['ValuesToRemove'] = [str(value)]
else:
params['ValuesToAdd'] = [str(value)]
response = self.client.modify_db_snapshot_attribute(**params)
当我运行该代码时,检查前后的属性以及响应值:
DBSnapshotAttributesResult {u'DBSnapshotIdentifier': 'test-api-db-restore01-snapshot-2016-04-01', u'DBSnapshotAttributes': [{u'AttributeName': 'restore', u'AttributeValues': []}]}
{u'DBSnapshotAttributesResult':{u'DBSnapshotIdentifier':'test-api-db-restore01-snapshot-2016-04-01',u'DBSnapshotAttributes':[{u'AttributeName':'restore',u 'AttributeValues':[]}]}
DBSnapshotAttributesResult {u'DBSnapshotIdentifier': 'test-api-db-restore01-snapshot-2016-04-01', u'DBSnapshotAttributes': [{u'AttributeName': 'restore', u'AttributeValues': []}]}
我没有得到任何错误 - 之前我所拥有的状态相同。这是怎么回事?我如何让它工作?