Skip to content

describe_reserved_instance_offerings

describe_reserved_instance_offerings(
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
    reserved_instance_offering_id: Optional[GUID] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeReservedInstanceOfferingsResponse

Describes the available Amazon OpenSearch Service Reserved Instance offerings for a given Region. For more information, see Reserved Instances in Amazon OpenSearch Service.

Parameters:

  • reserved_instance_offering_id (Optional[GUID], default: None ) –

    The Reserved Instance identifier filter value. Use this parameter to show only the available instance types that match the specified reservation identifier.

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

    An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results.

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

    If your initial DescribeReservedInstanceOfferings operation returns a nextToken, you can include the returned nextToken in subsequent DescribeReservedInstanceOfferings operations, which returns results in the next page.

Raises:

Source code in docs_src/capo_opensearch/_services/open_search.py
def describe_reserved_instance_offerings(
    self,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
    reserved_instance_offering_id: Optional[
        "capo_opensearch.types.guid.GUID"
    ] = None,
    max_results: Optional["capo_opensearch.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_opensearch.types.next_token.NextToken"] = None,
) -> "capo_opensearch.types.describe_reserved_instance_offerings_response.DescribeReservedInstanceOfferingsResponse":
    """<p>Describes the available Amazon OpenSearch Service Reserved Instance offerings for a given Region. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ri.html">Reserved Instances in Amazon OpenSearch Service</a>.</p>

    Args:
        reserved_instance_offering_id: <p>The Reserved Instance identifier filter value. Use this parameter to show only the available instance types that match the specified reservation identifier.</p>
        max_results: <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
        next_token: <p>If your initial <code>DescribeReservedInstanceOfferings</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>DescribeReservedInstanceOfferings</code> operations, which returns results in the next page.</p>

    Raises:
        capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
        capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_opensearch.types.describe_reserved_instance_offerings_request.DescribeReservedInstanceOfferingsRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.describe_reserved_instance_offerings_response.DescribeReservedInstanceOfferingsResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.describe_reserved_instance_offerings

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.describe_reserved_instance_offerings.describe_reserved_instance_offerings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeReservedInstanceOfferings")
    )
    input_: capo_opensearch.types.describe_reserved_instance_offerings_request.DescribeReservedInstanceOfferingsRequest = {}
    if reserved_instance_offering_id is not None:
        input_["reserved_instance_offering_id"] = reserved_instance_offering_id
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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