async def update_pricing_plan(
self,
pricing_mode: "capo_iottwinmaker.types.pricing_mode.PricingMode",
*,
config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iottwinmaker.types.update_pricing_plan_request.UpdatePricingPlanRequest]",
) -> AsyncOperationResponse[
"capo_iottwinmaker.types.update_pricing_plan_response.UpdatePricingPlanResponse"
]:
import capo_iottwinmaker._operations.aws_io_t_twin_maker.update_pricing_plan
(
output,
http_response,
) = await capo_iottwinmaker._operations.aws_io_t_twin_maker.update_pricing_plan.async_update_pricing_plan(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output