

# GetEnvironmentsForNetworkConnector

Returns a list of the environments that have a network connector.

## Request Syntax
<a name="API_GetEnvironmentsForNetworkConnector_RequestSyntax"></a>

```
GET /network-connectors/{{NetworkConnectorName}}/environments?maxResults={{MaxResults}}&nextToken={{NextToken}} HTTP/1.1
```

## URI Request Parameters
<a name="API_GetEnvironmentsForNetworkConnector_RequestParameters"></a>

The request uses the following URI parameters.

 ** [MaxResults](#API_GetEnvironmentsForNetworkConnector_RequestSyntax) **   <a name="amplifygen3-GetEnvironmentsForNetworkConnector-request-uri-MaxResults"></a>
The maximum number of results to return in a single response.  
Valid Range: Minimum value of 1. Maximum value of 50.

 ** [NetworkConnectorName](#API_GetEnvironmentsForNetworkConnector_RequestSyntax) **   <a name="amplifygen3-GetEnvironmentsForNetworkConnector-request-uri-NetworkConnectorName"></a>
The name of the network connector.  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9]([a-zA-Z0-9_-]*[a-zA-Z0-9])?`   
Required: Yes

 ** [NextToken](#API_GetEnvironmentsForNetworkConnector_RequestSyntax) **   <a name="amplifygen3-GetEnvironmentsForNetworkConnector-request-uri-NextToken"></a>
The pagination token returned in a previous response, used to retrieve the next page of results.  
Length Constraints: Minimum length of 1. Maximum length of 2000.

## Request Body
<a name="API_GetEnvironmentsForNetworkConnector_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetEnvironmentsForNetworkConnector_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "ConnectorReferences": [ 
      { 
         "AppArn": "string",
         "AppName": "string",
         "ConnectionTypes": [ "string" ],
         "EnvironmentArn": "string",
         "EnvironmentName": "string"
      }
   ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_GetEnvironmentsForNetworkConnector_ResponseElements"></a>

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

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

 ** [ConnectorReferences](#API_GetEnvironmentsForNetworkConnector_ResponseSyntax) **   <a name="amplifygen3-GetEnvironmentsForNetworkConnector-response-ConnectorReferences"></a>
The environments that use the network connector.  
Type: Array of [ConnectorReferenceSummary](API_ConnectorReferenceSummary.md) objects

 ** [NextToken](#API_GetEnvironmentsForNetworkConnector_ResponseSyntax) **   <a name="amplifygen3-GetEnvironmentsForNetworkConnector-response-NextToken"></a>
The pagination token returned in a previous response, used to retrieve the next page of results.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2000.

## Errors
<a name="API_GetEnvironmentsForNetworkConnector_Errors"></a>

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

 ** AccessDeniedException **   
You do not have sufficient permissions to perform this action.    
 ** message **   
A message that describes the error.
HTTP Status Code: 403

 ** InternalServerException **   
An internal error occurred. Retry the request.    
 ** message **   
A message that describes the error.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The requested resource was not found.    
 ** message **   
A message that describes the error.
HTTP Status Code: 404

 ** ThrottlingException **   
The request was denied because the request rate exceeds the allowed limit.    
 ** message **   
A message that describes the error.  
 ** quotaCode **   
The code of the service quota that caused the throttling.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request.  
 ** serviceCode **   
The code of the service that the quota belongs to.
HTTP Status Code: 429

 ** ValidationException **   
The request contains invalid parameters or is otherwise malformed.    
 ** message **   
A message that describes the error.
HTTP Status Code: 400

## See Also
<a name="API_GetEnvironmentsForNetworkConnector_SeeAlso"></a>

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/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/amplifygen3-2025-09-18/GetEnvironmentsForNetworkConnector) 