---
title: "POST /#X-Amz-Target=com.amazonaws.codestar.connections.CodeStar_connections_20191201.GetConnection"
method: POST
path: "/#X-Amz-Target=com.amazonaws.codestar.connections.CodeStar_connections_20191201.GetConnection"
---

# POST /#X-Amz-Target=com.amazonaws.codestar.connections.CodeStar_connections_20191201.GetConnection

`POST /#X-Amz-Target=com.amazonaws.codestar.connections.CodeStar_connections_20191201.GetConnection`

Returns the connection ARN and details such as status, owner, and provider type.

## Headers

- `X-Amz-Target` 'com.amazonaws.codestar.connections.CodeStar_connections_20191201.GetConnection', required

## Request body

- GetConnectionInput
  - `ConnectionArn` string, required — The Amazon Resource Name (ARN) of a connection.

## Response `200`

Success

- GetConnectionOutput
  - `Connection` object — The connection details, such as status, owner, and provider type.
    - `ConnectionName` string — The name of the connection. Connection names must be unique in an AWS user account.
    - `ConnectionArn` string — <p>The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.</p> <note> <p>The ARN is never reused if the connection is deleted.</p> </note>
    - `ProviderType` 'Bitbucket' | 'GitHub' | 'GitHubEnterpriseServer' — The name of the external provider where your third-party code repository is configured.
    - `OwnerAccountId` string — The identifier of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.
    - `ConnectionStatus` 'PENDING' | 'AVAILABLE' | 'ERROR' — The current status of the connection.
    - `HostArn` string — The Amazon Resource Name (ARN) of the host associated with the connection.

## Other responses

- `480` — ResourceNotFoundException
- `481` — ResourceUnavailableException

---

[API](https://skmtc.net/aws/apis/codestar-connections.md) · [All operations](https://skmtc.net/aws/apis/codestar-connections/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/codestar-connections/versions/4018814757c0/schema)
