Updates the name of a current Direct Connect gateway.
Parameters:
Raises:
Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
| async def update_direct_connect_gateway(
self,
direct_connect_gateway_id: "capo_direct_connect.types.direct_connect_gateway_id.DirectConnectGatewayId",
new_direct_connect_gateway_name: "capo_direct_connect.types.direct_connect_gateway_name.DirectConnectGatewayName",
*,
config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.update_direct_connect_gateway_response.UpdateDirectConnectGatewayResponse":
"""<p>Updates the name of a current Direct Connect gateway.</p>
Args:
direct_connect_gateway_id: <p>The ID of the Direct Connect gateway to update.</p>
new_direct_connect_gateway_name: <p>The new name for the Direct Connect gateway.</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_direct_connect_gateway_request.UpdateDirectConnectGatewayRequest]",
) -> AsyncOperationResponse[
"capo_direct_connect.types.update_direct_connect_gateway_response.UpdateDirectConnectGatewayResponse"
]:
import capo_direct_connect._operations.overture_service.update_direct_connect_gateway
(
output,
http_response,
) = await capo_direct_connect._operations.overture_service.update_direct_connect_gateway.async_update_direct_connect_gateway(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateDirectConnectGateway")
)
input_: capo_direct_connect.types.update_direct_connect_gateway_request.UpdateDirectConnectGatewayRequest = {
"direct_connect_gateway_id": direct_connect_gateway_id,
"new_direct_connect_gateway_name": new_direct_connect_gateway_name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|