ApplicationProtocolVersion Enum
Load balancing protocol version for application load balancers.
| Source | aws-elasticloadbalancingv2/lib/shared/enums.ts |
|---|
Example
ts
declare const vpc: ec2.Vpc;
const tg = new elbv2.ApplicationTargetGroup(this, 'TG', {
targetType: elbv2.TargetType.IP,
port: 50051,
protocol: elbv2.ApplicationProtocol.HTTP,
protocolVersion: elbv2.ApplicationProtocolVersion.GRPC,
healthCheck: {
enabled: true,
healthyGrpcCodes: '0-99',
},
vpc,
});
python
# vpc: ec2.Vpc
tg = elbv2.ApplicationTargetGroup(self, "TG",
target_type=elbv2.TargetType.IP,
port=50051,
protocol=elbv2.ApplicationProtocol.HTTP,
protocol_version=elbv2.ApplicationProtocolVersion.GRPC,
health_check=elbv2.HealthCheck(
enabled=True,
healthy_grpc_codes="0-99"
),
vpc=vpc
)
java
Vpc vpc;
ApplicationTargetGroup tg = ApplicationTargetGroup.Builder.create(this, "TG")
.targetType(TargetType.IP)
.port(50051)
.protocol(ApplicationProtocol.HTTP)
.protocolVersion(ApplicationProtocolVersion.GRPC)
.healthCheck(HealthCheck.builder()
.enabled(true)
.healthyGrpcCodes("0-99")
.build())
.vpc(vpc)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;
var tg = new ApplicationTargetGroup(this, "TG", new ApplicationTargetGroupProps {
TargetType = TargetType.IP,
Port = 50051,
Protocol = ApplicationProtocol.HTTP,
ProtocolVersion = ApplicationProtocolVersion.GRPC,
HealthCheck = new HealthCheck {
Enabled = true,
HealthyGrpcCodes = "0-99"
},
Vpc = vpc
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc
tg := elbv2.NewApplicationTargetGroup(this, jsii.String("TG"), &ApplicationTargetGroupProps{
TargetType: elbv2.TargetType_IP,
Port: jsii.Number(50051),
Protocol: elbv2.ApplicationProtocol_HTTP,
ProtocolVersion: elbv2.ApplicationProtocolVersion_GRPC,
HealthCheck: &HealthCheck{
Enabled: jsii.Boolean(true),
HealthyGrpcCodes: jsii.String("0-99"),
},
Vpc: Vpc,
})
Members
| Member | Description |
|---|---|
GRPC | GRPC. |
HTTP1 | HTTP1. |
HTTP2 | HTTP2. |
Referenced by
AddApplicationTargetsProps.protocolVersionprotocol_versionprotocolVersionProtocolVersionProtocolVersionApplicationLoadBalancedServiceBaseProps.protocolVersionprotocol_versionprotocolVersionProtocolVersionProtocolVersionApplicationTargetGroupProps.protocolVersionprotocol_versionprotocolVersionProtocolVersionProtocolVersion