Skip to content

update_preferences

update_preferences(
    *,
    config_overrides: Optional[BCMPricingCalculatorClientConfig] = None,
    management_account_rate_type_selections: Optional[RateTypes] = None,
    member_account_rate_type_selections: Optional[RateTypes] = None,
    standalone_account_rate_type_selections: Optional[RateTypes] = None,
) -> UpdatePreferencesResponse

Updates the preferences for Pricing Calculator.

Parameters:

  • management_account_rate_type_selections (Optional[RateTypes], default: None ) –

    The updated preferred rate types for the management account.

  • member_account_rate_type_selections (Optional[RateTypes], default: None ) –

    The updated preferred rate types for member accounts.

  • standalone_account_rate_type_selections (Optional[RateTypes], default: None ) –

    The updated preferred rate types for a standalone account.

Raises:

Source code in docs_src/capo_bcm_pricing_calculator/_services/bcm_pricing_calculator.py
def update_preferences(
    self,
    *,
    config_overrides: Optional[BCMPricingCalculatorClientConfig] = None,
    management_account_rate_type_selections: Optional[
        "capo_bcm_pricing_calculator.types.rate_types.RateTypes"
    ] = None,
    member_account_rate_type_selections: Optional[
        "capo_bcm_pricing_calculator.types.rate_types.RateTypes"
    ] = None,
    standalone_account_rate_type_selections: Optional[
        "capo_bcm_pricing_calculator.types.rate_types.RateTypes"
    ] = None,
) -> "capo_bcm_pricing_calculator.types.update_preferences_response.UpdatePreferencesResponse":
    """<p> Updates the preferences for Pricing Calculator. </p>

    Args:
        management_account_rate_type_selections: <p> The updated preferred rate types for the management account. </p>
        member_account_rate_type_selections: <p> The updated preferred rate types for member accounts. </p>
        standalone_account_rate_type_selections: <p> The updated preferred rate types for a standalone account. </p>

    Raises:
        capo_bcm_pricing_calculator.errors.access_denied_exception.AccessDeniedException: <p> You do not have sufficient access to perform this action. </p>
        capo_bcm_pricing_calculator.errors.internal_server_exception.InternalServerException: <p> An internal error has occurred. Retry your request, but if the problem persists, contact Amazon Web Services support. </p>
        capo_bcm_pricing_calculator.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
        capo_bcm_pricing_calculator.errors.validation_exception.ValidationException: <p> The input provided fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_bcm_pricing_calculator.errors.data_unavailable_exception.DataUnavailableException: <p> The requested data is currently unavailable. </p>
        capo_bcm_pricing_calculator.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The request would cause you to exceed your service quota. </p>
        capo_bcm_pricing_calculator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_bcm_pricing_calculator.types.update_preferences_request.UpdatePreferencesRequest]",
    ) -> OperationResponse[
        "capo_bcm_pricing_calculator.types.update_preferences_response.UpdatePreferencesResponse"
    ]:
        import capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.update_preferences

        output, http_response = (
            capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.update_preferences.update_preferences(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePreferences")
    )
    input_: capo_bcm_pricing_calculator.types.update_preferences_request.UpdatePreferencesRequest = {}
    if management_account_rate_type_selections is not None:
        input_["management_account_rate_type_selections"] = (
            management_account_rate_type_selections
        )
    if member_account_rate_type_selections is not None:
        input_["member_account_rate_type_selections"] = (
            member_account_rate_type_selections
        )
    if standalone_account_rate_type_selections is not None:
        input_["standalone_account_rate_type_selections"] = (
            standalone_account_rate_type_selections
        )

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