Skip to content

describe_reserved_nodes async

describe_reserved_nodes(
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    reservation_id: Optional[String] = None,
    reserved_nodes_offering_id: Optional[String] = None,
    node_type: Optional[String] = None,
    duration: Optional[String] = None,
    offering_type: Optional[String] = None,
    max_results: Optional[IntegerOptional] = None,
    next_token: Optional[String] = None,
) -> DescribeReservedNodesResponse

Returns information about reserved nodes for this account, or about a specified reserved node.

Parameters:

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

    The reserved node identifier filter value. Use this parameter to show only the reservation that matches the specified reservation ID.

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

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

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

    The node type filter value. Use this parameter to show only those reservations matching the specified node type. For more information, see Supported node types.

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

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

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

    The offering type filter value. Use this parameter to show only the available offerings matching the specified offering type. Valid values: "All Upfront"|"Partial Upfront"| "No Upfront"

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

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

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

    An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Raises:

Source code in docs_src/capo_memorydb/_services/async_memory_db.py
async def describe_reserved_nodes(
    self,
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    reservation_id: Optional["capo_memorydb.types.string.String"] = None,
    reserved_nodes_offering_id: Optional[
        "capo_memorydb.types.string.String"
    ] = None,
    node_type: Optional["capo_memorydb.types.string.String"] = None,
    duration: Optional["capo_memorydb.types.string.String"] = None,
    offering_type: Optional["capo_memorydb.types.string.String"] = None,
    max_results: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    next_token: Optional["capo_memorydb.types.string.String"] = None,
) -> "capo_memorydb.types.describe_reserved_nodes_response.DescribeReservedNodesResponse":
    """<p>Returns information about reserved nodes for this account, or about a specified reserved node.</p>

    Args:
        reservation_id: <p>The reserved node identifier filter value. Use this parameter to show only the reservation that matches the specified reservation ID.</p>
        reserved_nodes_offering_id: <p>The offering identifier filter value. Use this parameter to show only purchased reservations matching the specified offering identifier.</p>
        node_type: <p>The node type filter value. Use this parameter to show only those reservations matching the specified node type. For more information, see <a href="https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.reserved.html#reserved-nodes-supported">Supported node types</a>.</p>
        duration: <p>The duration filter value, specified in years or seconds. Use this parameter to show only reservations for this duration.</p>
        offering_type: <p>The offering type filter value. Use this parameter to show only the available offerings matching the specified offering type. Valid values: "All Upfront"|"Partial Upfront"| "No Upfront"</p>
        max_results: <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.</p>
        next_token: <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.</p>

    Raises:
        capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
        capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
        capo_memorydb.errors.reserved_node_not_found_fault.ReservedNodeNotFoundFault: <p>The requested node does not exist.</p>
        capo_memorydb.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The required service-linked role was not found.</p>
        capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_memorydb.types.describe_reserved_nodes_request.DescribeReservedNodesRequest]",
    ) -> AsyncOperationResponse[
        "capo_memorydb.types.describe_reserved_nodes_response.DescribeReservedNodesResponse"
    ]:
        import capo_memorydb._operations.amazon_memory_db.describe_reserved_nodes

        (
            output,
            http_response,
        ) = await capo_memorydb._operations.amazon_memory_db.describe_reserved_nodes.async_describe_reserved_nodes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeReservedNodes")
    )
    input_: capo_memorydb.types.describe_reserved_nodes_request.DescribeReservedNodesRequest = {}
    if reservation_id is not None:
        input_["reservation_id"] = reservation_id
    if reserved_nodes_offering_id is not None:
        input_["reserved_nodes_offering_id"] = reserved_nodes_offering_id
    if node_type is not None:
        input_["node_type"] = node_type
    if duration is not None:
        input_["duration"] = duration
    if offering_type is not None:
        input_["offering_type"] = offering_type
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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