Method: Aws::DirectConnect::Client#create_connection

Defined in:
lib/aws-sdk-directconnect/client.rb

#create_connection(params = {}) ⇒ Types::Connection

Creates a connection between a customer network and a specific Direct Connect location.

A connection links your internal network to an Direct Connect location over a standard Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an Direct Connect router.

To find the locations for your Region, use DescribeLocations.

You can automatically add the new connection to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new connection 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 connection is created.

Examples:

Request syntax with placeholder values


resp = client.create_connection({
  location: "LocationCode", # required
  bandwidth: "Bandwidth", # required
  connection_name: "ConnectionName", # required
  lag_id: "LagId",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  provider_name: "ProviderName",
  request_mac_sec: false,
})

Response structure


resp. #=> String
resp.connection_id #=> String
resp.connection_name #=> String
resp.connection_state #=> String, one of "ordering", "requested", "pending", "available", "down", "deleting", "deleted", "rejected", "unknown"
resp.region #=> String
resp.location #=> String
resp.bandwidth #=> String
resp.vlan #=> Integer
resp.partner_name #=> String
resp.loa_issue_time #=> Time
resp.lag_id #=> String
resp.aws_device #=> String
resp.jumbo_frame_capable #=> Boolean
resp.aws_device_v2 #=> String
resp.aws_logical_device_id #=> String
resp.has_logical_redundancy #=> String, one of "unknown", "yes", "no"
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.provider_name #=> String
resp.mac_sec_capable #=> Boolean
resp.port_encryption_status #=> String
resp.encryption_mode #=> String
resp.mac_sec_keys #=> Array
resp.mac_sec_keys[0].secret_arn #=> String
resp.mac_sec_keys[0].ckn #=> String
resp.mac_sec_keys[0].state #=> String
resp.mac_sec_keys[0].start_on #=> String
resp.partner_interconnect_mac_sec_capable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :location (required, String)

    The location of the connection.

  • :bandwidth (required, String)

    The bandwidth of the connection.

  • :connection_name (required, String)

    The name of the connection.

  • :lag_id (String)

    The ID of the LAG.

  • :tags (Array<Types::Tag>)

    The tags to associate with the lag.

  • :provider_name (String)

    The name of the service provider associated with the requested connection.

  • :request_mac_sec (Boolean)

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

    MAC Security (MACsec) is unavailable on hosted connections. For information about MAC Security (MACsec) prerequisites, see [MAC Security in Direct Connect] in the *Direct Connect User Guide*.

    [1]: docs.aws.amazon.com/directconnect/latest/UserGuide/MACSec.html

Returns:

See Also:



1948
1949
1950
1951
# File 'lib/aws-sdk-directconnect/client.rb', line 1948

def create_connection(params = {}, options = {})
  req = build_request(:create_connection, params)
  req.send_request(options)
end