modify_db_cluster_snapshot_attribute
¶
modify_db_cluster_snapshot_attribute(
*,
config_overrides: Optional[RDSClientConfig] = None,
db_cluster_snapshot_identifier: Optional[String] = None,
attribute_name: Optional[String] = None,
values_to_add: Optional[AttributeValueList] = None,
values_to_remove: Optional[AttributeValueList] = None,
) -> ModifyDBClusterSnapshotAttributeResult
Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
To share a manual DB cluster snapshot with other Amazon Web Services accounts, specify restore as the AttributeName and use the ValuesToAdd parameter to add a list of IDs of the Amazon Web Services accounts that are authorized to restore the manual DB cluster snapshot. Use the value all to make the manual DB cluster snapshot public, which means that it can be copied or restored by all Amazon Web Services accounts.
Don't add the all value for any manual DB cluster snapshots that contain private information that you don't want available to all Amazon Web Services accounts.
If a manual DB cluster snapshot is encrypted, it can be shared, but only by specifying a list of authorized Amazon Web Services account IDs for the ValuesToAdd parameter. You can't use all as a value for that parameter in this case.
To view which Amazon Web Services accounts have access to copy or restore a manual DB cluster snapshot, or whether a manual DB cluster snapshot is public or private, use the DescribeDBClusterSnapshotAttributes API operation. The accounts are returned as values for the restore attribute.
Parameters:
-
db_cluster_snapshot_identifier(Optional[String], default:None) –The identifier for the DB cluster snapshot to modify the attributes for.
-
attribute_name(Optional[String], default:None) –The name of the DB cluster snapshot attribute to modify.
To manage authorization for other Amazon Web Services accounts to copy or restore a manual DB cluster snapshot, set this value to
restore.To view the list of attributes available to modify, use the DescribeDBClusterSnapshotAttributes API operation.
-
values_to_add(Optional[AttributeValueList], default:None) –A list of DB cluster snapshot attributes to add to the attribute specified by
AttributeName.To authorize other Amazon Web Services accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more Amazon Web Services account IDs, or
allto make the manual DB cluster snapshot restorable by any Amazon Web Services account. Do not add theallvalue for any manual DB cluster snapshots that contain private information that you don't want available to all Amazon Web Services accounts. -
values_to_remove(Optional[AttributeValueList], default:None) –A list of DB cluster snapshot attributes to remove from the attribute specified by
AttributeName.To remove authorization for other Amazon Web Services accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more Amazon Web Services account identifiers, or
allto remove authorization for any Amazon Web Services account to copy or restore the DB cluster snapshot. If you specifyall, an Amazon Web Services account whose account ID is explicitly added to therestoreattribute can still copy or restore a manual DB cluster snapshot.
Raises:
-
DBClusterSnapshotNotFoundFault–DBClusterSnapshotIdentifierdoesn't refer to an existing DB cluster snapshot. -
InvalidDBClusterSnapshotStateFault–The supplied value isn't a valid DB cluster snapshot state.
-
SharedSnapshotQuotaExceededFault–You have exceeded the maximum number of accounts that you can share a manual DB snapshot with.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To modify a DB cluster snapshot attribute The following example makes changes to the specified DB cluster snapshot attribute.
>>> client.modify_db_cluster_snapshot_attribute(db_cluster_snapshot_identifier='myclustersnapshot', attribute_name='restore', values_to_add=['123456789012'])
Source code in docs_src/capo_rds/_services/rds.py
10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 | |