Skip to content

register_transit_gateway async

register_transit_gateway(
    global_network_id: GlobalNetworkId,
    transit_gateway_arn: TransitGatewayArn,
    *,
    config_overrides: Optional[AsyncNetworkManagerClientConfig] = None,
) -> RegisterTransitGatewayResponse

Registers a transit gateway in your global network. Not all Regions support transit gateways for global networks. For a list of the supported Regions, see Region Availability in the Amazon Web Services Transit Gateways for Global Networks User Guide. The transit gateway can be in any of the supported Amazon Web Services Regions, but it must be owned by the same Amazon Web Services account that owns the global network. You cannot register a transit gateway in more than one global network.

Parameters:

  • global_network_id (GlobalNetworkId) –

    The ID of the global network.

  • transit_gateway_arn (TransitGatewayArn) –

    The Amazon Resource Name (ARN) of the transit gateway.

Raises:

Source code in docs_src/capo_networkmanager/_services/async_network_manager.py
async def register_transit_gateway(
    self,
    global_network_id: "capo_networkmanager.types.global_network_id.GlobalNetworkId",
    transit_gateway_arn: "capo_networkmanager.types.transit_gateway_arn.TransitGatewayArn",
    *,
    config_overrides: Optional[AsyncNetworkManagerClientConfig] = None,
) -> "capo_networkmanager.types.register_transit_gateway_response.RegisterTransitGatewayResponse":
    """<p>Registers a transit gateway in your global network. Not all Regions support transit gateways for global networks. For a list of the supported Regions, see <a href="https://docs.aws.amazon.com/network-manager/latest/tgwnm/what-are-global-networks.html#nm-available-regions">Region Availability</a> in the <i>Amazon Web Services Transit Gateways for Global Networks User Guide</i>. The transit gateway can be in any of the supported Amazon Web Services Regions, but it must be owned by the same Amazon Web Services account that owns the global network. You cannot register a transit gateway in more than one global network.</p>

    Args:
        global_network_id: <p>The ID of the global network.</p>
        transit_gateway_arn: <p>The Amazon Resource Name (ARN) of the transit gateway.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_networkmanager.types.register_transit_gateway_request.RegisterTransitGatewayRequest]",
    ) -> AsyncOperationResponse[
        "capo_networkmanager.types.register_transit_gateway_response.RegisterTransitGatewayResponse"
    ]:
        import capo_networkmanager._operations.network_manager.register_transit_gateway

        (
            output,
            http_response,
        ) = await capo_networkmanager._operations.network_manager.register_transit_gateway.async_register_transit_gateway(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterTransitGateway")
    )
    input_: capo_networkmanager.types.register_transit_gateway_request.RegisterTransitGatewayRequest = {
        "global_network_id": global_network_id,
        "transit_gateway_arn": transit_gateway_arn,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output