

# GetLink


Returns complete information about one link.

To use this operation, provide the link ARN. To retrieve a list of link ARNs, use [ListLinks](https://docs.amazonaws.cn/OAM/latest/APIReference/API_ListLinks.html).

## Request Syntax


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

{
   "Identifier": "string",
   "IncludeTags": boolean
}
```

## URI Request Parameters


The request does not use any URI parameters.

## Request Body


The request accepts the following data in JSON format.

 ** [Identifier](#API_GetLink_RequestSyntax) **   <a name="OAM-GetLink-request-Identifier"></a>
The ARN of the link to retrieve information for.  
Type: String  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9_:\.\-\/]{0,2047}`   
Required: Yes

 ** [IncludeTags](#API_GetLink_RequestSyntax) **   <a name="OAM-GetLink-request-IncludeTags"></a>
Set `IncludeTags` to `true` to receive tags in the response, or `false` to exclude them.  
The default value is `true`.  
Type: Boolean  
Required: No

## Response Syntax


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

{
   "Arn": "string",
   "Id": "string",
   "Label": "string",
   "LabelTemplate": "string",
   "LinkConfiguration": { 
      "LogGroupConfiguration": { 
         "Filter": "string"
      },
      "MetricConfiguration": { 
         "Filter": "string"
      }
   },
   "ResourceTypes": [ "string" ],
   "SinkArn": "string",
   "Tags": { 
      "string" : "string" 
   }
}
```

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

 ** [Arn](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-Arn"></a>
The ARN of the link.  
Type: String

 ** [Id](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-Id"></a>
The random ID string that Amazon generated as part of the link ARN.  
Type: String

 ** [Label](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-Label"></a>
The label that you assigned to this link, with the variables resolved to their actual values.  
Type: String

 ** [LabelTemplate](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-LabelTemplate"></a>
The exact label template that was specified when the link was created, with the template variables not resolved.  
Type: String

 ** [LinkConfiguration](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-LinkConfiguration"></a>
This structure includes filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.  
Type: [LinkConfiguration](API_LinkConfiguration.md) object

 ** [ResourceTypes](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-ResourceTypes"></a>
The resource types supported by this link.  
Type: Array of strings

 ** [SinkArn](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-SinkArn"></a>
The ARN of the sink that is used for this link.  
Type: String

 ** [Tags](#API_GetLink_ResponseSyntax) **   <a name="OAM-GetLink-response-Tags"></a>
The tags assigned to the link.  
Type: String to string map

## Errors


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

 ** InternalServiceFault **   
Unexpected error while processing the request. Retry the request.    
 ** amznErrorType **   
The name of the exception.
HTTP Status Code: 500

 ** InvalidParameterException **   
A parameter is specified incorrectly.    
 ** amznErrorType **   
The name of the exception.
HTTP Status Code: 400

 ** MissingRequiredParameterException **   
A required parameter is missing from the request.    
 ** amznErrorType **   
The name of the exception.
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The request references a resource that does not exist.    
 ** amznErrorType **   
The name of the exception.
HTTP Status Code: 404

## See Also


For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/oam-2022-06-10/GetLink) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/oam-2022-06-10/GetLink) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/oam-2022-06-10/GetLink) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/oam-2022-06-10/GetLink) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/oam-2022-06-10/GetLink) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/oam-2022-06-10/GetLink) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/oam-2022-06-10/GetLink) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/oam-2022-06-10/GetLink) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/oam-2022-06-10/GetLink) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/oam-2022-06-10/GetLink) 