def update_pricing_plan(
self,
pricing_mode: "capo_iottwinmaker.types.pricing_mode.PricingMode",
*,
config_overrides: Optional[IoTTwinMakerClientConfig] = None,
bundle_names: Optional[
"capo_iottwinmaker.types.pricing_bundles.PricingBundles"
] = None,
) -> (
"capo_iottwinmaker.types.update_pricing_plan_response.UpdatePricingPlanResponse"
):
"""<p>Update the pricing plan.</p>
Args:
pricing_mode: <p>The pricing mode.</p>
bundle_names: <p>The bundle names.</p>
Raises:
capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
capo_iottwinmaker.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
capo_iottwinmaker.errors.validation_exception.ValidationException: <p>Failed</p>
capo_iottwinmaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iottwinmaker.types.update_pricing_plan_request.UpdatePricingPlanRequest]",
) -> OperationResponse[
"capo_iottwinmaker.types.update_pricing_plan_response.UpdatePricingPlanResponse"
]:
import capo_iottwinmaker._operations.aws_io_t_twin_maker.update_pricing_plan
output, http_response = (
capo_iottwinmaker._operations.aws_io_t_twin_maker.update_pricing_plan.update_pricing_plan(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdatePricingPlan")
)
input_: capo_iottwinmaker.types.update_pricing_plan_request.UpdatePricingPlanRequest = {
"pricing_mode": pricing_mode
}
if bundle_names is not None:
input_["bundle_names"] = bundle_names
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output