Class: AWSCDK::CloudFront::CfnDistribution::GrpcConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/cfn_distribution.rb

Overview

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 .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled:) ⇒ GrpcConfigProperty

Returns a new instance of GrpcConfigProperty.

Parameters:

  • enabled (Boolean, AWSCDK::IResolvable)

    Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.



2206
2207
2208
2209
# File 'cloud_front/cfn_distribution.rb', line 2206

def initialize(enabled:)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled")
end

Instance Attribute Details

#enabledBoolean, AWSCDK::IResolvable (readonly)

Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.



2215
2216
2217
# File 'cloud_front/cfn_distribution.rb', line 2215

def enabled
  @enabled
end

Class Method Details

.jsii_propertiesObject



2217
2218
2219
2220
2221
# File 'cloud_front/cfn_distribution.rb', line 2217

def self.jsii_properties
  {
    :enabled => "enabled",
  }
end

Instance Method Details

#to_jsiiObject



2223
2224
2225
2226
2227
2228
2229
# File 'cloud_front/cfn_distribution.rb', line 2223

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
  })
  result.compact
end