Deletes an existing DB proxy.
Parameters:
Raises:
-
DBProxyNotFoundFault
–
The specified proxy name doesn't correspond to a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.
-
InvalidDBProxyStateFault
–
The requested operation can't be performed while the proxy is in this state.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_rds/_services/async_rds.py
| async def delete_db_proxy(
self,
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_proxy_name: Optional["capo_rds.types.db_proxy_name.DBProxyName"] = None,
) -> "capo_rds.types.delete_db_proxy_response.DeleteDBProxyResponse":
"""<p>Deletes an existing DB proxy.</p>
Args:
db_proxy_name: <p>The name of the DB proxy to delete.</p>
Raises:
capo_rds.errors.db_proxy_not_found_fault.DBProxyNotFoundFault: <p>The specified proxy name doesn't correspond to a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
capo_rds.errors.invalid_db_proxy_state_fault.InvalidDBProxyStateFault: <p>The requested operation can't be performed while the proxy is in this state.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_rds.types.delete_db_proxy_request.DeleteDBProxyRequest]",
) -> AsyncOperationResponse[
"capo_rds.types.delete_db_proxy_response.DeleteDBProxyResponse"
]:
import capo_rds._operations.amazon_rd_sv19.delete_db_proxy
(
output,
http_response,
) = await capo_rds._operations.amazon_rd_sv19.delete_db_proxy.async_delete_db_proxy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDBProxy")
)
input_: capo_rds.types.delete_db_proxy_request.DeleteDBProxyRequest = {}
if db_proxy_name is not None:
input_["db_proxy_name"] = db_proxy_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|