async def update_connections_billing_mode(
self,
connection_ids: "capo_direct_connect.types.connection_id_list.ConnectionIdList",
billing_mode: "capo_direct_connect.types.request_billing_mode.RequestBillingMode",
*,
config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.update_connections_billing_mode_response.UpdateConnectionsBillingModeResponse":
"""<p>Updates the billing mode for the specified Direct Connect connections. You can update the billing mode for up to 200 connections in a single request.</p>
Args:
connection_ids: <p>The IDs of the connections to update. You can specify from 1 to 200 connections.</p>
billing_mode: <p>The billing mode to apply to the specified connections. The valid values are <code>PayAsYouGo</code>, <code>FlatRateTier1</code>, <code>FlatRateTier2</code>, <code>FlatRateTier3</code>, <code>FlatRateTier4</code>, and <code>FlatRateTier5</code>.</p>
Raises:
capo_direct_connect.errors.direct_connect_client_exception.DirectConnectClientException: <p>One or more parameters are not valid.</p>
capo_direct_connect.errors.direct_connect_server_exception.DirectConnectServerException: <p>A server-side error occurred.</p>
capo_direct_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_direct_connect.types.update_connections_billing_mode_request.UpdateConnectionsBillingModeRequest]",
) -> AsyncOperationResponse[
"capo_direct_connect.types.update_connections_billing_mode_response.UpdateConnectionsBillingModeResponse"
]:
import capo_direct_connect._operations.overture_service.update_connections_billing_mode
(
output,
http_response,
) = await capo_direct_connect._operations.overture_service.update_connections_billing_mode.async_update_connections_billing_mode(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateConnectionsBillingMode")
)
input_: capo_direct_connect.types.update_connections_billing_mode_request.UpdateConnectionsBillingModeRequest = {
"connection_ids": connection_ids,
"billing_mode": billing_mode,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output