Skip to content

describe_reserved_db_instances async

describe_reserved_db_instances(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    reserved_db_instance_id: Optional[String] = None,
    reserved_db_instances_offering_id: Optional[String] = None,
    db_instance_class: Optional[String] = None,
    duration: Optional[String] = None,
    product_description: Optional[String] = None,
    offering_type: Optional[String] = None,
    multi_az: Optional[BooleanOptional] = None,
    lease_id: Optional[String] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> ReservedDBInstanceMessage

Returns information about reserved DB instances for this account, or about a specified reserved DB instance.

Parameters:

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

    The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.

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

    The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.

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

    The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.

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

    The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.

    Valid Values: 1 | 3 | 31536000 | 94608000

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

    The product description filter value. Specify this parameter to show only those reservations matching the specified product description.

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

    The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.

    Valid Values: "Partial Upfront" | "All Upfront" | "No Upfront"

  • multi_az (Optional[BooleanOptional], default: None ) –

    Specifies whether to show only those reservations that support Multi-AZ.

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

    The lease identifier filter value. Specify this parameter to show only the reservation that matches the specified lease ID.

    Amazon Web Services Support might request the lease ID for an issue related to a reserved DB instance.

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

    This parameter isn't currently supported.

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

    The maximum number of records to include in the response. If more than the MaxRecords value is available, 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 request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Raises:

Examples:

To describe reserved DB instances The following example retrieves details about any reserved DB instances in the current AWS account.

>>> await client.describe_reserved_db_instances()
Source code in docs_src/capo_rds/_services/async_rds.py
async def describe_reserved_db_instances(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    reserved_db_instance_id: Optional["capo_rds.types.string.String"] = None,
    reserved_db_instances_offering_id: Optional[
        "capo_rds.types.string.String"
    ] = None,
    db_instance_class: Optional["capo_rds.types.string.String"] = None,
    duration: Optional["capo_rds.types.string.String"] = None,
    product_description: Optional["capo_rds.types.string.String"] = None,
    offering_type: Optional["capo_rds.types.string.String"] = None,
    multi_az: Optional["capo_rds.types.boolean_optional.BooleanOptional"] = None,
    lease_id: 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,
) -> "capo_rds.types.reserved_db_instance_message.ReservedDBInstanceMessage":
    """<p>Returns information about reserved DB instances for this account, or about a specified reserved DB instance.</p>

    Args:
        reserved_db_instance_id: <p>The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.</p>
        reserved_db_instances_offering_id: <p>The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.</p>
        db_instance_class: <p>The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.</p>
        duration: <p>The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.</p> <p>Valid Values: <code>1 | 3 | 31536000 | 94608000</code> </p>
        product_description: <p>The product description filter value. Specify this parameter to show only those reservations matching the specified product description.</p>
        offering_type: <p>The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.</p> <p>Valid Values: <code>"Partial Upfront" | "All Upfront" | "No Upfront" </code> </p>
        multi_az: <p>Specifies whether to show only those reservations that support Multi-AZ.</p>
        lease_id: <p>The lease identifier filter value. Specify this parameter to show only the reservation that matches the specified lease ID.</p> <note> <p>Amazon Web Services Support might request the lease ID for an issue related to a reserved DB instance.</p> </note>
        filters: <p>This parameter isn't currently supported.</p>
        max_records: <p>The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, 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 request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>

    Raises:
        capo_rds.errors.reserved_db_instance_not_found_fault.ReservedDBInstanceNotFoundFault: <p>The specified reserved DB Instance not found.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe reserved DB instances
        The following example retrieves details about any reserved DB instances in the current AWS account.

        >>> await client.describe_reserved_db_instances()
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.describe_reserved_db_instances_message.DescribeReservedDBInstancesMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.reserved_db_instance_message.ReservedDBInstanceMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_reserved_db_instances

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeReservedDBInstances")
    )
    input_: capo_rds.types.describe_reserved_db_instances_message.DescribeReservedDBInstancesMessage = {}
    if reserved_db_instance_id is not None:
        input_["reserved_db_instance_id"] = reserved_db_instance_id
    if reserved_db_instances_offering_id is not None:
        input_["reserved_db_instances_offering_id"] = (
            reserved_db_instances_offering_id
        )
    if db_instance_class is not None:
        input_["db_instance_class"] = db_instance_class
    if duration is not None:
        input_["duration"] = duration
    if product_description is not None:
        input_["product_description"] = product_description
    if offering_type is not None:
        input_["offering_type"] = offering_type
    if multi_az is not None:
        input_["multi_az"] = multi_az
    if lease_id is not None:
        input_["lease_id"] = lease_id
    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

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