

# CreateNetworkSettings
<a name="API_CreateNetworkSettings"></a>

Creates a network settings resource that can be associated with a web portal. Once associated with a web portal, network settings define how streaming instances will connect with your specified VPC. 

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

```
POST /networkSettings HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "securityGroupIds": [ "string" ],
   "subnetIds": [ "string" ],
   "tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ],
   "vpcId": "string"
}
```

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

The request does not use any URI parameters.

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

The request accepts the following data in JSON format.

 ** [clientToken](#API_CreateNetworkSettings_RequestSyntax) **   <a name="workspacesweb-CreateNetworkSettings-request-clientToken"></a>
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.   
If you do not specify a client token, one is automatically generated by the AWS SDK.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 512.  
Required: No

 ** [securityGroupIds](#API_CreateNetworkSettings_RequestSyntax) **   <a name="workspacesweb-CreateNetworkSettings-request-securityGroupIds"></a>
One or more security groups used to control access from streaming instances to your VPC.  
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 5 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\w+\-]+`   
Required: Yes

 ** [subnetIds](#API_CreateNetworkSettings_RequestSyntax) **   <a name="workspacesweb-CreateNetworkSettings-request-subnetIds"></a>
The subnets in which network interfaces are created to connect streaming instances to your VPC. At least two of these subnets must be in different availability zones.  
Type: Array of strings  
Array Members: Minimum number of 2 items. Maximum number of 5 items.  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Pattern: `subnet-([0-9a-f]{8}|[0-9a-f]{17})`   
Required: Yes

 ** [tags](#API_CreateNetworkSettings_RequestSyntax) **   <a name="workspacesweb-CreateNetworkSettings-request-tags"></a>
The tags to add to the network settings resource. A tag is a key-value pair.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 200 items.  
Required: No

 ** [vpcId](#API_CreateNetworkSettings_RequestSyntax) **   <a name="workspacesweb-CreateNetworkSettings-request-vpcId"></a>
The VPC that streaming instances will connect to.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Pattern: `vpc-[0-9a-z]*`   
Required: Yes

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

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

{
   "networkSettingsArn": "string"
}
```

## Response Elements
<a name="API_CreateNetworkSettings_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.

 ** [networkSettingsArn](#API_CreateNetworkSettings_ResponseSyntax) **   <a name="workspacesweb-CreateNetworkSettings-response-networkSettingsArn"></a>
The ARN of the network settings.  
Type: String  
Length Constraints: Minimum length of 20. Maximum length of 2048.  
Pattern: `arn:[\w+=\/,.@-]+:[a-zA-Z0-9\-]+:[a-zA-Z0-9\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\/[a-fA-F0-9\-]{36})+` 

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

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

 ** AccessDeniedException **   
Access is denied.  
HTTP Status Code: 403

 ** ConflictException **   
There is a conflict.    
 ** resourceId **   
Identifier of the resource affected.  
 ** resourceType **   
Type of the resource affected.
HTTP Status Code: 409

 ** InternalServerException **   
There is an internal server error.    
 ** retryAfterSeconds **   
Advice to clients on when the call can be safely retried.
HTTP Status Code: 500

 ** ServiceQuotaExceededException **   
The service quota has been exceeded.    
 ** quotaCode **   
The originating quota.  
 ** resourceId **   
Identifier of the resource affected.  
 ** resourceType **   
 Type of the resource affected.  
 ** serviceCode **   
The originating service.
HTTP Status Code: 402

 ** ThrottlingException **   
There is a throttling error.    
 ** quotaCode **   
The originating quota.  
 ** retryAfterSeconds **   
Advice to clients on when the call can be safely retried.  
 ** serviceCode **   
The originating service.
HTTP Status Code: 429

 ** ValidationException **   
There is a validation error.    
 ** fieldList **   
The field that caused the error.  
 ** reason **   
Reason the request failed validation
HTTP Status Code: 400

## See Also
<a name="API_CreateNetworkSettings_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/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/workspaces-web-2020-07-08/CreateNetworkSettings) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workspaces-web-2020-07-08/CreateNetworkSettings) 