Skip to content

get_offer_terms

get_offer_terms(
    offer_id: OfferId,
    *,
    config_overrides: Optional[MarketplaceDiscoveryClientConfig] = None,
    locale: Optional[Locale] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
) -> GetOfferTermsOutput

Returns the terms attached to an offer, such as pricing terms (usage-based, contract, BYOL, free trial), legal terms, payment schedules, validity terms, support terms, and renewal terms.

Parameters:

  • locale (Optional[Locale], default: None ) –

    A BCP 47 language tag or comma-separated priority list specifying the preferred locale for response content. See Locale for supported values, constraints, fallback behavior, and the default locale. If omitted, the service returns content in the default locale.

  • offer_id (OfferId) –

    The unique identifier of the offer whose terms to retrieve.

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

    The maximum number of results that are returned per call. You can use nextToken to get more results.

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

    If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page.

Raises:

Examples:

GetOfferTerms for Usage-based ML Model offer

>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleUsageBasedId')
GetOfferTerms for BYOL offer
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleByolId')
GetOfferTerms for configurable upfront pricing
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleConfigUpfrontId')
GetOfferTerms for free trial offer
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleFreeTrialId')
GetOfferTerms for recurring payment
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRecurringId')
GetOfferTerms for variable payment
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleVariableId')
GetOfferTerms for renewal term
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRenewalId')
GetOfferTerms for renewal term with fixed percentage
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRenewalFixedId')
GetOfferTerms for renewal term with identical pricing (no price increase)
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRenewalNoPriceIncreaseId')
GetOfferTerms for support term
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleSupportId')
GetOfferTerms for validity term with dates
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleValidityId')
GetOfferTerms for net payment term
>>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleNetPaymentId')
Source code in docs_src/capo_marketplace_discovery/_services/marketplace_discovery.py
def get_offer_terms(
    self,
    offer_id: "capo_marketplace_discovery.types.offer_id.OfferId",
    *,
    config_overrides: Optional[MarketplaceDiscoveryClientConfig] = None,
    locale: Optional["capo_marketplace_discovery.types.locale.Locale"] = None,
    max_results: Optional[int] = None,
    next_token: Optional[
        "capo_marketplace_discovery.types.next_token.NextToken"
    ] = None,
) -> "capo_marketplace_discovery.types.get_offer_terms_output.GetOfferTermsOutput":
    """<p>Returns the terms attached to an offer, such as pricing terms (usage-based, contract, BYOL, free trial), legal terms, payment schedules, validity terms, support terms, and renewal terms.</p>

    Args:
        locale: <p>A BCP 47 language tag or comma-separated priority list specifying the preferred locale for response content. See <code>Locale</code> for supported values, constraints, fallback behavior, and the default locale. If omitted, the service returns content in the default locale.</p>
        offer_id: <p>The unique identifier of the offer whose terms to retrieve.</p>
        max_results: <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to get more results.</p>
        next_token: <p>If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token to retrieve the next page.</p>

    Raises:
        capo_marketplace_discovery.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_marketplace_discovery.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of the request.</p>
        capo_marketplace_discovery.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_marketplace_discovery.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_marketplace_discovery.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_marketplace_discovery.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        GetOfferTerms for Usage-based ML Model offer

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleUsageBasedId')
        GetOfferTerms for BYOL offer

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleByolId')
        GetOfferTerms for configurable upfront pricing

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleConfigUpfrontId')
        GetOfferTerms for free trial offer

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleFreeTrialId')
        GetOfferTerms for recurring payment

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRecurringId')
        GetOfferTerms for variable payment

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleVariableId')
        GetOfferTerms for renewal term

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRenewalId')
        GetOfferTerms for renewal term with fixed percentage

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRenewalFixedId')
        GetOfferTerms for renewal term with identical pricing (no price increase)

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleRenewalNoPriceIncreaseId')
        GetOfferTerms for support term

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleSupportId')
        GetOfferTerms for validity term with dates

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleValidityId')
        GetOfferTerms for net payment term

        >>> client.get_offer_terms(locale='en-US', offer_id='offer-sampleNetPaymentId')
    """

    def _handler(
        req: "OperationRequest[capo_marketplace_discovery.types.get_offer_terms_input.GetOfferTermsInput]",
    ) -> OperationResponse[
        "capo_marketplace_discovery.types.get_offer_terms_output.GetOfferTermsOutput"
    ]:
        import capo_marketplace_discovery._operations.aws_marketplace_discovery.get_offer_terms

        output, http_response = (
            capo_marketplace_discovery._operations.aws_marketplace_discovery.get_offer_terms.get_offer_terms(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetOfferTerms")
    )
    input_: capo_marketplace_discovery.types.get_offer_terms_input.GetOfferTermsInput = {
        "offer_id": offer_id
    }
    if locale is not None:
        input_["locale"] = locale
    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