Skip to content

create_interconnect async

create_interconnect(
    interconnect_name: InterconnectName,
    bandwidth: Bandwidth,
    location: LocationCode,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    lag_id: Optional[LagId] = None,
    tags: Optional[TagList] = None,
    provider_name: Optional[ProviderName] = None,
    request_mac_sec: Optional[RequestMACSec] = None,
) -> Interconnect

Creates an interconnect between an Direct Connect Partner's network and a specific Direct Connect location.

An interconnect is a connection that is capable of hosting other connections. The Direct Connect Partner can use an interconnect to provide Direct Connect hosted connections to customers through their own network services. Like a standard connection, an interconnect links the partner's network to an Direct Connect location over a standard Ethernet fiber-optic cable. One end is connected to the partner's router, the other to an Direct Connect router.

You can automatically add the new interconnect to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect is allocated on the same Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no interconnect is created.

For each end customer, the Direct Connect Partner provisions a connection on their interconnect by calling AllocateHostedConnection. The end customer can then connect to Amazon Web Services resources by creating a virtual interface on their connection, using the VLAN assigned to them by the Direct Connect Partner.

Intended for use by Direct Connect Partners only.

Parameters:

  • interconnect_name (InterconnectName) –

    The name of the interconnect.

  • bandwidth (Bandwidth) –

    The port bandwidth, in Gbps. The possible values are 1, 10, and 100.

  • location (LocationCode) –

    The location of the interconnect.

  • lag_id (Optional[LagId], default: None ) –

    The ID of the LAG.

  • tags (Optional[TagList], default: None ) –

    The tags to associate with the interconnect.

  • provider_name (Optional[ProviderName], default: None ) –

    The name of the service provider associated with the interconnect.

  • request_mac_sec (Optional[RequestMACSec], default: None ) –

    Indicates whether you want the interconnect to support MAC Security (MACsec).

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def create_interconnect(
    self,
    interconnect_name: "capo_direct_connect.types.interconnect_name.InterconnectName",
    bandwidth: "capo_direct_connect.types.bandwidth.Bandwidth",
    location: "capo_direct_connect.types.location_code.LocationCode",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    lag_id: Optional["capo_direct_connect.types.lag_id.LagId"] = None,
    tags: Optional["capo_direct_connect.types.tag_list.TagList"] = None,
    provider_name: Optional[
        "capo_direct_connect.types.provider_name.ProviderName"
    ] = None,
    request_mac_sec: Optional[
        "capo_direct_connect.types.request_mac_sec.RequestMACSec"
    ] = None,
) -> "capo_direct_connect.types.interconnect.Interconnect":
    """<p>Creates an interconnect between an Direct Connect Partner's network and a specific Direct Connect location.</p> <p>An interconnect is a connection that is capable of hosting other connections. The Direct Connect Partner can use an interconnect to provide Direct Connect hosted connections to customers through their own network services. Like a standard connection, an interconnect links the partner's network to an Direct Connect location over a standard Ethernet fiber-optic cable. One end is connected to the partner's router, the other to an Direct Connect router.</p> <p>You can automatically add the new interconnect to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect is allocated on the same Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no interconnect is created.</p> <p>For each end customer, the Direct Connect Partner provisions a connection on their interconnect by calling <a>AllocateHostedConnection</a>. The end customer can then connect to Amazon Web Services resources by creating a virtual interface on their connection, using the VLAN assigned to them by the Direct Connect Partner.</p> <note> <p>Intended for use by Direct Connect Partners only.</p> </note>

    Args:
        interconnect_name: <p>The name of the interconnect.</p>
        bandwidth: <p>The port bandwidth, in Gbps. The possible values are 1, 10, and 100.</p>
        location: <p>The location of the interconnect.</p>
        lag_id: <p>The ID of the LAG.</p>
        tags: <p>The tags to associate with the interconnect.</p>
        provider_name: <p>The name of the service provider associated with the interconnect.</p>
        request_mac_sec: <p>Indicates whether you want the interconnect to support MAC Security (MACsec).</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.duplicate_tag_keys_exception.DuplicateTagKeysException: <p>A tag key was specified more than once.</p>
        capo_direct_connect.errors.too_many_tags_exception.TooManyTagsException: <p>You have reached the limit on the number of tags that can be assigned.</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.create_interconnect_request.CreateInterconnectRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.interconnect.Interconnect"
    ]:
        import capo_direct_connect._operations.overture_service.create_interconnect

        (
            output,
            http_response,
        ) = await capo_direct_connect._operations.overture_service.create_interconnect.async_create_interconnect(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateInterconnect")
    )
    input_: capo_direct_connect.types.create_interconnect_request.CreateInterconnectRequest = {
        "interconnect_name": interconnect_name,
        "bandwidth": bandwidth,
        "location": location,
    }
    if lag_id is not None:
        input_["lag_id"] = lag_id
    if tags is not None:
        input_["tags"] = tags
    if provider_name is not None:
        input_["provider_name"] = provider_name
    if request_mac_sec is not None:
        input_["request_mac_sec"] = request_mac_sec

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