boto3 rds modify_db_snapshot_attribute没有做任何事情

时间:2016-04-08 11:49:22

标签: python amazon-rds boto3

我想在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': []}]}

我没有得到任何错误 - 之前我所拥有的状态相同。这是怎么回事?我如何让它工作?

1 个答案:

答案 0 :(得分:0)

这已在僵尸issue on github

的更新中修复