

# GetLink

Retrieves information about a link between gateways.

Returns detailed information about the link configuration, status, and associated gateways.

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

```
GET /gateway/{{gatewayId}}/link/{{linkId}} HTTP/1.1
```

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

The request uses the following URI parameters.

 ** [gatewayId](#API_GetLink_RequestSyntax) **   <a name="rtbfabric-GetLink-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

 ** [linkId](#API_GetLink_RequestSyntax) **   <a name="rtbfabric-GetLink-request-uri-linkId"></a>
The unique identifier of the link.  
Length Constraints: Minimum length of 6. Maximum length of 30.  
Pattern: `link-[a-z0-9-]{1,25}`   
Required: Yes

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

The request does not have a request body.

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

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

{
   "attributes": { 
      "customerProvidedId": "string",
      "responderErrorMasking": [ 
         { 
            "action": "string",
            "httpCode": "string",
            "loggingTypes": [ "string" ],
            "responseLoggingPercentage": number
         }
      ]
   },
   "connectivityType": "string",
   "createdAt": number,
   "direction": "string",
   "errorDetails": [ 
      { 
         "code": "string",
         "message": "string",
         "resourceIds": [ "string" ]
      }
   ],
   "flowModules": [ 
      { 
         "dependsOn": [ "string" ],
         "moduleParameters": { ... },
         "name": "string",
         "version": "string"
      }
   ],
   "flows": [ 
      { 
         "name": "string",
         "pipeline": { ... }
      }
   ],
   "gatewayId": "string",
   "httpResponderAllowed": boolean,
   "linkId": "string",
   "lockToken": "string",
   "logSettings": { 
      "applicationLogs": { 
         "sampling": { 
            "errorLog": number,
            "filterLog": number
         }
      }
   },
   "peerGatewayId": "string",
   "pendingFlowModules": [ 
      { 
         "dependsOn": [ "string" ],
         "moduleParameters": { ... },
         "name": "string",
         "version": "string"
      }
   ],
   "status": "string",
   "tags": { 
      "string" : "string" 
   },
   "timeoutInMillis": number,
   "updatedAt": number
}
```

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

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

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

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

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

 ** [errorDetails](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-errorDetails"></a>
The causes of the link's failure, such as a deleted subnet. Present only when the link is CREATE\_FAILED or DELETE\_FAILED.  
Type: Array of [ErrorDetail](API_ErrorDetail.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 10 items.

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

 ** [flows](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-flows"></a>
The link's active flows, in the form PutLinkFlows takes. Empty when the link has no modules, and absent when its modules were set with UpdateLinkModuleFlow. While an update is in progress, use GetUpdate to see the requested flows.  
Type: Array of [Flow](API_Flow.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 1 item.

 ** [gatewayId](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-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}` 

 ** [httpResponderAllowed](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-httpResponderAllowed"></a>
Boolean to specify if an HTTP responder is allowed.  
Type: Boolean

 ** [linkId](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-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}` 

 ** [lockToken](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-lockToken"></a>
The link's concurrency token. Pass it to PutLinkFlows unchanged; it changes whenever the link does.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.

 ** [logSettings](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-logSettings"></a>
Settings for the application logs.  
Type: [LinkLogSettings](API_LinkLogSettings.md) object

 ** [peerGatewayId](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-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_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-pendingFlowModules"></a>
The configuration of pending flow modules.  
Type: Array of [ModuleConfiguration](API_ModuleConfiguration.md) objects

 ** [status](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-status"></a>
The status of the link. After CREATE\_FAILED, delete the link and create it again. After DELETE\_FAILED, retry the delete. `errorDetails` gives the cause.  
Type: String  
Valid Values: `PENDING_CREATION | PENDING_REQUEST | REQUESTED | ACCEPTED | ACTIVE | REJECTED | FAILED | PENDING_DELETION | DELETED | PENDING_UPDATE | PENDING_ISOLATION | ISOLATED | PENDING_RESTORATION | CREATE_FAILED | DELETE_FAILED` 

 ** [tags](#API_GetLink_ResponseSyntax) **   <a name="rtbfabric-GetLink-response-tags"></a>
A map of the key-value pairs for the tag or tags assigned to the specified resource.  
Type: String to string map  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `(resourceArn|internalId|[a-zA-Z0-9+\-=._:/@]+)`   
Value Length Constraints: Minimum length of 0. Maximum length of 1600.

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

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

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

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

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

 ** ValidationException **   
The request could not be completed because it fails to satisfy the constraints specified by the service.  
HTTP Status Code: 400

## See Also
<a name="API_GetLink_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/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/rtbfabric-2023-05-15/GetLink) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/rtbfabric-2023-05-15/GetLink) 