Skip to content

describe_tenant_databases async

describe_tenant_databases(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_instance_identifier: Optional[String] = None,
    tenant_db_name: Optional[String] = None,
    filters: Optional[FilterList] = None,
    marker: Optional[String] = None,
    max_records: Optional[IntegerOptional] = None,
) -> TenantDatabasesMessage

Describes the tenant databases in a DB instance that uses the multi-tenant configuration. Only RDS for Oracle CDB instances are supported.

Parameters:

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

    The user-supplied DB instance identifier, which must match the identifier of an existing instance owned by the Amazon Web Services account. This parameter isn't case-sensitive.

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

    The user-supplied tenant database name, which must match the name of an existing tenant database on the specified DB instance owned by your Amazon Web Services account. This parameter isn’t case-sensitive.

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

    A filter that specifies one or more database tenants 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.

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

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

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

  • 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.

Raises:

Source code in docs_src/capo_rds/_services/async_rds.py
async def describe_tenant_databases(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_instance_identifier: Optional["capo_rds.types.string.String"] = None,
    tenant_db_name: Optional["capo_rds.types.string.String"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
) -> "capo_rds.types.tenant_databases_message.TenantDatabasesMessage":
    """<p>Describes the tenant databases in a DB instance that uses the multi-tenant configuration. Only RDS for Oracle CDB instances are supported.</p>

    Args:
        db_instance_identifier: <p>The user-supplied DB instance identifier, which must match the identifier of an existing instance owned by the Amazon Web Services account. This parameter isn't case-sensitive.</p>
        tenant_db_name: <p>The user-supplied tenant database name, which must match the name of an existing tenant database on the specified DB instance owned by your Amazon Web Services account. This parameter isn’t case-sensitive.</p>
        filters: <p>A filter that specifies one or more database tenants 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.</p> </li> <li> <p> <code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about the tenants contained within the DB instances identified by these resource identifiers.</p> </li> </ul>
        marker: <p>An optional pagination token provided by a previous <code>DescribeTenantDatabases</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>
        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>

    Raises:
        capo_rds.errors.db_instance_not_found_fault.DBInstanceNotFoundFault: <p> <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.describe_tenant_databases_message.DescribeTenantDatabasesMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.tenant_databases_message.TenantDatabasesMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_tenant_databases

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

    def _redact_output(
        output: "capo_rds.types.tenant_databases_message.TenantDatabasesMessage",
    ) -> dict[str, Any]:
        import capo_rds.types.tenant_databases_message

        return capo_rds.types.tenant_databases_message.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeTenantDatabases", redact_output=_redact_output),
    )
    input_: capo_rds.types.describe_tenant_databases_message.DescribeTenantDatabasesMessage = {}
    if db_instance_identifier is not None:
        input_["db_instance_identifier"] = db_instance_identifier
    if tenant_db_name is not None:
        input_["tenant_db_name"] = tenant_db_name
    if filters is not None:
        input_["filters"] = filters
    if marker is not None:
        input_["marker"] = marker
    if max_records is not None:
        input_["max_records"] = max_records

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