Skip to content

describe_db_cluster_snapshot_attributes async

describe_db_cluster_snapshot_attributes(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_snapshot_identifier: Optional[String] = None,
) -> DescribeDBClusterSnapshotAttributesResult

Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.

When sharing snapshots with other Amazon Web Services accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for the Amazon Web Services accounts that are authorized to copy or restore the manual DB cluster snapshot. If all is included in the list of values for the restore attribute, then the manual DB cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts.

To add or remove access for an Amazon Web Services account to copy or restore a manual DB cluster snapshot, or to make the manual DB cluster snapshot public or private, use the ModifyDBClusterSnapshotAttribute API action.

Parameters:

  • db_cluster_snapshot_identifier (Optional[String], default: None ) –

    The identifier for the DB cluster snapshot to describe the attributes for.

Raises:

Examples:

To describe the attribute names and values for a DB cluster snapshot The following example retrieves details of the attribute names and values for the specified DB cluster snapshot.

>>> await client.describe_db_cluster_snapshot_attributes(db_cluster_snapshot_identifier='myclustersnapshot')
Source code in docs_src/capo_rds/_services/async_rds.py
async def describe_db_cluster_snapshot_attributes(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_snapshot_identifier: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.describe_db_cluster_snapshot_attributes_result.DescribeDBClusterSnapshotAttributesResult":
    """<p>Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.</p> <p>When sharing snapshots with other Amazon Web Services accounts, <code>DescribeDBClusterSnapshotAttributes</code> returns the <code>restore</code> attribute and a list of IDs for the Amazon Web Services accounts that are authorized to copy or restore the manual DB cluster snapshot. If <code>all</code> is included in the list of values for the <code>restore</code> attribute, then the manual DB cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts.</p> <p>To add or remove access for an Amazon Web Services account to copy or restore a manual DB cluster snapshot, or to make the manual DB cluster snapshot public or private, use the <code>ModifyDBClusterSnapshotAttribute</code> API action.</p>

    Args:
        db_cluster_snapshot_identifier: <p>The identifier for the DB cluster snapshot to describe the attributes for.</p>

    Raises:
        capo_rds.errors.db_cluster_snapshot_not_found_fault.DBClusterSnapshotNotFoundFault: <p> <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster snapshot.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe the attribute names and values for a DB cluster snapshot
        The following example retrieves details of the attribute names and values for the specified DB cluster snapshot.

        >>> await client.describe_db_cluster_snapshot_attributes(db_cluster_snapshot_identifier='myclustersnapshot')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.describe_db_cluster_snapshot_attributes_message.DescribeDBClusterSnapshotAttributesMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.describe_db_cluster_snapshot_attributes_result.DescribeDBClusterSnapshotAttributesResult"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_cluster_snapshot_attributes

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.describe_db_cluster_snapshot_attributes.async_describe_db_cluster_snapshot_attributes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBClusterSnapshotAttributes")
    )
    input_: capo_rds.types.describe_db_cluster_snapshot_attributes_message.DescribeDBClusterSnapshotAttributesMessage = {}
    if db_cluster_snapshot_identifier is not None:
        input_["db_cluster_snapshot_identifier"] = db_cluster_snapshot_identifier

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output