# AppProtocol

Service connect app protocol.

Obtainable from: AppProtocol.grpc, AppProtocol.http, AppProtocol.http2

- Source: [`aws-ecs/lib/container-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts#L1471)
- Type last changed: v2.52.0 · 27 Nov 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const appProtocol = ecs.AppProtocol.grpc;
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

app_protocol = ecs.AppProtocol.grpc
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

AppProtocol appProtocol = AppProtocol.getGrpc();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var appProtocol = AppProtocol.Grpc;
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

appProtocol := awscdk.Aws_ecs.AppProtocol_Grpc()
```

## Properties

- `grpc`: [AppProtocol](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.AppProtocol.html) (static) — GRPC app protocol.

- `http`: [AppProtocol](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.AppProtocol.html) (static) — HTTP app protocol.

- `http2`: [AppProtocol](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.AppProtocol.html) (static) — HTTP2 app protocol.

- `value`: string — Custom value.
