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

The code runtimes.

Obtainable from: Runtime.CORRETTO_11, Runtime.CORRETTO_8, Runtime.DOTNET_6, Runtime.GO_1, Runtime.NODEJS_12, Runtime.NODEJS_14, Runtime.NODEJS_16, Runtime.NODEJS_18, Runtime.NODEJS_22, Runtime.PHP_81, Runtime.PYTHON_3, Runtime.PYTHON_311, Runtime.RUBY_31, Runtime.of

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

## Example

TypeScript:

```ts
new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromGitHub({
    repositoryUrl: 'https://github.com/aws-containers/hello-app-runner',
    branch: 'main',
    configurationSource: apprunner.ConfigurationSourceType.API,
    codeConfigurationValues: {
      runtime: apprunner.Runtime.PYTHON_3,
      port: '8000',
      startCommand: 'python app.py',
      buildCommand: 'yum install -y pycairo && pip install -r requirements.txt',
    },
    connection: apprunner.GitHubConnection.fromConnectionArn('CONNECTION_ARN'),
  }),
});
```

Python:

```python
apprunner.Service(self, "Service",
    source=apprunner.Source.from_git_hub(
        repository_url="https://github.com/aws-containers/hello-app-runner",
        branch="main",
        configuration_source=apprunner.ConfigurationSourceType.API,
        code_configuration_values=apprunner.CodeConfigurationValues(
            runtime=apprunner.Runtime.PYTHON_3,
            port="8000",
            start_command="python app.py",
            build_command="yum install -y pycairo && pip install -r requirements.txt"
        ),
        connection=apprunner.GitHubConnection.from_connection_arn("CONNECTION_ARN")
    )
)
```

Java:

```java
Service.Builder.create(this, "Service")
        .source(Source.fromGitHub(GithubRepositoryProps.builder()
                .repositoryUrl("https://github.com/aws-containers/hello-app-runner")
                .branch("main")
                .configurationSource(ConfigurationSourceType.API)
                .codeConfigurationValues(CodeConfigurationValues.builder()
                        .runtime(Runtime.PYTHON_3)
                        .port("8000")
                        .startCommand("python app.py")
                        .buildCommand("yum install -y pycairo && pip install -r requirements.txt")
                        .build())
                .connection(GitHubConnection.fromConnectionArn("CONNECTION_ARN"))
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.AppRunner.Alpha
new Service(this, "Service", new ServiceProps {
    Source = Source.FromGitHub(new GithubRepositoryProps {
        RepositoryUrl = "https://github.com/aws-containers/hello-app-runner",
        Branch = "main",
        ConfigurationSource = ConfigurationSourceType.API,
        CodeConfigurationValues = new CodeConfigurationValues {
            Runtime = Runtime.PYTHON_3,
            Port = "8000",
            StartCommand = "python app.py",
            BuildCommand = "yum install -y pycairo && pip install -r requirements.txt"
        },
        Connection = GitHubConnection.FromConnectionArn("CONNECTION_ARN")
    })
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2
apprunner.NewService(this, jsii.String("Service"), &ServiceProps{
	Source: apprunner.Source_FromGitHub(&GithubRepositoryProps{
		RepositoryUrl: jsii.String("https://github.com/aws-containers/hello-app-runner"),
		Branch: jsii.String("main"),
		ConfigurationSource: apprunner.ConfigurationSourceType_API,
		CodeConfigurationValues: &CodeConfigurationValues{
			Runtime: apprunner.Runtime_PYTHON_3(),
			Port: jsii.String("8000"),
			StartCommand: jsii.String("python app.py"),
			BuildCommand: jsii.String("yum install -y pycairo && pip install -r requirements.txt"),
		},
		Connection: apprunner.GitHubConnection_FromConnectionArn(jsii.String("CONNECTION_ARN")),
	}),
})
```

## Properties

- `CORRETTO_11`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — CORRETTO 11.

- `CORRETTO_8`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — CORRETTO 8.

- `DOTNET_6`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — .NET 6.

- `GO_1`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — Go 1.18.

- `name`: string — The runtime name.

- `NODEJS_12`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — NodeJS 12.

- `NODEJS_14`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — NodeJS 14.

- `NODEJS_16`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — NodeJS 16.

- `NODEJS_18`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — NodeJS 18.

- `NODEJS_22`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — NodeJS 22.

- `PHP_81`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — PHP 8.1.

- `PYTHON_3`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — Python 3.

- `PYTHON_311`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — Python 3.11.

- `RUBY_31`: [Runtime](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-apprunner-alpha.Runtime.html) (static) — Ruby 3.1.

## Methods

- `of(name: string): Runtime // chainable` (static) — Other runtimes.

  **Parameters**

  - `name` — runtime name.
