create_connection
async
¶
create_connection(
location: LocationCode,
bandwidth: Bandwidth,
connection_name: ConnectionName,
*,
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,
billing_mode: Optional[RequestBillingMode] = None,
) -> 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.
Parameters:
-
location(LocationCode) –The location of the connection.
-
bandwidth(Bandwidth) –The bandwidth of the connection.
-
connection_name(ConnectionName) –The name of the connection.
-
lag_id(Optional[LagId], default:None) –The ID of the LAG.
-
tags(Optional[TagList], default:None) –The tags to associate with the lag.
-
provider_name(Optional[ProviderName], default:None) –The name of the service provider associated with the requested connection.
-
request_mac_sec(Optional[RequestMACSec], default:None) –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.
-
billing_mode(Optional[RequestBillingMode], default:None) –The billing mode for the connection.
Raises:
-
DirectConnectClientException–One or more parameters are not valid.
-
DirectConnectServerException–A server-side error occurred.
-
DuplicateTagKeysException–A tag key was specified more than once.
-
TooManyTagsException–You have reached the limit on the number of tags that can be assigned.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 | |