

# CreateLink


Creates a new link between gateways.

Establishes a connection that allows gateways to communicate and exchange bid requests and responses.

## Request Syntax


```
POST /gateway/gatewayId/create-link HTTP/1.1
Content-type: application/json

{
   "attributes": { 
      "customerProvidedId": "string",
      "responderErrorMasking": [ 
         { 
            "action": "string",
            "httpCode": "string",
            "loggingTypes": [ "string" ],
            "responseLoggingPercentage": number
         }
      ]
   },
   "httpResponderAllowed": boolean,
   "logSettings": { 
      "applicationLogs": { 
         "sampling": { 
            "errorLog": number,
            "filterLog": number
         }
      }
   },
   "peerGatewayId": "string",
   "tags": { 
      "string" : "string" 
   },
   "timeoutInMillis": number
}
```

## URI Request Parameters


The request uses the following URI parameters.

 ** [gatewayId](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-uri-gatewayId"></a>
The unique identifier of the gateway.  
Length Constraints: Minimum length of 8. Maximum length of 32.  
Pattern: `rtb-gw-[a-z0-9-]{1,25}`   
Required: Yes

## Request Body


The request accepts the following data in JSON format.

 ** [attributes](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-attributes"></a>
Attributes of the link.  
Type: [LinkAttributes](API_LinkAttributes.md) object  
Required: No

 ** [httpResponderAllowed](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-httpResponderAllowed"></a>
Boolean to specify if an HTTP responder is allowed.  
Type: Boolean  
Required: No

 ** [logSettings](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-logSettings"></a>
Settings for the application logs.  
Type: [LinkLogSettings](API_LinkLogSettings.md) object  
Required: Yes

 ** [peerGatewayId](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-peerGatewayId"></a>
The unique identifier of the peer gateway.  
Type: String  
Length Constraints: Minimum length of 8. Maximum length of 32.  
Pattern: `rtb-gw-[a-z0-9-]{1,25}`   
Required: Yes

 ** [tags](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-tags"></a>
A map of the key-value pairs of the tag or tags to assign to the resource.  
Type: String to string map  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `(resourceArn|internalId|(?!aws:)[a-zA-Z0-9+\-=._:/@]+)`   
Value Length Constraints: Minimum length of 0. Maximum length of 1600.  
Required: No

 ** [timeoutInMillis](#API_CreateLink_RequestSyntax) **   <a name="rtbfabric-CreateLink-request-timeoutInMillis"></a>
The timeout value in milliseconds.  
Type: Long  
Valid Range: Minimum value of 100. Maximum value of 5000.  
Required: No

## Response Syntax


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

{
   "attributes": { 
      "customerProvidedId": "string",
      "responderErrorMasking": [ 
         { 
            "action": "string",
            "httpCode": "string",
            "loggingTypes": [ "string" ],
            "responseLoggingPercentage": number
         }
      ]
   },
   "connectivityType": "string",
   "createdAt": number,
   "customerProvidedId": "string",
   "direction": "string",
   "flowModules": [ 
      { 
         "dependsOn": [ "string" ],
         "moduleParameters": { ... },
         "name": "string",
         "version": "string"
      }
   ],
   "gatewayId": "string",
   "linkId": "string",
   "logSettings": { 
      "applicationLogs": { 
         "sampling": { 
            "errorLog": number,
            "filterLog": number
         }
      }
   },
   "peerGatewayId": "string",
   "pendingFlowModules": [ 
      { 
         "dependsOn": [ "string" ],
         "moduleParameters": { ... },
         "name": "string",
         "version": "string"
      }
   ],
   "status": "string",
   "updatedAt": number
}
```

## 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.

 ** [attributes](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-attributes"></a>
Attributes of the link.  
Type: [LinkAttributes](API_LinkAttributes.md) object

 ** [connectivityType](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-connectivityType"></a>
The connectivity type of the link.  
Type: String  
Valid Values: `DEFAULT | PUBLIC_INGRESS | PUBLIC_EGRESS | EXTERNAL_INBOUND` 

 ** [createdAt](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-createdAt"></a>
The timestamp of when the link was created.  
Type: Timestamp

 ** [customerProvidedId](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-customerProvidedId"></a>
The customer-provided unique identifier of the link.  
Type: String  
Pattern: `[a-zA-Z0-9_-]{5,50}` 

 ** [direction](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-direction"></a>
The direction of the link.  
Type: String  
Valid Values: `RESPONSE | REQUEST` 

 ** [flowModules](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-flowModules"></a>
The configuration of flow modules.  
Type: Array of [ModuleConfiguration](API_ModuleConfiguration.md) objects

 ** [gatewayId](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-gatewayId"></a>
The unique identifier of the gateway.  
Type: String  
Length Constraints: Minimum length of 8. Maximum length of 32.  
Pattern: `rtb-gw-[a-z0-9-]{1,25}` 

 ** [linkId](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-linkId"></a>
The unique identifier of the link.  
Type: String  
Length Constraints: Minimum length of 6. Maximum length of 30.  
Pattern: `link-[a-z0-9-]{1,25}` 

 ** [logSettings](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-logSettings"></a>
Describes the settings for a link log.  
Type: [LinkLogSettings](API_LinkLogSettings.md) object

 ** [peerGatewayId](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-peerGatewayId"></a>
The unique identifier of the peer gateway.  
Type: String  
Length Constraints: Minimum length of 8. Maximum length of 32.  
Pattern: `rtb-gw-[a-z0-9-]{1,25}` 

 ** [pendingFlowModules](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-pendingFlowModules"></a>
The configuration of pending flow modules.  
Type: Array of [ModuleConfiguration](API_ModuleConfiguration.md) objects

 ** [status](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-status"></a>
The status of the request.  
Type: String  
Valid Values: `PENDING_CREATION | PENDING_REQUEST | REQUESTED | ACCEPTED | ACTIVE | REJECTED | FAILED | PENDING_DELETION | DELETED | PENDING_UPDATE | PENDING_ISOLATION | ISOLATED | PENDING_RESTORATION` 

 ** [updatedAt](#API_CreateLink_ResponseSyntax) **   <a name="rtbfabric-CreateLink-response-updatedAt"></a>
The timestamp of when the link was updated.  
Type: Timestamp

## Errors


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

 ** AccessDeniedException **   
The request could not be completed because you do not have sufficient access to perform this action.  
HTTP Status Code: 403

 ** ConflictException **   
The request could not be completed because of a conflict in the current state of the resource.  
HTTP Status Code: 409

 ** InternalServerException **   
The request could not be completed because of an internal server error. Try your call again.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The request could not be completed because the resource does not exist.  
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
The request could not be completed because you exceeded a service quota.  
HTTP Status Code: 402

 ** ThrottlingException **   
The request was denied due to request throttling.  
HTTP Status Code: 429

 ** ValidationException **   
The request could not be completed because it fails satisfy the constraints specified by the service.  
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/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/rtbfabric-2023-05-15/CreateLink) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/rtbfabric-2023-05-15/CreateLink) 