Class HttpOrigin
An Origin for an HTTP server or S3 bucket configured for website hosting.
Implements
Namespace: Amazon.CDK.AWS.CloudFront.Origins
Assembly: Amazon.CDK.AWS.CloudFront.Origins.dll
Syntax (csharp)
public class HttpOrigin : OriginBase, IOrigin
Syntax (vb)
Public Class HttpOrigin
Inherits OriginBase
Implements IOrigin
Remarks
ExampleMetadata: infused
Examples
var myBucket = new Bucket(this, "myBucket");
new Distribution(this, "myDist", new DistributionProps {
DefaultBehavior = new BehaviorOptions {
Origin = new OriginGroup(new OriginGroupProps {
PrimaryOrigin = new S3Origin(myBucket),
FallbackOrigin = new HttpOrigin("www.example.com"),
// optional, defaults to: 500, 502, 503 and 504
FallbackStatusCodes = new [] { 404 }
})
}
});
Synopsis
Constructors
HttpOrigin(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpOrigin(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
HttpOrigin(String, IHttpOriginProps) |
Methods
RenderCustomOriginConfig() |
Constructors
HttpOrigin(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpOrigin(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpOrigin(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpOrigin(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
HttpOrigin(String, IHttpOriginProps)
public HttpOrigin(string domainName, IHttpOriginProps props = null)
Parameters
- domainName System.String
- props IHttpOriginProps
Methods
RenderCustomOriginConfig()
protected override CfnDistribution.ICustomOriginConfigProperty RenderCustomOriginConfig()
Returns
CfnDistribution.ICustomOriginConfigProperty