> **Experimental**
>
> `@aws-cdk/aws-apprunner-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# GitHubConnection

Represents the App Runner connection that enables the App Runner service to connect to a source repository.

It's required for GitHub code repositories.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/service.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts#L904)

## Example

```ts
new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromGitHub({
    repositoryUrl: 'https://github.com/aws-containers/hello-app-runner',
    branch: 'main',
    configurationSource: apprunner.ConfigurationSourceType.REPOSITORY,
    connection: apprunner.GitHubConnection.fromConnectionArn('CONNECTION_ARN'),
  }),
});
```

## Initializer

```ts
new GitHubConnection(arn: string)
```

## Properties

- `connectionArn`: string (required) — The ARN of the Connection for App Runner service to connect to the repository.

## Methods

- `fromConnectionArn(arn: string): GitHubConnection // chainable` (static) — Using existing App Runner connection by specifying the connection ARN.

  **Parameters**

  - `arn` — connection ARN.

  **Returns:** Connection
