Skip to content

create_quote

create_quote(
    country_code: CountryCode,
    requested_capacities: QuoteCapacityList,
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
    outpost_identifier: Optional[OutpostIdentifier] = None,
    requested_constraints: Optional[QuoteConstraintList] = None,
    requested_payment_options: Optional[PaymentOptionList] = None,
    requested_payment_terms: Optional[PaymentTermList] = None,
    description: Optional[QuoteDescription] = None,
) -> CreateQuoteOutput

Creates a quote for an Outpost. A quote provides pricing and configuration options based on the requested capacity. You can optionally associate the quote with an existing Outpost or create a standalone quote by specifying only the country code and requested capacities.

Parameters:

  • outpost_identifier (Optional[OutpostIdentifier], default: None ) –

    The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.

  • country_code (CountryCode) –

    The country code for the Outpost site location.

  • requested_capacities (QuoteCapacityList) –

    The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.

  • requested_constraints (Optional[QuoteConstraintList], default: None ) –

    The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.

  • requested_payment_options (Optional[PaymentOptionList], default: None ) –

    The payment options to include in the quote pricing. If not specified, all available payment options are returned.

  • requested_payment_terms (Optional[PaymentTermList], default: None ) –

    The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.

  • description (Optional[QuoteDescription], default: None ) –

    A description for the quote.

Raises:

Source code in docs_src/capo_outposts/_services/outposts.py
def create_quote(
    self,
    country_code: "capo_outposts.types.country_code.CountryCode",
    requested_capacities: "capo_outposts.types.quote_capacity_list.QuoteCapacityList",
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
    outpost_identifier: Optional[
        "capo_outposts.types.outpost_identifier.OutpostIdentifier"
    ] = None,
    requested_constraints: Optional[
        "capo_outposts.types.quote_constraint_list.QuoteConstraintList"
    ] = None,
    requested_payment_options: Optional[
        "capo_outposts.types.payment_option_list.PaymentOptionList"
    ] = None,
    requested_payment_terms: Optional[
        "capo_outposts.types.payment_term_list.PaymentTermList"
    ] = None,
    description: Optional[
        "capo_outposts.types.quote_description.QuoteDescription"
    ] = None,
) -> "capo_outposts.types.create_quote_output.CreateQuoteOutput":
    """<p>Creates a quote for an Outpost. A quote provides pricing and configuration options based on the requested capacity. You can optionally associate the quote with an existing Outpost or create a standalone quote by specifying only the country code and requested capacities.</p>

    Args:
        outpost_identifier: <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
        country_code: <p>The country code for the Outpost site location.</p>
        requested_capacities: <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
        requested_constraints: <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
        requested_payment_options: <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
        requested_payment_terms: <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
        description: <p>A description for the quote.</p>

    Raises:
        capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
        capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_outposts.errors.not_found_exception.NotFoundException: <p>The specified request is not valid.</p>
        capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
        capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_outposts.types.create_quote_input.CreateQuoteInput]",
    ) -> OperationResponse[
        "capo_outposts.types.create_quote_output.CreateQuoteOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.create_quote

        output, http_response = (
            capo_outposts._operations.outposts_olaf_service.create_quote.create_quote(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_outposts.types.create_quote_input.CreateQuoteInput",
    ) -> dict[str, Any]:
        import capo_outposts.types.create_quote_input

        return capo_outposts.types.create_quote_input.redact_sensitive(input_)

    def _redact_output(
        output: "capo_outposts.types.create_quote_output.CreateQuoteOutput",
    ) -> dict[str, Any]:
        import capo_outposts.types.create_quote_output

        return capo_outposts.types.create_quote_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateQuote", redact_input=_redact_input, redact_output=_redact_output
        ),
    )
    input_: capo_outposts.types.create_quote_input.CreateQuoteInput = {
        "country_code": country_code,
        "requested_capacities": requested_capacities,
    }
    if outpost_identifier is not None:
        input_["outpost_identifier"] = outpost_identifier
    if requested_constraints is not None:
        input_["requested_constraints"] = requested_constraints
    if requested_payment_options is not None:
        input_["requested_payment_options"] = requested_payment_options
    if requested_payment_terms is not None:
        input_["requested_payment_terms"] = requested_payment_terms
    if description is not None:
        input_["description"] = description

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