Associates a transit gateway Connect peer with a device, and optionally, with a link. If you specify a link, it must be associated with the specified device.
You can only associate transit gateway Connect peers that have been created on a transit gateway that's registered in your global network.
You cannot associate a transit gateway Connect peer with more than one device and link.
Parameters:
Raises:
Source code in docs_src/capo_networkmanager/_services/network_manager.py
| def associate_transit_gateway_connect_peer(
self,
global_network_id: "capo_networkmanager.types.global_network_id.GlobalNetworkId",
transit_gateway_connect_peer_arn: "capo_networkmanager.types.transit_gateway_connect_peer_arn.TransitGatewayConnectPeerArn",
device_id: "capo_networkmanager.types.device_id.DeviceId",
*,
config_overrides: Optional[NetworkManagerClientConfig] = None,
link_id: Optional["capo_networkmanager.types.link_id.LinkId"] = None,
) -> "capo_networkmanager.types.associate_transit_gateway_connect_peer_response.AssociateTransitGatewayConnectPeerResponse":
"""<p>Associates a transit gateway Connect peer with a device, and optionally, with a link. If you specify a link, it must be associated with the specified device. </p> <p>You can only associate transit gateway Connect peers that have been created on a transit gateway that's registered in your global network.</p> <p>You cannot associate a transit gateway Connect peer with more than one device and link. </p>
Args:
global_network_id: <p>The ID of the global network.</p>
transit_gateway_connect_peer_arn: <p>The Amazon Resource Name (ARN) of the Connect peer.</p>
device_id: <p>The ID of the device.</p>
link_id: <p>The ID of the link.</p>
Raises:
capo_networkmanager.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_networkmanager.errors.conflict_exception.ConflictException: <p>There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent state.</p>
capo_networkmanager.errors.internal_server_exception.InternalServerException: <p>The request has failed due to an internal error.</p>
capo_networkmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
capo_networkmanager.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service limit was exceeded.</p>
capo_networkmanager.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_networkmanager.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints.</p>
capo_networkmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_networkmanager.types.associate_transit_gateway_connect_peer_request.AssociateTransitGatewayConnectPeerRequest]",
) -> OperationResponse[
"capo_networkmanager.types.associate_transit_gateway_connect_peer_response.AssociateTransitGatewayConnectPeerResponse"
]:
import capo_networkmanager._operations.network_manager.associate_transit_gateway_connect_peer
output, http_response = (
capo_networkmanager._operations.network_manager.associate_transit_gateway_connect_peer.associate_transit_gateway_connect_peer(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateTransitGatewayConnectPeer")
)
input_: capo_networkmanager.types.associate_transit_gateway_connect_peer_request.AssociateTransitGatewayConnectPeerRequest = {
"global_network_id": global_network_id,
"transit_gateway_connect_peer_arn": transit_gateway_connect_peer_arn,
"device_id": device_id,
}
if link_id is not None:
input_["link_id"] = link_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|