API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see

We welcome your feedback on this new version of the documentation. Send your comments to


import ""

type DistributionSummary struct { ARN *string `type:"string" required:"true"` Aliases *Aliases `type:"structure" required:"true"` CacheBehaviors *CacheBehaviors `type:"structure" required:"true"` Comment *string `type:"string" required:"true"` CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"` DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` DomainName *string `type:"string" required:"true"` Enabled *bool `type:"boolean" required:"true"` HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"` Id *string `type:"string" required:"true"` IsIPV6Enabled *bool `type:"boolean" required:"true"` LastModifiedTime *time.Time `type:"timestamp" required:"true"` OriginGroups *OriginGroups `type:"structure"` Origins *Origins `type:"structure" required:"true"` PriceClass *string `type:"string" required:"true" enum:"PriceClass"` Restrictions *Restrictions `type:"structure" required:"true"` Status *string `type:"string" required:"true"` ViewerCertificate *ViewerCertificate `type:"structure" required:"true"` WebACLId *string `type:"string" required:"true"` }

A summary of the information about a CloudFront distribution.


Type: *string

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

ARN is a required field


A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.


A complex type that contains zero or more CacheBehavior elements.


Type: *string

The comment originally specified when this distribution was created.

Comment is a required field


A complex type that controls:

  • Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.

  • How long CloudFront caches HTTP status codes in the 4xx and 5xx range.

For more information about custom error pages, see Customizing Error Responses ( in the Amazon CloudFront Developer Guide.


A complex type that describes the default cache behavior if you don't specify a CacheBehavior element or if files don't match any of the values of PathPattern in CacheBehavior elements. You must create exactly one default cache behavior.


Type: *string

The domain name that corresponds to the distribution, for example,

DomainName is a required field


Type: *bool

Whether the distribution is enabled to accept user requests for content.

Enabled is a required field


Type: *string

Specify the maximum HTTP version that you want viewers to use to communicate with CloudFront. The default value for new web distributions is http2. Viewers that don't support HTTP/2 will automatically use an earlier version.

HttpVersion is a required field


Type: *string

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Id is a required field


Type: *bool

Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for your distribution.

IsIPV6Enabled is a required field


Type: *time.Time

The date and time the distribution was last modified.

LastModifiedTime is a required field


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


A complex type that contains information about origins and origin groups for this distribution.


Type: *string

A complex type that contains information about price class for this streaming distribution.

PriceClass is a required field


A complex type that identifies ways in which you want to restrict distribution of your content.


Type: *string

The current status of the distribution. When the status is Deployed, the distribution's information is propagated to all CloudFront edge locations.

Status is a required field


A complex type that specifies the following:

  • Whether you want viewers to use HTTP or HTTPS to request your objects.

  • If you want viewers to use HTTPS, whether you're using an alternate domain name such as or the CloudFront domain name for your distribution, such as

  • If you're using an alternate domain name, whether AWS Certificate Manager

(ACM) provided the certificate, or you purchased a certificate from a third-party certificate authority and imported it into ACM or uploaded it to the IAM certificate store.

You must specify only one of the following values:

  • ViewerCertificate$ACMCertificateArn

  • ViewerCertificate$IAMCertificateId

  • ViewerCertificate$CloudFrontDefaultCertificate

Don't specify false for CloudFrontDefaultCertificate.

If you want viewers to use HTTP instead of HTTPS to request your objects: Specify the following value:


In addition, specify allow-all for ViewerProtocolPolicy for all of your cache behaviors.

If you want viewers to use HTTPS to request your objects: Choose the type of certificate that you want to use based on whether you're using an alternate domain name for your objects or the CloudFront domain name:

  • If you're using an alternate domain name, such as Specify one of the following values, depending on whether ACM provided your certificate or you purchased your certificate from third-party certificate authority:

<ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where

ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate that you want to use for this distribution.

<IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate

ID is the ID that IAM returned when you added the certificate to the IAM certificate store.

If you specify ACMCertificateArn or IAMCertificateId, you must also specify

a value for SSLSupportMethod.

If you choose to use an ACM certificate or a certificate in the IAM certificate

store, we recommend that you use only an alternate domain name in your object URLs ( If you use the domain name that is associated with your CloudFront distribution (such as and the viewer supports SNI, then CloudFront behaves normally. However, if the browser does not support SNI, the user's experience depends on the value that you choose for SSLSupportMethod:

vip: The viewer displays a warning because there is a mismatch between the

CloudFront domain name and the domain name in your SSL/TLS certificate.

sni-only: CloudFront drops the connection with the browser without returning

the object.
  • If you're using the CloudFront domain name for your distribution, such as Specify the following value:


If you want viewers to use HTTPS, you must also specify one of the following values in your cache behaviors:

  • <ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>

  • <ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>

You can also optionally require that CloudFront use HTTPS to communicate with your origin by specifying one of the following values for the applicable origins:

  • <OriginProtocolPolicy>https-only<OriginProtocolPolicy>

  • <OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>

For more information, see Using Alternate Domain Names and HTTPS ( in the Amazon CloudFront Developer Guide.


Type: *string

The Web ACL Id (if any) associated with the distribution.

WebACLId is a required field



func (s DistributionSummary) GoString() string

GoString returns the string representation


func (s *DistributionSummary) SetARN(v string) *DistributionSummary

SetARN sets the ARN field's value.


func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary

SetAliases sets the Aliases field's value.


func (s *DistributionSummary) SetCacheBehaviors(v *CacheBehaviors) *DistributionSummary

SetCacheBehaviors sets the CacheBehaviors field's value.


func (s *DistributionSummary) SetComment(v string) *DistributionSummary

SetComment sets the Comment field's value.


func (s *DistributionSummary) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionSummary

SetCustomErrorResponses sets the CustomErrorResponses field's value.


func (s *DistributionSummary) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionSummary

SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value.


func (s *DistributionSummary) SetDomainName(v string) *DistributionSummary

SetDomainName sets the DomainName field's value.


func (s *DistributionSummary) SetEnabled(v bool) *DistributionSummary

SetEnabled sets the Enabled field's value.


func (s *DistributionSummary) SetHttpVersion(v string) *DistributionSummary

SetHttpVersion sets the HttpVersion field's value.


func (s *DistributionSummary) SetId(v string) *DistributionSummary

SetId sets the Id field's value.


func (s *DistributionSummary) SetIsIPV6Enabled(v bool) *DistributionSummary

SetIsIPV6Enabled sets the IsIPV6Enabled field's value.


func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSummary

SetLastModifiedTime sets the LastModifiedTime field's value.


func (s *DistributionSummary) SetOriginGroups(v *OriginGroups) *DistributionSummary

SetOriginGroups sets the OriginGroups field's value.


func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary

SetOrigins sets the Origins field's value.


func (s *DistributionSummary) SetPriceClass(v string) *DistributionSummary

SetPriceClass sets the PriceClass field's value.


func (s *DistributionSummary) SetRestrictions(v *Restrictions) *DistributionSummary

SetRestrictions sets the Restrictions field's value.


func (s *DistributionSummary) SetStatus(v string) *DistributionSummary

SetStatus sets the Status field's value.


func (s *DistributionSummary) SetViewerCertificate(v *ViewerCertificate) *DistributionSummary

SetViewerCertificate sets the ViewerCertificate field's value.


func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary

SetWebACLId sets the WebACLId field's value.


func (s DistributionSummary) String() string

String returns the string representation

On this page: