modify_db_cluster_snapshot_attribute
async
¶
modify_db_cluster_snapshot_attribute(
*,
config_overrides: Optional[AsyncRDSClientConfig] = 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.
>>> await 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/async_rds.py
10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 | |