

# CreateInstance
<a name="API_CreateInstance"></a>

This API is in preview release for Amazon Connect and is subject to change.

Initiates an Amazon Connect instance with all the supported channels enabled. It does not attach any storage, such as Amazon Simple Storage Service (Amazon S3) or Amazon Kinesis. It also does not allow for any configurations on features, such as Contact Lens for Amazon Connect. 

For more information, see [Create an Amazon Connect instance](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-instances.html) in the *Amazon Connect Administrator Guide*.

Amazon Connect enforces a limit on the total number of instances that you can create or delete in 30 days. If you exceed this limit, you will get an error message indicating there has been an excessive number of attempts at creating or deleting instances. You must wait 30 days before you can restart creating and deleting instances in your account.

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

```
PUT /instance HTTP/1.1
Content-type: application/json

{
   "ClientToken": "string",
   "DirectoryId": "string",
   "IdentityManagementType": "string",
   "InboundCallsEnabled": boolean,
   "InstanceAlias": "string",
   "OutboundCallsEnabled": boolean,
   "Tags": { 
      "string" : "string" 
   }
}
```

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

The request does not use any URI parameters.

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

The request accepts the following data in JSON format.

 ** [ClientToken](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-ClientToken"></a>
The idempotency token.  
Type: String  
Length Constraints: Maximum length of 500.  
Required: No

 ** [DirectoryId](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-DirectoryId"></a>
The identifier for the directory.  
Type: String  
Length Constraints: Fixed length of 12.  
Pattern: `^d-[0-9a-f]{10}$`   
Required: No

 ** [IdentityManagementType](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-IdentityManagementType"></a>
The type of identity management for your Amazon Connect users.  
Type: String  
Valid Values: `SAML | CONNECT_MANAGED | EXISTING_DIRECTORY`   
Required: Yes

 ** [InboundCallsEnabled](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-InboundCallsEnabled"></a>
Your contact center handles incoming contacts.  
Type: Boolean  
Required: Yes

 ** [InstanceAlias](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-InstanceAlias"></a>
The name for your instance.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 45.  
Pattern: `^(?!d-)([\da-zA-Z]+)([-]*[\da-zA-Z])*$`   
Required: No

 ** [OutboundCallsEnabled](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-OutboundCallsEnabled"></a>
Your contact center allows outbound calls.  
Type: Boolean  
Required: Yes

 ** [Tags](#API_CreateInstance_RequestSyntax) **   <a name="connect-CreateInstance-request-Tags"></a>
The tags used to organize, track, or control access for this resource. For example, `{ "tags": {"key1":"value1", "key2":"value2"} }`.  
Type: String to string map  
Map Entries: Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `^(?!aws:)[\p{L}\p{Z}\p{N}_.:/=+\-@]*$`   
Value Length Constraints: Maximum length of 256.  
Required: No

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

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

{
   "Arn": "string",
   "Id": "string"
}
```

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

 ** [Arn](#API_CreateInstance_ResponseSyntax) **   <a name="connect-CreateInstance-response-Arn"></a>
The Amazon Resource Name (ARN) of the instance.  
Type: String

 ** [Id](#API_CreateInstance_ResponseSyntax) **   <a name="connect-CreateInstance-response-Id"></a>
The identifier for the instance.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 100.

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

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

 ** InternalServiceException **   
Request processing failed because of an error or failure with the service.    
 ** Message **   
The message.
HTTP Status Code: 500

 ** InvalidRequestException **   
The request is not valid.    
 ** Message **   
The message about the request.  
 ** Reason **   
Reason why the request was invalid.
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The specified resource was not found.    
 ** Message **   
The message about the resource.
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
The service quota has been exceeded.    
 ** Reason **   
The reason for the exception.
HTTP Status Code: 402

 ** ThrottlingException **   
The throttling limit has been exceeded.  
HTTP Status Code: 429

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