java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudfront.origins.OriginGroup
All Implemented Interfaces:
IOrigin, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:48.596Z") @Stability(Stable) public class OriginGroup extends software.amazon.jsii.JsiiObject implements IOrigin
An Origin that represents a group.

Consists of a primary Origin, and a fallback Origin called when the primary returns one of the provided HTTP status codes.

Example:

 Bucket myBucket = new Bucket(this, "myBucket");
 Distribution.Builder.create(this, "myDist")
         .defaultBehavior(BehaviorOptions.builder()
                 .origin(OriginGroup.Builder.create()
                         .primaryOrigin(new S3Origin(myBucket))
                         .fallbackOrigin(new HttpOrigin("www.example.com"))
                         // optional, defaults to: 500, 502, 503 and 504
                         .fallbackStatusCodes(List.of(404))
                         .build())
                 .build())
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for OriginGroup.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IOrigin

    IOrigin.Jsii$Default, IOrigin.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    OriginGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    OriginGroup(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(software.constructs.Construct scope, OriginBindOptions options)
    The method called when a given Origin is added (for the first time) to a Distribution.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • OriginGroup

      protected OriginGroup(software.amazon.jsii.JsiiObjectRef objRef)
    • OriginGroup

      protected OriginGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • OriginGroup

      @Stability(Stable) public OriginGroup(@NotNull OriginGroupProps props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public OriginBindConfig bind(@NotNull software.constructs.Construct scope, @NotNull OriginBindOptions options)
      The method called when a given Origin is added (for the first time) to a Distribution.

      Specified by:
      bind in interface IOrigin
      Parameters:
      scope - This parameter is required.
      options - This parameter is required.