GrpcConfigProperty Struct
Amazon CloudFront supports gRPC, an open-source remote procedure call (RPC) framework built on HTTP/2.
gRPC offers bi-directional streaming and binary protocol that buffers payloads, making it suitable for applications that require low latency communications.
To enable your distribution to handle gRPC requests, you must include HTTP/2 as one of the supported HTTP versions and allow HTTP methods, including POST .
For more information, see Using gRPC with CloudFront distributions in the Amazon CloudFront Developer Guide .
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const grpcConfigProperty: cloudfront.CfnDistribution.GrpcConfigProperty = {
enabled: false,
};
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_cloudfront as cloudfront
grpc_config_property = cloudfront.CfnDistribution.GrpcConfigProperty(
enabled=False
)
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.cloudfront.*;
GrpcConfigProperty grpcConfigProperty = GrpcConfigProperty.builder()
.enabled(false)
.build();
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.CloudFront;
var grpcConfigProperty = new GrpcConfigProperty {
Enabled = false
};
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"
grpcConfigProperty := &GrpcConfigProperty{
Enabled: jsii.Boolean(false),
}
Properties
enabledboolean | IResolvableenabledtyping.Union[bool, IResolvable]enabledBooleanEnabledboolEnabledinterface{}required#Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.