Skip to content
v2.278.0

OriginGroupsProperty Struct ​

A complex data type for the origin groups specified for a distribution.

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 originGroupsProperty: cloudfront.CfnDistribution.OriginGroupsProperty = {
  quantity: 123,

  // the properties below are optional
  items: [{
    failoverCriteria: {
      statusCodes: {
        items: [123],
        quantity: 123,
      },
    },
    id: 'id',
    members: {
      items: [{
        originId: 'originId',
      }],
      quantity: 123,
    },

    // the properties below are optional
    selectionCriteria: 'selectionCriteria',
  }],
};
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

origin_groups_property = cloudfront.CfnDistribution.OriginGroupsProperty(
    quantity=123,

    # the properties below are optional
    items=[cloudfront.CfnDistribution.OriginGroupProperty(
        failover_criteria=cloudfront.CfnDistribution.OriginGroupFailoverCriteriaProperty(
            status_codes=cloudfront.CfnDistribution.StatusCodesProperty(
                items=[123],
                quantity=123
            )
        ),
        id="id",
        members=cloudfront.CfnDistribution.OriginGroupMembersProperty(
            items=[cloudfront.CfnDistribution.OriginGroupMemberProperty(
                origin_id="originId"
            )],
            quantity=123
        ),

        # the properties below are optional
        selection_criteria="selectionCriteria"
    )]
)
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.*;

OriginGroupsProperty originGroupsProperty = OriginGroupsProperty.builder()
        .quantity(123)

        // the properties below are optional
        .items(List.of(OriginGroupProperty.builder()
                .failoverCriteria(OriginGroupFailoverCriteriaProperty.builder()
                        .statusCodes(StatusCodesProperty.builder()
                                .items(List.of(123))
                                .quantity(123)
                                .build())
                        .build())
                .id("id")
                .members(OriginGroupMembersProperty.builder()
                        .items(List.of(OriginGroupMemberProperty.builder()
                                .originId("originId")
                                .build()))
                        .quantity(123)
                        .build())

                // the properties below are optional
                .selectionCriteria("selectionCriteria")
                .build()))
        .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 originGroupsProperty = new OriginGroupsProperty {
    Quantity = 123,

    // the properties below are optional
    Items = new [] { new OriginGroupProperty {
        FailoverCriteria = new OriginGroupFailoverCriteriaProperty {
            StatusCodes = new StatusCodesProperty {
                Items = new [] { 123 },
                Quantity = 123
            }
        },
        Id = "id",
        Members = new OriginGroupMembersProperty {
            Items = new [] { new OriginGroupMemberProperty {
                OriginId = "originId"
            } },
            Quantity = 123
        },

        // the properties below are optional
        SelectionCriteria = "selectionCriteria"
    } }
};
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"

originGroupsProperty := &OriginGroupsProperty{
	Quantity: jsii.Number(123),

	// the properties below are optional
	Items: []interface{}{
		&OriginGroupProperty{
			FailoverCriteria: &OriginGroupFailoverCriteriaProperty{
				StatusCodes: &StatusCodesProperty{
					Items: []interface{}{
						jsii.Number(123),
					},
					Quantity: jsii.Number(123),
				},
			},
			Id: jsii.String("id"),
			Members: &OriginGroupMembersProperty{
				Items: []interface{}{
					&OriginGroupMemberProperty{
						OriginId: jsii.String("originId"),
					},
				},
				Quantity: jsii.Number(123),
			},

			// the properties below are optional
			SelectionCriteria: jsii.String("selectionCriteria"),
		},
	},
}

Properties ​

itemsoptionalIResolvable | IResolvable | CfnDistribution.OriginGroupProperty[]itemsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, OriginGroupProperty]]]itemsoptionalIResolvableItemsoptionalIResolvableItemsoptionalinterface{} #
The items (origin groups) in a distribution.
quantitynumberquantityint | floatquantityNumberQuantitydoubleQuantity*float64 required #
The number of origin groups.