Lists the Direct Connect locations in the current Amazon Web Services Region. These are the locations that can be selected when calling CreateConnection or CreateInterconnect.
Raises:
Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
| async def describe_locations(
self, *, config_overrides: Optional[AsyncDirectConnectClientConfig] = None
) -> "capo_direct_connect.types.locations.Locations":
"""<p>Lists the Direct Connect locations in the current Amazon Web Services Region. These are the locations that can be selected when calling <a>CreateConnection</a> or <a>CreateInterconnect</a>.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[None]",
) -> AsyncOperationResponse["capo_direct_connect.types.locations.Locations"]:
import capo_direct_connect._operations.overture_service.describe_locations
(
output,
http_response,
) = await capo_direct_connect._operations.overture_service.describe_locations.async_describe_locations(
req.options
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeLocations")
)
response = await aexecute_pipeline(
AsyncOperationRequest(input=None, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|