Skip to content

describe_db_snapshot_tenant_databases

describe_db_snapshot_tenant_databases(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_instance_identifier: Optional[String] = None,
    db_snapshot_identifier: Optional[String] = None,
    snapshot_type: Optional[String] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
    dbi_resource_id: Optional[String] = None,
) -> DBSnapshotTenantDatabasesMessage

Describes the tenant databases that exist in a DB snapshot. This command only applies to RDS for Oracle DB instances in the multi-tenant configuration.

You can use this command to inspect the tenant databases within a snapshot before restoring it. You can't directly interact with the tenant databases in a DB snapshot. If you restore a snapshot that was taken from DB instance using the multi-tenant configuration, you restore all its tenant databases.

Parameters:

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

    The ID of the DB instance used to create the DB snapshots. This parameter isn't case-sensitive.

    Constraints:

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

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

    The ID of a DB snapshot that contains the tenant databases to describe. This value is stored as a lowercase string.

    Constraints:

    • If you specify this parameter, the value must match the ID of an existing DB snapshot.

    • If you specify an automatic snapshot, you must also specify SnapshotType.

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

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

    • automated – All DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.

    • manual – All DB snapshots that have been taken by my Amazon Web Services account.

    • shared – All manual DB snapshots that have been shared to my Amazon Web Services account.

    • public – All DB snapshots that have been marked as public.

    • awsbackup – All DB snapshots managed by the Amazon Web Services Backup service.

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

    A filter that specifies one or more tenant databases to describe.

    Supported filters:

    • tenant-db-name - Tenant database names. The results list only includes information about the tenant databases that match these tenant DB names.

    • tenant-database-resource-id - Tenant database resource identifiers. The results list only includes information about the tenant databases contained within the DB snapshots.

    • dbi-resource-id - DB instance resource identifiers. The results list only includes information about snapshots containing tenant databases contained within the DB instances identified by these resource identifiers.

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

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

    • snapshot-type - Accepts types of DB snapshots.

  • 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 that you can retrieve the remaining results.

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

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

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

    A specific DB resource identifier to describe.

Raises:

Source code in docs_src/capo_rds/_services/rds.py
def describe_db_snapshot_tenant_databases(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_instance_identifier: Optional["capo_rds.types.string.String"] = None,
    db_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,
    dbi_resource_id: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.db_snapshot_tenant_databases_message.DBSnapshotTenantDatabasesMessage":
    """<p>Describes the tenant databases that exist in a DB snapshot. This command only applies to RDS for Oracle DB instances in the multi-tenant configuration.</p> <p>You can use this command to inspect the tenant databases within a snapshot before restoring it. You can't directly interact with the tenant databases in a DB snapshot. If you restore a snapshot that was taken from DB instance using the multi-tenant configuration, you restore all its tenant databases.</p>

    Args:
        db_instance_identifier: <p>The ID of the DB instance used to create the DB snapshots. This parameter isn't case-sensitive.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match the identifier of an existing <code>DBInstance</code>.</p> </li> </ul>
        db_snapshot_identifier: <p>The ID of a DB snapshot that contains the tenant databases to describe. This value is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>If you specify this parameter, the value must match the ID of an existing DB snapshot.</p> </li> <li> <p>If you specify an automatic snapshot, you must also specify <code>SnapshotType</code>.</p> </li> </ul>
        snapshot_type: <p>The type of DB snapshots to be returned. You can specify one of the following values:</p> <ul> <li> <p> <code>automated</code> – All DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.</p> </li> <li> <p> <code>manual</code> – All DB snapshots that have been taken by my Amazon Web Services account.</p> </li> <li> <p> <code>shared</code> – All manual DB snapshots that have been shared to my Amazon Web Services account.</p> </li> <li> <p> <code>public</code> – All DB snapshots that have been marked as public.</p> </li> <li> <p> <code>awsbackup</code> – All DB snapshots managed by the Amazon Web Services Backup service.</p> </li> </ul>
        filters: <p>A filter that specifies one or more tenant databases to describe.</p> <p>Supported filters:</p> <ul> <li> <p> <code>tenant-db-name</code> - Tenant database names. The results list only includes information about the tenant databases that match these tenant DB names.</p> </li> <li> <p> <code>tenant-database-resource-id</code> - Tenant database resource identifiers. The results list only includes information about the tenant databases contained within the DB snapshots.</p> </li> <li> <p> <code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about snapshots containing tenant databases contained within the DB instances identified by these resource identifiers.</p> </li> <li> <p> <code>db-instance-id</code> - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs).</p> </li> <li> <p> <code>db-snapshot-id</code> - Accepts DB snapshot identifiers.</p> </li> <li> <p> <code>snapshot-type</code> - Accepts types of DB snapshots.</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 that you can retrieve the remaining results.</p>
        marker: <p>An optional pagination token provided by a previous <code>DescribeDBSnapshotTenantDatabases</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>
        dbi_resource_id: <p>A specific DB resource identifier to describe.</p>

    Raises:
        capo_rds.errors.db_snapshot_not_found_fault.DBSnapshotNotFoundFault: <p> <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.describe_db_snapshot_tenant_databases_message.DescribeDBSnapshotTenantDatabasesMessage]",
    ) -> OperationResponse[
        "capo_rds.types.db_snapshot_tenant_databases_message.DBSnapshotTenantDatabasesMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_snapshot_tenant_databases

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBSnapshotTenantDatabases")
    )
    input_: capo_rds.types.describe_db_snapshot_tenant_databases_message.DescribeDBSnapshotTenantDatabasesMessage = {}
    if db_instance_identifier is not None:
        input_["db_instance_identifier"] = db_instance_identifier
    if db_snapshot_identifier is not None:
        input_["db_snapshot_identifier"] = db_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 dbi_resource_id is not None:
        input_["dbi_resource_id"] = dbi_resource_id

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