Class OriginGroup
An Origin that represents a group.
Inheritance
System.Object
OriginGroup
Implements
Namespace: Amazon.CDK.AWS.CloudFront.Origins
Assembly: Amazon.CDK.AWS.CloudFront.Origins.dll
Syntax (csharp)
public class OriginGroup : DeputyBase, IOrigin
Syntax (vb)
Public Class OriginGroup
Inherits DeputyBase
Implements IOrigin
Remarks
Consists of a primary Origin, and a fallback Origin called when the primary returns one of the provided HTTP status codes.
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
OriginGroup(IOriginGroupProps) | |
OriginGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
OriginGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IOriginBindOptions) | The method called when a given Origin is added (for the first time) to a Distribution. |
Constructors
OriginGroup(IOriginGroupProps)
OriginGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected OriginGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
OriginGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected OriginGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IOriginBindOptions)
The method called when a given Origin is added (for the first time) to a Distribution.
public virtual IOriginBindConfig Bind(Construct scope, IOriginBindOptions options)
Parameters
- scope Construct
- options IOriginBindOptions
Returns