Deletes the association between the specified Direct Connect gateway and virtual private gateway.
We recommend that you specify the associationID to delete the association. Alternatively, if you own virtual gateway and a Direct Connect gateway association, you can specify the virtualGatewayId and directConnectGatewayId to delete an association.
Parameters:
Raises:
Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
| async def delete_direct_connect_gateway_association(
self,
*,
config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
association_id: Optional[
"capo_direct_connect.types.direct_connect_gateway_association_id.DirectConnectGatewayAssociationId"
] = None,
direct_connect_gateway_id: Optional[
"capo_direct_connect.types.direct_connect_gateway_id.DirectConnectGatewayId"
] = None,
virtual_gateway_id: Optional[
"capo_direct_connect.types.virtual_gateway_id.VirtualGatewayId"
] = None,
) -> "capo_direct_connect.types.delete_direct_connect_gateway_association_result.DeleteDirectConnectGatewayAssociationResult":
"""<p>Deletes the association between the specified Direct Connect gateway and virtual private gateway.</p> <p>We recommend that you specify the <code>associationID</code> to delete the association. Alternatively, if you own virtual gateway and a Direct Connect gateway association, you can specify the <code>virtualGatewayId</code> and <code>directConnectGatewayId</code> to delete an association.</p>
Args:
association_id: <p>The ID of the Direct Connect gateway association.</p>
direct_connect_gateway_id: <p>The ID of the Direct Connect gateway.</p>
virtual_gateway_id: <p>The ID of the virtual private 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.delete_direct_connect_gateway_association_request.DeleteDirectConnectGatewayAssociationRequest]",
) -> AsyncOperationResponse[
"capo_direct_connect.types.delete_direct_connect_gateway_association_result.DeleteDirectConnectGatewayAssociationResult"
]:
import capo_direct_connect._operations.overture_service.delete_direct_connect_gateway_association
(
output,
http_response,
) = await capo_direct_connect._operations.overture_service.delete_direct_connect_gateway_association.async_delete_direct_connect_gateway_association(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDirectConnectGatewayAssociation")
)
input_: capo_direct_connect.types.delete_direct_connect_gateway_association_request.DeleteDirectConnectGatewayAssociationRequest = {}
if association_id is not None:
input_["association_id"] = association_id
if direct_connect_gateway_id is not None:
input_["direct_connect_gateway_id"] = direct_connect_gateway_id
if virtual_gateway_id is not None:
input_["virtual_gateway_id"] = virtual_gateway_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|