

# DescribeHostedConnections


Lists the hosted connections that have been provisioned on the specified interconnect or link aggregation group (LAG).

**Note**  
Intended for use by Direct Connect Partners only.

## Request Syntax


```
{
   "connectionId": "string",
   "maxResults": number,
   "nextToken": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [connectionId](#API_DescribeHostedConnections_RequestSyntax) **   <a name="DX-DescribeHostedConnections-request-connectionId"></a>
The ID of the interconnect or LAG.  
Type: String  
Required: Yes

 ** [maxResults](#API_DescribeHostedConnections_RequestSyntax) **   <a name="DX-DescribeHostedConnections-request-maxResults"></a>
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned `nextToken` value.  
If `MaxResults` is given a value larger than 100, only 100 results are returned.  
Type: Integer  
Required: No

 ** [nextToken](#API_DescribeHostedConnections_RequestSyntax) **   <a name="DX-DescribeHostedConnections-request-nextToken"></a>
The token for the next page of results.  
Type: String  
Required: No

## Response Syntax


```
{
   "connections": [ 
      { 
         "awsDevice": "string",
         "awsDeviceV2": "string",
         "awsLogicalDeviceId": "string",
         "bandwidth": "string",
         "connectionId": "string",
         "connectionName": "string",
         "connectionState": "string",
         "encryptionMode": "string",
         "hasLogicalRedundancy": "string",
         "jumboFrameCapable": boolean,
         "lagId": "string",
         "loaIssueTime": number,
         "location": "string",
         "macSecCapable": boolean,
         "macSecKeys": [ 
            { 
               "ckn": "string",
               "secretARN": "string",
               "startOn": "string",
               "state": "string"
            }
         ],
         "ownerAccount": "string",
         "partnerInterconnectMacSecCapable": boolean,
         "partnerName": "string",
         "portEncryptionStatus": "string",
         "providerName": "string",
         "region": "string",
         "tags": [ 
            { 
               "key": "string",
               "value": "string"
            }
         ],
         "vlan": number
      }
   ],
   "nextToken": "string"
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [connections](#API_DescribeHostedConnections_ResponseSyntax) **   <a name="DX-DescribeHostedConnections-response-connections"></a>
The connections.  
Type: Array of [Connection](API_Connection.md) objects

 ** [nextToken](#API_DescribeHostedConnections_ResponseSyntax) **   <a name="DX-DescribeHostedConnections-response-nextToken"></a>
The token to use to retrieve the next page of results. This value is `null` when there are no more results to return.  
Type: String

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** DirectConnectClientException **   
One or more parameters are not valid.  
HTTP Status Code: 400

 ** DirectConnectServerException **   
A server-side error occurred.  
HTTP Status Code: 400

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/directconnect-2012-10-25/DescribeHostedConnections) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/directconnect-2012-10-25/DescribeHostedConnections) 