Skip to content

describe_db_cluster_snapshots

describe_db_cluster_snapshots(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    db_cluster_snapshot_identifier: Optional[String] = None,
    snapshot_type: Optional[String] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
    include_shared: Optional[Boolean] = None,
    include_public: Optional[Boolean] = None,
    db_cluster_resource_id: Optional[String] = None,
) -> DBClusterSnapshotMessage

Returns information about DB cluster snapshots. This API action supports pagination.

For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.

For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.

Parameters:

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

    The ID of the DB cluster to retrieve the list of DB cluster snapshots for. This parameter can't be used in conjunction with the DBClusterSnapshotIdentifier parameter. This parameter isn't case-sensitive.

    Constraints:

    • If supplied, must match the identifier of an existing DBCluster.

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

    A specific DB cluster snapshot identifier to describe. This parameter can't be used in conjunction with the DBClusterIdentifier parameter. This value is stored as a lowercase string.

    Constraints:

    • If supplied, must match the identifier of an existing DBClusterSnapshot.

    • If this identifier is for an automated snapshot, the SnapshotType parameter must also be specified.

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

    The type of DB cluster snapshots to be returned. You can specify one of the following values:

    • automated - Return all DB cluster snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.

    • manual - Return all DB cluster snapshots that have been taken by my Amazon Web Services account.

    • shared - Return all manual DB cluster snapshots that have been shared to my Amazon Web Services account.

    • public - Return all DB cluster snapshots that have been marked as public.

    If you don't specify a SnapshotType value, then both automated and manual DB cluster snapshots are returned. You can include shared DB cluster snapshots with these results by enabling the IncludeShared parameter. You can include public DB cluster snapshots with these results by enabling the IncludePublic parameter.

    The IncludeShared and IncludePublic parameters don't apply for SnapshotType values of manual or automated. The IncludePublic parameter doesn't apply when SnapshotType is set to shared. The IncludeShared parameter doesn't apply when SnapshotType is set to public.

  • filters (Optional[FilterList], default: None ) –

    A filter that specifies one or more DB cluster snapshots to describe.

    Supported filters:

    • db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs).

    • db-cluster-snapshot-id - Accepts DB cluster snapshot identifiers.

    • snapshot-type - Accepts types of DB cluster snapshots.

    • engine - Accepts names of database engines.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

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

    An optional pagination token provided by a previous DescribeDBClusterSnapshots request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

  • include_shared (Optional[Boolean], default: None ) –

    Specifies whether to include shared manual DB cluster snapshots from other Amazon Web Services accounts that this Amazon Web Services account has been given permission to copy or restore. By default, these snapshots are not included.

    You can give an Amazon Web Services account permission to restore a manual DB cluster snapshot from another Amazon Web Services account by the ModifyDBClusterSnapshotAttribute API action.

  • include_public (Optional[Boolean], default: None ) –

    Specifies whether to include manual DB cluster snapshots that are public and can be copied or restored by any Amazon Web Services account. By default, the public snapshots are not included.

    You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute API action.

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

    A specific DB cluster resource ID to describe.

Raises:

Examples:

To describe a DB cluster snapshot for a DB cluster The following example retrieves the details for the DB cluster snapshots for the specified DB cluster.

>>> client.describe_db_cluster_snapshots(db_cluster_identifier='mydbcluster')
Source code in docs_src/capo_rds/_services/rds.py
def describe_db_cluster_snapshots(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
    db_cluster_snapshot_identifier: Optional["capo_rds.types.string.String"] = None,
    snapshot_type: Optional["capo_rds.types.string.String"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
    include_shared: Optional["capo_rds.types.boolean.Boolean"] = None,
    include_public: Optional["capo_rds.types.boolean.Boolean"] = None,
    db_cluster_resource_id: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.db_cluster_snapshot_message.DBClusterSnapshotMessage":
    """<p>Returns information about DB cluster snapshots. This API action supports pagination.</p> <p>For more information on Amazon Aurora DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide</i>.</p>

    Args:
        db_cluster_identifier: <p>The ID of the DB cluster to retrieve the list of DB cluster snapshots for. This parameter can't be used in conjunction with the <code>DBClusterSnapshotIdentifier</code> parameter. This parameter isn't case-sensitive.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match the identifier of an existing DBCluster.</p> </li> </ul>
        db_cluster_snapshot_identifier: <p>A specific DB cluster snapshot identifier to describe. This parameter can't be used in conjunction with the <code>DBClusterIdentifier</code> parameter. This value is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match the identifier of an existing DBClusterSnapshot.</p> </li> <li> <p>If this identifier is for an automated snapshot, the <code>SnapshotType</code> parameter must also be specified.</p> </li> </ul>
        snapshot_type: <p>The type of DB cluster snapshots to be returned. You can specify one of the following values:</p> <ul> <li> <p> <code>automated</code> - Return all DB cluster snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.</p> </li> <li> <p> <code>manual</code> - Return all DB cluster snapshots that have been taken by my Amazon Web Services account.</p> </li> <li> <p> <code>shared</code> - Return all manual DB cluster snapshots that have been shared to my Amazon Web Services account.</p> </li> <li> <p> <code>public</code> - Return all DB cluster snapshots that have been marked as public.</p> </li> </ul> <p>If you don't specify a <code>SnapshotType</code> value, then both automated and manual DB cluster snapshots are returned. You can include shared DB cluster snapshots with these results by enabling the <code>IncludeShared</code> parameter. You can include public DB cluster snapshots with these results by enabling the <code>IncludePublic</code> parameter.</p> <p>The <code>IncludeShared</code> and <code>IncludePublic</code> parameters don't apply for <code>SnapshotType</code> values of <code>manual</code> or <code>automated</code>. The <code>IncludePublic</code> parameter doesn't apply when <code>SnapshotType</code> is set to <code>shared</code>. The <code>IncludeShared</code> parameter doesn't apply when <code>SnapshotType</code> is set to <code>public</code>.</p>
        filters: <p>A filter that specifies one or more DB cluster snapshots to describe.</p> <p>Supported filters:</p> <ul> <li> <p> <code>db-cluster-id</code> - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs).</p> </li> <li> <p> <code>db-cluster-snapshot-id</code> - Accepts DB cluster snapshot identifiers.</p> </li> <li> <p> <code>snapshot-type</code> - Accepts types of DB cluster snapshots.</p> </li> <li> <p> <code>engine</code> - Accepts names of database engines.</p> </li> </ul>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so you can retrieve the remaining results.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>
        marker: <p>An optional pagination token provided by a previous <code>DescribeDBClusterSnapshots</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
        include_shared: <p>Specifies whether to include shared manual DB cluster snapshots from other Amazon Web Services accounts that this Amazon Web Services account has been given permission to copy or restore. By default, these snapshots are not included.</p> <p>You can give an Amazon Web Services account permission to restore a manual DB cluster snapshot from another Amazon Web Services account by the <code>ModifyDBClusterSnapshotAttribute</code> API action.</p>
        include_public: <p>Specifies whether to include manual DB cluster snapshots that are public and can be copied or restored by any Amazon Web Services account. By default, the public snapshots are not included.</p> <p>You can share a manual DB cluster snapshot as public by using the <a>ModifyDBClusterSnapshotAttribute</a> API action.</p>
        db_cluster_resource_id: <p>A specific DB cluster resource ID to describe.</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 a DB cluster snapshot for a DB cluster
        The following example retrieves the details for the DB cluster snapshots for the specified DB cluster.

        >>> client.describe_db_cluster_snapshots(db_cluster_identifier='mydbcluster')
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.describe_db_cluster_snapshots_message.DescribeDBClusterSnapshotsMessage]",
    ) -> OperationResponse[
        "capo_rds.types.db_cluster_snapshot_message.DBClusterSnapshotMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_cluster_snapshots

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.describe_db_cluster_snapshots.describe_db_cluster_snapshots(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBClusterSnapshots")
    )
    input_: capo_rds.types.describe_db_cluster_snapshots_message.DescribeDBClusterSnapshotsMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if db_cluster_snapshot_identifier is not None:
        input_["db_cluster_snapshot_identifier"] = db_cluster_snapshot_identifier
    if snapshot_type is not None:
        input_["snapshot_type"] = snapshot_type
    if filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker
    if include_shared is not None:
        input_["include_shared"] = include_shared
    if include_public is not None:
        input_["include_public"] = include_public
    if db_cluster_resource_id is not None:
        input_["db_cluster_resource_id"] = db_cluster_resource_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output