

# GetConnection

Returns a connection's configuration and status.

## Request Parameters
<a name="API_GetConnection_RequestParameters"></a>

 ** connectionId **   
The connection to return, by its ID (which starts with `conn-`) or its ARN.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 180.  
Pattern: `(arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:connection/)?[a-z0-9]+(-[a-z0-9]+)*`   
Required: Yes

## Response Elements
<a name="API_GetConnection_ResponseElements"></a>

The following elements are returned by the service.

 ** accessConfig **   
Per-connection access configuration: the IAM role used for data access.  
Type: [AccessConfig](API_AccessConfig.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.

 ** arn **   
The ARN of the connection.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 180.  
Pattern: `arn:(aws|aws-cn|aws-us-gov):context:[a-z0-9\-]{1,32}:\d{12}:connection/[a-z0-9]+(-[a-z0-9]+)*` 

 ** createdAt **   
The date and time when the connection was created.  
Type: Timestamp

 ** dataSource **   
The typed reference to the external data source that this connection binds to. Its `type`, the authoritative kind of data source, is in `dataSource.type`.  
Type: [DataSourceReference](API_DataSourceReference.md) object

 ** failure **   
The reason the connection is FAILED. Absent in every other status.  
Type: [ConnectionFailure](API_ConnectionFailure.md) object

 ** glueConnectionMappings **   
The AWS Glue connection for each `redshiftNamespace`, each `rdsInstance` and `rdsDatabase` pair, or each `snowflakeDatabase` in `scope`. Absent when none is configured.  
Type: Array of [GlueConnectionMapping](API_GlueConnectionMapping.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 20 items.

 ** id **   
The ID of the connection.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-z0-9]+(-[a-z0-9]+)*` 

 ** ingestionConfig **   
The connection's ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.  
Type: [IngestionConfig](API_IngestionConfig.md) object

 ** name **   
The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 63.  
Pattern: `[a-zA-Z][a-zA-Z0-9-]*` 

 ** scope **   
The hierarchical subset of the data source this connection ingests.  
Type: [DataSourceScope](API_DataSourceScope.md) object

 ** status **   
The connection's status. Valid values:  
+  `CREATING` - Validation or provisioning is still in progress.
+  `ACTIVE` - The data source is reachable and, for a `DATABRICKS` or `SNOWFLAKE` connection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn't mean that a crawl has started or completed.
+  `UPDATING` - The connection is being updated.
+  `DELETING` - The connection is being deleted.
+  `FAILED` - Validation or provisioning failed, and the connection can't recover.
Type: String  
Valid Values: `CREATING | ACTIVE | UPDATING | DELETING | FAILED` 

 ** subStatus **   
The last milestone a third-party connection's lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE\_CONNECTION\_VALIDATED on a connection created with `publish: false` means it is waiting for UpdateConnection `publish: true`.  
Type: String  
Valid Values: `GLUE_CONNECTION_CREATED | GLUE_CONNECTION_VALIDATED | SYNC_JOB_CREATED` 

 ** syncSchedule **   
The effective sync schedule. Present for `DATABRICKS` and `SNOWFLAKE` connections (`DAILY` if you didn't specify one). Absent for `GLUE_DATA_CATALOG` and `BEDROCK_KNOWLEDGE_BASE` connections, which are event-driven.  
Type: [SyncSchedule](API_SyncSchedule.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.

 ** updatedAt **   
When the resource last changed. Equal to `createdAt` until the first update.  
Type: Timestamp

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

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

 ** AccessDeniedException **   
You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.    
 ** message **   
A message that describes the error.
HTTP Status Code: 403

 ** InternalServerException **   
The request failed because of an internal error. Retry the request.    
 ** message **   
A message that describes the error.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.    
 ** message **   
A message that describes the error.  
 ** resourceId **   
The ID of the resource that was not found.  
 ** resourceType **   
The type of the resource that wasn't found.  
Valid values:  
+  `agent-context` - An agent context.
+  `connection` - A connection.
+  `curation-policy` - A curation policy.
+  `evaluation` - Reserved for future use.
+  `ontology` - An ontology.
+  `ontology-induction` - An ontology induction.
+  `resource-policy` - A resource-based policy.
HTTP Status Code: 404

 ** ThrottlingException **   
The request was denied because it exceeded a request rate quota. Wait, then retry the request.    
 ** message **   
A message that describes the error.  
 ** quotaCode **   
The code of the quota that throttled the request.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request, if AWS Context provides one.  
 ** serviceCode **   
The code of the service whose quota throttled the request.
HTTP Status Code: 429

 ** ValidationException **   
The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.    
 ** fieldList **   
The fields that failed validation, each with a message that describes why.  
 ** message **   
A message that describes the error.  
 ** reason **   
The reason that the input failed validation. Valid values:  
+  `unknownOperation` - The operation isn't recognized.
+  `cannotParse` - The request couldn't be parsed.
+  `fieldValidationFailed` - One or more fields failed validation. `fieldList` describes them.
+  `other` - Another reason. `message` describes it.
HTTP Status Code: 400

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