Documentation
¶
Overview ¶
Package cloudfront provides emulation of Amazon CloudFront (CDN).
Implemented: Distribution CRUD, Invalidations, Tagging, CreateDistributionWithTags, OAC CRUD, Cache Policy CRUD, Origin Request Policy CRUD, Response Headers Policy CRUD, Legacy OAI CRUD, Continuous Deployment Policy CRUD, staging distribution routing, CloudFront Functions execution (viewer-request/viewer-response via goja).
Index ¶
- type ActiveTrustedList
- type AllowedMethods
- type CDPConfig
- type CDPSingleHeaderConfig
- type CDPSingleWeightConfig
- type CDPTrafficConfig
- type CacheBehavior
- type CacheBehaviors
- type CachePolicy
- type CachePolicyConfig
- type CachePolicyCookiesConfig
- type CachePolicyHeadersConfig
- type CachePolicyList
- type CachePolicyQueryStringsConfig
- type CachePolicySummary
- type CacheTagConfig
- type CloudFrontFunction
- type CloudFrontOriginAccessIdentity
- type CloudFrontOriginAccessIdentityConfig
- type CloudFrontOriginAccessIdentityList
- type CloudFrontOriginAccessIdentitySummary
- type ContentSecurityPolicy
- type ContentTypeOptions
- type ContinuousDeploymentPolicy
- type CookiePreference
- type CorsConfig
- type CustomErrorResponse
- type CustomErrorResponses
- type CustomHeaders
- type CustomOriginConfig
- type DefaultCacheBehavior
- type Distribution
- type DistributionConfig
- type DistributionConfigWithTags
- type DistributionList
- type DistributionSummary
- type EndPoint
- type FLEConfig
- type FLEConfigData
- type FLEProfile
- type FLEProfileData
- type ForwardedValues
- type FrameOptions
- type FunctionAssociation
- type FunctionAssociations
- type FunctionConfig
- type FunctionMetadata
- type GeoRestriction
- type Handler
- func (h *Handler) CreateCachePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateDistribution(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateDistributionWithTags(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateFieldLevelEncryptionConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateInvalidation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateKeyGroup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateMonitoringSubscription(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateOriginAccessControl(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreatePublicKey(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteCachePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteDistribution(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteFieldLevelEncryption(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteKeyGroup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteMonitoringSubscription(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteOriginAccessControl(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeletePublicKey(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DescribeFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetCachePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetCachePolicyConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetCloudFrontOriginAccessIdentityConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetContinuousDeploymentPolicyConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetDistribution(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetDistributionConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetFieldLevelEncryption(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetFieldLevelEncryptionConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetFieldLevelEncryptionProfileConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetInvalidation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetKeyGroup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetKeyGroupConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetMonitoringSubscription(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetOriginAccessControl(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetOriginRequestPolicyConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPublicKey(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPublicKeyConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetResponseHeadersPolicyConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListCachePolicies(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListCloudFrontOriginAccessIdentities(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListContinuousDeploymentPolicies(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListDistributions(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListFieldLevelEncryptionConfigs(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListFieldLevelEncryptionProfiles(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListFunctions(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListInvalidations(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListKeyGroups(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListOriginAccessControls(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListOriginRequestPolicies(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListPublicKeys(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListRealtimeLogConfigs(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListResponseHeadersPolicies(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListTagsForResource(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ProxyRequest(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PublishFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) TagResource(w http.ResponseWriter, r *http.Request)
- func (h *Handler) TestFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UntagResource(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateCachePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateDistribution(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateFieldLevelEncryptionConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateFunction(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateKeyGroup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateOriginAccessControl(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdatePublicKey(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
- type Invalidation
- type InvalidationBatch
- type InvalidationList
- type InvalidationSummary
- type KeyGroup
- type KeyGroupConfig
- type KinesisStreamConfig
- type LambdaFunctionAssociation
- type LambdaFunctionAssociations
- type LoggingConfig
- type MonitoringSubscription
- type Origin
- type OriginAccessControl
- type OriginAccessControlConfig
- type OriginAccessControlList
- type OriginAccessControlSummary
- type OriginCustomHeader
- type OriginGroup
- type OriginGroupFailover
- type OriginGroupMember
- type OriginGroupMembers
- type OriginGroupStatusCodes
- type OriginGroups
- type OriginRequestPolicy
- type OriginRequestPolicyConfig
- type OriginRequestPolicyList
- type OriginRequestPolicySummary
- type OriginShield
- type Origins
- type ParametersInCacheKeyAndForwardedToOrigin
- type Paths
- type PublicKey
- type PublicKeyConfig
- type RealtimeLogConfig
- type RealtimeMetricsConfig
- type ReferrerPolicy
- type ResponseCustomHeader
- type ResponseCustomHeadersConfig
- type ResponseHeadersPolicy
- type ResponseHeadersPolicyConfig
- type ResponseHeadersPolicyList
- type ResponseHeadersPolicySummary
- type Restrictions
- type S3OriginConfig
- type SecurityHeadersConfig
- type Service
- type StagingDNSNames
- type Store
- func (st *Store) DeleteAllInvalidations(ctx context.Context, distID string) error
- func (st *Store) DeleteCachePolicy(ctx context.Context, id string) error
- func (st *Store) DeleteContinuousDeploymentPolicy(ctx context.Context, id string) error
- func (st *Store) DeleteDistribution(ctx context.Context, id string) error
- func (st *Store) DeleteFLEConfig(ctx context.Context, id string) error
- func (st *Store) DeleteFLEProfile(ctx context.Context, id string) error
- func (st *Store) DeleteFunction(ctx context.Context, name string) error
- func (st *Store) DeleteKeyGroup(ctx context.Context, id string) error
- func (st *Store) DeleteMonitoringSubscription(ctx context.Context, distID string) error
- func (st *Store) DeleteOAC(ctx context.Context, id string) error
- func (st *Store) DeleteOAI(ctx context.Context, id string) error
- func (st *Store) DeleteOriginRequestPolicy(ctx context.Context, id string) error
- func (st *Store) DeletePublicKey(ctx context.Context, id string) error
- func (st *Store) DeleteRealtimeLogConfig(ctx context.Context, name string) error
- func (st *Store) DeleteResponseHeadersPolicy(ctx context.Context, id string) error
- func (st *Store) DeleteTags(ctx context.Context, arn string) error
- func (st *Store) FindByCallerRef(ctx context.Context, callerRef string) (*Distribution, error)
- func (st *Store) GetCachePolicy(ctx context.Context, id string) (*CachePolicy, error)
- func (st *Store) GetContinuousDeploymentPolicy(ctx context.Context, id string) (*ContinuousDeploymentPolicy, error)
- func (st *Store) GetDistribution(ctx context.Context, id string) (*Distribution, error)
- func (st *Store) GetFLEConfig(ctx context.Context, id string) (*FLEConfig, error)
- func (st *Store) GetFLEProfile(ctx context.Context, id string) (*FLEProfile, error)
- func (st *Store) GetFunction(ctx context.Context, name string) (*CloudFrontFunction, error)
- func (st *Store) GetFunctionByARN(ctx context.Context, arn string) (*CloudFrontFunction, error)
- func (st *Store) GetInvalidation(ctx context.Context, distID, invID string) (*Invalidation, error)
- func (st *Store) GetKeyGroup(ctx context.Context, id string) (*KeyGroup, error)
- func (st *Store) GetMonitoringSubscription(ctx context.Context, distID string) (*MonitoringSubscription, error)
- func (st *Store) GetOAC(ctx context.Context, id string) (*OriginAccessControl, error)
- func (st *Store) GetOAI(ctx context.Context, id string) (*CloudFrontOriginAccessIdentity, error)
- func (st *Store) GetOriginRequestPolicy(ctx context.Context, id string) (*OriginRequestPolicy, error)
- func (st *Store) GetPublicKey(ctx context.Context, id string) (*PublicKey, error)
- func (st *Store) GetRealtimeLogConfig(ctx context.Context, name string) (*RealtimeLogConfig, error)
- func (st *Store) GetResponseHeadersPolicy(ctx context.Context, id string) (*ResponseHeadersPolicy, error)
- func (st *Store) GetTags(ctx context.Context, arn string) (*Tags, error)
- func (st *Store) ListCachePolicies(ctx context.Context) ([]*CachePolicy, error)
- func (st *Store) ListContinuousDeploymentPolicies(ctx context.Context) ([]*ContinuousDeploymentPolicy, error)
- func (st *Store) ListDistributions(ctx context.Context) ([]*Distribution, error)
- func (st *Store) ListFLEConfigs(ctx context.Context) ([]*FLEConfig, error)
- func (st *Store) ListFLEProfiles(ctx context.Context) ([]*FLEProfile, error)
- func (st *Store) ListFunctions(ctx context.Context) ([]*CloudFrontFunction, error)
- func (st *Store) ListInvalidations(ctx context.Context, distID string) ([]*Invalidation, error)
- func (st *Store) ListKeyGroups(ctx context.Context) ([]*KeyGroup, error)
- func (st *Store) ListOACs(ctx context.Context) ([]*OriginAccessControl, error)
- func (st *Store) ListOAIs(ctx context.Context) ([]*CloudFrontOriginAccessIdentity, error)
- func (st *Store) ListOriginRequestPolicies(ctx context.Context) ([]*OriginRequestPolicy, error)
- func (st *Store) ListPublicKeys(ctx context.Context) ([]*PublicKey, error)
- func (st *Store) ListRealtimeLogConfigs(ctx context.Context) ([]*RealtimeLogConfig, error)
- func (st *Store) ListResponseHeadersPolicies(ctx context.Context) ([]*ResponseHeadersPolicy, error)
- func (st *Store) PutCachePolicy(ctx context.Context, cp *CachePolicy) error
- func (st *Store) PutContinuousDeploymentPolicy(ctx context.Context, p *ContinuousDeploymentPolicy) error
- func (st *Store) PutDistribution(ctx context.Context, d *Distribution) error
- func (st *Store) PutFLEConfig(ctx context.Context, c *FLEConfig) error
- func (st *Store) PutFLEProfile(ctx context.Context, p *FLEProfile) error
- func (st *Store) PutFunction(ctx context.Context, f *CloudFrontFunction) error
- func (st *Store) PutInvalidation(ctx context.Context, distID string, inv *Invalidation) error
- func (st *Store) PutKeyGroup(ctx context.Context, kg *KeyGroup) error
- func (st *Store) PutMonitoringSubscription(ctx context.Context, distID string, ms *MonitoringSubscription) error
- func (st *Store) PutOAC(ctx context.Context, oac *OriginAccessControl) error
- func (st *Store) PutOAI(ctx context.Context, oai *CloudFrontOriginAccessIdentity) error
- func (st *Store) PutOriginRequestPolicy(ctx context.Context, p *OriginRequestPolicy) error
- func (st *Store) PutPublicKey(ctx context.Context, pk *PublicKey) error
- func (st *Store) PutRealtimeLogConfig(ctx context.Context, rlc *RealtimeLogConfig) error
- func (st *Store) PutResponseHeadersPolicy(ctx context.Context, p *ResponseHeadersPolicy) error
- func (st *Store) PutTags(ctx context.Context, arn string, tags *Tags) error
- type StrictTransportSecurity
- type StringList
- type Tag
- type TagKeys
- type Tagging
- type Tags
- type TrustedEntities
- type ViewerCertificate
- type XSSProtection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveTrustedList ¶
type ActiveTrustedList struct {
Enabled bool `xml:"Enabled" json:"enabled"`
Quantity int `xml:"Quantity" json:"quantity"`
}
ActiveTrustedList represents ActiveTrustedSigners / ActiveTrustedKeyGroups.
type AllowedMethods ¶
type AllowedMethods struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []string `xml:"Items>Method" json:"items"`
CachedMethods *StringList `xml:"CachedMethods,omitempty" json:"cached_methods,omitempty"`
}
AllowedMethods lists the HTTP methods the distribution accepts.
type CDPConfig ¶
type CDPConfig struct {
StagingDistributionDnsNames StagingDNSNames `xml:"StagingDistributionDnsNames" json:"staging_dns_names"`
Enabled bool `xml:"Enabled" json:"enabled"`
TrafficConfig *CDPTrafficConfig `xml:"TrafficConfig,omitempty" json:"traffic_config,omitempty"`
}
CDPConfig holds the configuration for a continuous deployment policy.
type CDPSingleHeaderConfig ¶
type CDPSingleHeaderConfig struct {
Header string `xml:"Header" json:"header"`
Value string `xml:"Value" json:"value"`
}
CDPSingleHeaderConfig routes traffic based on the presence of a specific header value.
type CDPSingleWeightConfig ¶
type CDPSingleWeightConfig struct {
Weight float64 `xml:"Weight" json:"weight"`
}
CDPSingleWeightConfig routes a fraction of traffic by random sampling.
type CDPTrafficConfig ¶
type CDPTrafficConfig struct {
Type string `xml:"Type" json:"type"`
SingleWeightConfig *CDPSingleWeightConfig `xml:"SingleWeightConfig,omitempty" json:"single_weight_config,omitempty"`
SingleHeaderConfig *CDPSingleHeaderConfig `xml:"SingleHeaderConfig,omitempty" json:"single_header_config,omitempty"`
}
CDPTrafficConfig defines how traffic is split between primary and staging.
type CacheBehavior ¶
type CacheBehavior struct {
PathPattern string `xml:"PathPattern" json:"path_pattern"`
TargetOriginId string `xml:"TargetOriginId" json:"target_origin_id"`
ViewerProtocolPolicy string `xml:"ViewerProtocolPolicy" json:"viewer_protocol_policy"`
AllowedMethods *AllowedMethods `xml:"AllowedMethods,omitempty" json:"allowed_methods,omitempty"`
ForwardedValues *ForwardedValues `xml:"ForwardedValues,omitempty" json:"forwarded_values,omitempty"`
MinTTL *int64 `xml:"MinTTL,omitempty" json:"min_ttl,omitempty"`
DefaultTTL *int64 `xml:"DefaultTTL,omitempty" json:"default_ttl,omitempty"`
MaxTTL *int64 `xml:"MaxTTL,omitempty" json:"max_ttl,omitempty"`
Compress *bool `xml:"Compress,omitempty" json:"compress,omitempty"`
SmoothStreaming *bool `xml:"SmoothStreaming,omitempty" json:"smooth_streaming,omitempty"`
CachePolicyId string `xml:"CachePolicyId,omitempty" json:"cache_policy_id,omitempty"`
OriginRequestPolicyId string `xml:"OriginRequestPolicyId,omitempty" json:"origin_request_policy_id,omitempty"`
ResponseHeadersPolicyId string `xml:"ResponseHeadersPolicyId,omitempty" json:"response_headers_policy_id,omitempty"`
FieldLevelEncryptionId string `xml:"FieldLevelEncryptionId,omitempty" json:"field_level_encryption_id,omitempty"`
RealtimeLogConfigArn string `xml:"RealtimeLogConfigArn,omitempty" json:"realtime_log_config_arn,omitempty"`
TrustedSigners *TrustedEntities `xml:"TrustedSigners,omitempty" json:"trusted_signers,omitempty"`
TrustedKeyGroups *TrustedEntities `xml:"TrustedKeyGroups,omitempty" json:"trusted_key_groups,omitempty"`
LambdaFunctionAssociations *LambdaFunctionAssociations `xml:"LambdaFunctionAssociations,omitempty" json:"lambda_function_associations,omitempty"`
FunctionAssociations *FunctionAssociations `xml:"FunctionAssociations,omitempty" json:"function_associations,omitempty"`
}
CacheBehavior is a path-pattern-specific behaviour. It includes all fields from DefaultCacheBehavior plus a PathPattern for matching.
type CacheBehaviors ¶
type CacheBehaviors struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []CacheBehavior `xml:"Items>CacheBehavior,omitempty" json:"items,omitempty"`
}
CacheBehaviors holds path-pattern-specific cache behaviours.
type CachePolicy ¶
type CachePolicy struct {
XMLName xml.Name `xml:"CachePolicy" json:"-"`
ID string `xml:"Id" json:"id"`
LastModifiedTime time.Time `xml:"LastModifiedTime" json:"last_modified_time"`
CachePolicyConfig CachePolicyConfig `xml:"CachePolicyConfig" json:"cache_policy_config"`
Version int `xml:"-" json:"version"`
}
CachePolicy represents a managed cache policy.
type CachePolicyConfig ¶
type CachePolicyConfig struct {
Name string `xml:"Name" json:"name"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
DefaultTTL *int64 `xml:"DefaultTTL,omitempty" json:"default_ttl,omitempty"`
MaxTTL *int64 `xml:"MaxTTL,omitempty" json:"max_ttl,omitempty"`
MinTTL int64 `xml:"MinTTL" json:"min_ttl"`
ParametersInCacheKeyAndForwardedToOrigin *ParametersInCacheKeyAndForwardedToOrigin `xml:"ParametersInCacheKeyAndForwardedToOrigin,omitempty" json:"parameters,omitempty"`
}
CachePolicyConfig holds the configuration for a cache policy.
type CachePolicyCookiesConfig ¶
type CachePolicyCookiesConfig struct {
CookieBehavior string `xml:"CookieBehavior" json:"cookie_behavior"` // none | whitelist | allExcept | all
Cookies *StringList `xml:"Cookies,omitempty" json:"cookies,omitempty"`
}
CachePolicyCookiesConfig controls cookie inclusion in the cache key.
type CachePolicyHeadersConfig ¶
type CachePolicyHeadersConfig struct {
HeaderBehavior string `xml:"HeaderBehavior" json:"header_behavior"` // none | whitelist
Headers *StringList `xml:"Headers,omitempty" json:"headers,omitempty"`
}
CachePolicyHeadersConfig controls header inclusion in the cache key.
type CachePolicyList ¶
type CachePolicyList struct {
XMLName xml.Name `xml:"CachePolicyList" json:"-"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []CachePolicySummary `xml:"Items>CachePolicySummary,omitempty" json:"items,omitempty"`
}
CachePolicyList is the response envelope for ListCachePolicies.
type CachePolicyQueryStringsConfig ¶
type CachePolicyQueryStringsConfig struct {
QueryStringBehavior string `xml:"QueryStringBehavior" json:"query_string_behavior"` // none | whitelist | allExcept | all
QueryStrings *StringList `xml:"QueryStrings,omitempty" json:"query_strings,omitempty"`
}
CachePolicyQueryStringsConfig controls query string inclusion in the cache key.
type CachePolicySummary ¶
type CachePolicySummary struct {
Type string `xml:"Type" json:"type"` // managed | custom
CachePolicy CachePolicy `xml:"CachePolicy" json:"cache_policy"`
}
CachePolicySummary is the per-item element within a CachePolicyList.
type CacheTagConfig ¶
type CacheTagConfig struct {
HeaderName string `xml:"HeaderName" json:"header_name"`
}
CacheTagConfig configures which origin response header to use as the source of cache tags for tag-based invalidation.
type CloudFrontFunction ¶
type CloudFrontFunction struct {
Name string `json:"name"`
Status string `json:"status"` // UNPUBLISHED | UNASSOCIATED | DEPLOYED
Stage string `json:"stage"` // DEVELOPMENT | LIVE
FunctionConfig FunctionConfig `json:"function_config"`
FunctionMetadata FunctionMetadata `json:"function_metadata"`
FunctionCode string `json:"function_code"` // base64-encoded source
Version int `json:"version"`
}
CloudFrontFunction represents a CF Functions resource.
type CloudFrontOriginAccessIdentity ¶
type CloudFrontOriginAccessIdentity struct {
XMLName xml.Name `xml:"CloudFrontOriginAccessIdentity" json:"-"`
ID string `xml:"Id" json:"id"`
S3CanonicalUserId string `xml:"S3CanonicalUserId" json:"s3_canonical_user_id"`
CloudFrontOriginAccessIdentityConfig CloudFrontOriginAccessIdentityConfig `xml:"CloudFrontOriginAccessIdentityConfig" json:"config"`
Version int `xml:"-" json:"version"`
}
CloudFrontOriginAccessIdentity represents a legacy OAI.
type CloudFrontOriginAccessIdentityConfig ¶
type CloudFrontOriginAccessIdentityConfig struct {
CallerReference string `xml:"CallerReference" json:"caller_reference"`
Comment string `xml:"Comment" json:"comment"`
}
CloudFrontOriginAccessIdentityConfig holds the OAI config.
type CloudFrontOriginAccessIdentityList ¶
type CloudFrontOriginAccessIdentityList struct {
XMLName xml.Name `xml:"CloudFrontOriginAccessIdentityList" json:"-"`
Marker string `xml:"Marker" json:"marker"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
IsTruncated bool `xml:"IsTruncated" json:"is_truncated"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []CloudFrontOriginAccessIdentitySummary `xml:"Items>CloudFrontOriginAccessIdentitySummary,omitempty" json:"items,omitempty"`
}
CloudFrontOriginAccessIdentityList is the response envelope for ListCloudFrontOriginAccessIdentities.
type CloudFrontOriginAccessIdentitySummary ¶
type CloudFrontOriginAccessIdentitySummary struct {
ID string `xml:"Id" json:"id"`
S3CanonicalUserId string `xml:"S3CanonicalUserId" json:"s3_canonical_user_id"`
Comment string `xml:"Comment" json:"comment"`
}
CloudFrontOriginAccessIdentitySummary is the per-item element within a CloudFrontOriginAccessIdentityList.
type ContentSecurityPolicy ¶
type ContentSecurityPolicy struct {
ContentSecurityPolicy string `xml:"ContentSecurityPolicy" json:"content_security_policy"`
Override bool `xml:"Override" json:"override"`
}
ContentSecurityPolicy configures the Content-Security-Policy header.
type ContentTypeOptions ¶
type ContentTypeOptions struct {
Override bool `xml:"Override" json:"override"`
}
ContentTypeOptions configures the X-Content-Type-Options header.
type ContinuousDeploymentPolicy ¶
type ContinuousDeploymentPolicy struct {
ID string `json:"id"`
LastModifiedTime time.Time `json:"last_modified_time"`
ContinuousDeploymentPolicyConfig CDPConfig `json:"cdp_config"`
Version int `json:"version"`
}
ContinuousDeploymentPolicy represents a continuous deployment policy.
type CookiePreference ¶
type CookiePreference struct {
Forward string `xml:"Forward" json:"forward"` // none | whitelist | all
WhitelistedNames *StringList `xml:"WhitelistedNames,omitempty" json:"whitelisted_names,omitempty"`
}
CookiePreference controls cookie forwarding to origin.
type CorsConfig ¶
type CorsConfig struct {
AccessControlAllowCredentials bool `xml:"AccessControlAllowCredentials" json:"access_control_allow_credentials"`
AccessControlAllowHeaders StringList `xml:"AccessControlAllowHeaders" json:"access_control_allow_headers"`
AccessControlAllowMethods StringList `xml:"AccessControlAllowMethods" json:"access_control_allow_methods"`
AccessControlAllowOrigins StringList `xml:"AccessControlAllowOrigins" json:"access_control_allow_origins"`
AccessControlExposeHeaders *StringList `xml:"AccessControlExposeHeaders,omitempty" json:"access_control_expose_headers,omitempty"`
AccessControlMaxAgeSec *int `xml:"AccessControlMaxAgeSec,omitempty" json:"access_control_max_age_sec,omitempty"`
OriginOverride bool `xml:"OriginOverride" json:"origin_override"`
}
CorsConfig holds CORS override settings for responses.
type CustomErrorResponse ¶
type CustomErrorResponse struct {
ErrorCode int `xml:"ErrorCode" json:"error_code"`
ResponsePagePath string `xml:"ResponsePagePath,omitempty" json:"response_page_path,omitempty"`
ResponseCode string `xml:"ResponseCode,omitempty" json:"response_code,omitempty"`
ErrorCachingMinTTL *int64 `xml:"ErrorCachingMinTTL,omitempty" json:"error_caching_min_ttl,omitempty"`
}
CustomErrorResponse maps an origin error code to a custom response page.
type CustomErrorResponses ¶
type CustomErrorResponses struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []CustomErrorResponse `xml:"Items>CustomErrorResponse,omitempty" json:"items,omitempty"`
}
CustomErrorResponses holds custom error page configuration.
type CustomHeaders ¶
type CustomHeaders struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []OriginCustomHeader `xml:"Items>OriginCustomHeader,omitempty" json:"items,omitempty"`
}
CustomHeaders holds origin custom headers injected on every origin request.
type CustomOriginConfig ¶
type CustomOriginConfig struct {
HTTPPort int `xml:"HTTPPort" json:"http_port"`
HTTPSPort int `xml:"HTTPSPort" json:"https_port"`
OriginProtocolPolicy string `xml:"OriginProtocolPolicy" json:"origin_protocol_policy"`
OriginSslProtocols *StringList `xml:"OriginSslProtocols,omitempty" json:"origin_ssl_protocols,omitempty"`
OriginReadTimeout *int `xml:"OriginReadTimeout,omitempty" json:"origin_read_timeout,omitempty"`
OriginKeepaliveTimeout *int `xml:"OriginKeepaliveTimeout,omitempty" json:"origin_keepalive_timeout,omitempty"`
}
CustomOriginConfig is used for non-S3 (HTTP/HTTPS) origins.
type DefaultCacheBehavior ¶
type DefaultCacheBehavior struct {
TargetOriginId string `xml:"TargetOriginId" json:"target_origin_id"`
ViewerProtocolPolicy string `xml:"ViewerProtocolPolicy" json:"viewer_protocol_policy"`
AllowedMethods *AllowedMethods `xml:"AllowedMethods,omitempty" json:"allowed_methods,omitempty"`
ForwardedValues *ForwardedValues `xml:"ForwardedValues,omitempty" json:"forwarded_values,omitempty"`
MinTTL *int64 `xml:"MinTTL,omitempty" json:"min_ttl,omitempty"`
DefaultTTL *int64 `xml:"DefaultTTL,omitempty" json:"default_ttl,omitempty"`
MaxTTL *int64 `xml:"MaxTTL,omitempty" json:"max_ttl,omitempty"`
Compress *bool `xml:"Compress,omitempty" json:"compress,omitempty"`
SmoothStreaming *bool `xml:"SmoothStreaming,omitempty" json:"smooth_streaming,omitempty"`
CachePolicyId string `xml:"CachePolicyId,omitempty" json:"cache_policy_id,omitempty"`
OriginRequestPolicyId string `xml:"OriginRequestPolicyId,omitempty" json:"origin_request_policy_id,omitempty"`
ResponseHeadersPolicyId string `xml:"ResponseHeadersPolicyId,omitempty" json:"response_headers_policy_id,omitempty"`
FieldLevelEncryptionId string `xml:"FieldLevelEncryptionId,omitempty" json:"field_level_encryption_id,omitempty"`
RealtimeLogConfigArn string `xml:"RealtimeLogConfigArn,omitempty" json:"realtime_log_config_arn,omitempty"`
TrustedSigners *TrustedEntities `xml:"TrustedSigners,omitempty" json:"trusted_signers,omitempty"`
TrustedKeyGroups *TrustedEntities `xml:"TrustedKeyGroups,omitempty" json:"trusted_key_groups,omitempty"`
LambdaFunctionAssociations *LambdaFunctionAssociations `xml:"LambdaFunctionAssociations,omitempty" json:"lambda_function_associations,omitempty"`
FunctionAssociations *FunctionAssociations `xml:"FunctionAssociations,omitempty" json:"function_associations,omitempty"`
}
DefaultCacheBehavior controls how CloudFront handles requests when no path-pattern-specific CacheBehavior matches.
type Distribution ¶
type Distribution struct {
XMLName xml.Name `xml:"Distribution" json:"-"`
ID string `xml:"Id" json:"id"`
ARN string `xml:"ARN" json:"arn"`
Status string `xml:"Status" json:"status"`
DomainName string `xml:"DomainName" json:"domain_name"`
LastModifiedTime time.Time `xml:"LastModifiedTime" json:"last_modified_time"`
InProgressInvalidationBatches int `xml:"InProgressInvalidationBatches" json:"in_progress_invalidation_batches"`
ActiveTrustedSigners *ActiveTrustedList `xml:"ActiveTrustedSigners,omitempty" json:"active_trusted_signers,omitempty"`
ActiveTrustedKeyGroups *ActiveTrustedList `xml:"ActiveTrustedKeyGroups,omitempty" json:"active_trusted_key_groups,omitempty"`
DistributionConfig DistributionConfig `xml:"DistributionConfig" json:"distribution_config"`
// Version is the internal optimistic-concurrency counter. It is never
// sent on the wire — the ETag header carries a quoted representation.
Version int `xml:"-" json:"version"`
}
Distribution is the top-level response wrapper returned by CreateDistribution and GetDistribution. Dual xml+json tags allow the same type to be used for both REST-XML wire format and JSON state persistence.
type DistributionConfig ¶
type DistributionConfig struct {
XMLName xml.Name `xml:"DistributionConfig" json:"-"`
CallerReference string `xml:"CallerReference" json:"caller_reference"`
Comment string `xml:"Comment" json:"comment"`
Enabled bool `xml:"Enabled" json:"enabled"`
Origins Origins `xml:"Origins" json:"origins"`
DefaultCacheBehavior DefaultCacheBehavior `xml:"DefaultCacheBehavior" json:"default_cache_behavior"`
CacheBehaviors *CacheBehaviors `xml:"CacheBehaviors,omitempty" json:"cache_behaviors,omitempty"`
Aliases *StringList `xml:"Aliases,omitempty" json:"aliases,omitempty"`
DefaultRootObject string `xml:"DefaultRootObject,omitempty" json:"default_root_object,omitempty"`
PriceClass string `xml:"PriceClass,omitempty" json:"price_class,omitempty"`
HttpVersion string `xml:"HttpVersion,omitempty" json:"http_version,omitempty"`
IsIPV6Enabled *bool `xml:"IsIPV6Enabled,omitempty" json:"is_ipv6_enabled,omitempty"`
WebACLId string `xml:"WebACLId,omitempty" json:"web_acl_id,omitempty"`
Restrictions *Restrictions `xml:"Restrictions,omitempty" json:"restrictions,omitempty"`
ViewerCertificate *ViewerCertificate `xml:"ViewerCertificate,omitempty" json:"viewer_certificate,omitempty"`
CustomErrorResponses *CustomErrorResponses `xml:"CustomErrorResponses,omitempty" json:"custom_error_responses,omitempty"`
Logging *LoggingConfig `xml:"Logging,omitempty" json:"logging,omitempty"`
OriginGroups *OriginGroups `xml:"OriginGroups,omitempty" json:"origin_groups,omitempty"`
// ContinuousDeploymentPolicyId links this distribution to a continuous
// deployment policy that routes a portion of traffic to a staging distribution.
ContinuousDeploymentPolicyId string `xml:"ContinuousDeploymentPolicyId,omitempty" json:"continuous_deployment_policy_id,omitempty"`
// Staging marks this distribution as a staging distribution used for
// continuous deployment testing before promoting to primary.
Staging *bool `xml:"Staging,omitempty" json:"staging,omitempty"`
// CacheTagConfig configures cache-tag-based invalidation. When set,
// the proxy extracts tags from the origin response header specified
// by HeaderName, and the CreateInvalidation API accepts "#tag" paths
// to invalidate by tag.
CacheTagConfig *CacheTagConfig `xml:"CacheTagConfig,omitempty" json:"cache_tag_config,omitempty"`
}
DistributionConfig holds the full configuration for a distribution. Every field the SDKs commonly send is modelled so that round-trip (decode → store → encode) preserves the caller's intent.
type DistributionConfigWithTags ¶
type DistributionConfigWithTags struct {
XMLName xml.Name `xml:"DistributionConfigWithTags" json:"-"`
DistributionConfig DistributionConfig `xml:"DistributionConfig" json:"distribution_config"`
Tags Tags `xml:"Tags" json:"tags"`
}
DistributionConfigWithTags wraps config + tags for CreateDistributionWithTags.
type DistributionList ¶
type DistributionList struct {
XMLName xml.Name `xml:"DistributionList" json:"-"`
Marker string `xml:"Marker" json:"marker"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
IsTruncated bool `xml:"IsTruncated" json:"is_truncated"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []DistributionSummary `xml:"Items>DistributionSummary,omitempty" json:"items,omitempty"`
}
DistributionList is the response envelope for ListDistributions.
type DistributionSummary ¶
type DistributionSummary struct {
ID string `xml:"Id" json:"id"`
ARN string `xml:"ARN" json:"arn"`
Status string `xml:"Status" json:"status"`
DomainName string `xml:"DomainName" json:"domain_name"`
LastModifiedTime time.Time `xml:"LastModifiedTime" json:"last_modified_time"`
Comment string `xml:"Comment" json:"comment"`
Enabled bool `xml:"Enabled" json:"enabled"`
Origins Origins `xml:"Origins" json:"origins"`
DefaultCacheBehavior DefaultCacheBehavior `xml:"DefaultCacheBehavior" json:"default_cache_behavior"`
CacheBehaviors *CacheBehaviors `xml:"CacheBehaviors,omitempty" json:"cache_behaviors,omitempty"`
Aliases *StringList `xml:"Aliases,omitempty" json:"aliases,omitempty"`
PriceClass string `xml:"PriceClass,omitempty" json:"price_class,omitempty"`
ViewerCertificate *ViewerCertificate `xml:"ViewerCertificate,omitempty" json:"viewer_certificate,omitempty"`
Restrictions *Restrictions `xml:"Restrictions,omitempty" json:"restrictions,omitempty"`
WebACLId string `xml:"WebACLId,omitempty" json:"web_acl_id,omitempty"`
HttpVersion string `xml:"HttpVersion,omitempty" json:"http_version,omitempty"`
IsIPV6Enabled *bool `xml:"IsIPV6Enabled,omitempty" json:"is_ipv6_enabled,omitempty"`
}
DistributionSummary is the per-item element within a DistributionList.
type EndPoint ¶
type EndPoint struct {
StreamType string `xml:"StreamType" json:"stream_type"`
KinesisStreamConfig *KinesisStreamConfig `xml:"KinesisStreamConfig,omitempty" json:"kinesis_stream_config,omitempty"`
}
EndPoint represents a realtime log config endpoint.
type FLEConfig ¶
type FLEConfig struct {
ID string `json:"id"`
LastModifiedTime time.Time `json:"last_modified_time"`
FLEConfigData FLEConfigData `json:"fle_config_data"`
Version int `json:"version"`
}
FLEConfig represents a field-level encryption configuration.
type FLEConfigData ¶
type FLEConfigData struct {
CallerReference string `xml:"CallerReference" json:"caller_reference"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
ContentTypeProfileConfig string `xml:"ContentTypeProfileConfig,omitempty" json:"content_type_profile_config,omitempty"`
QueryArgProfileConfig string `xml:"QueryArgProfileConfig,omitempty" json:"query_arg_profile_config,omitempty"`
}
FLEConfigData holds the configuration data for field-level encryption.
type FLEProfile ¶
type FLEProfile struct {
ID string `json:"id"`
LastModifiedTime time.Time `json:"last_modified_time"`
FLEProfileData FLEProfileData `json:"fle_profile_data"`
Version int `json:"version"`
}
FLEProfile represents a field-level encryption profile.
type FLEProfileData ¶
type FLEProfileData struct {
CallerReference string `xml:"CallerReference" json:"caller_reference"`
Name string `xml:"Name" json:"name"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
EncryptionEntities string `xml:"EncryptionEntities,omitempty" json:"encryption_entities,omitempty"`
}
FLEProfileData holds the configuration data for a field-level encryption profile.
type ForwardedValues ¶
type ForwardedValues struct {
QueryString bool `xml:"QueryString" json:"query_string"`
Cookies *CookiePreference `xml:"Cookies,omitempty" json:"cookies,omitempty"`
Headers *StringList `xml:"Headers,omitempty" json:"headers,omitempty"`
QueryStringCacheKeys *StringList `xml:"QueryStringCacheKeys,omitempty" json:"query_string_cache_keys,omitempty"`
}
ForwardedValues controls which request components are forwarded to the origin and included in the cache key (legacy — CachePolicy is the modern replacement).
type FrameOptions ¶
type FrameOptions struct {
FrameOption string `xml:"FrameOption" json:"frame_option"` // DENY | SAMEORIGIN
Override bool `xml:"Override" json:"override"`
}
FrameOptions configures the X-Frame-Options header.
type FunctionAssociation ¶
type FunctionAssociation struct {
FunctionARN string `xml:"FunctionARN" json:"function_arn"`
EventType string `xml:"EventType" json:"event_type"` // viewer-request | viewer-response
}
FunctionAssociation maps a CF Function ARN to a CloudFront event type.
type FunctionAssociations ¶
type FunctionAssociations struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []FunctionAssociation `xml:"Items>FunctionAssociation,omitempty" json:"items,omitempty"`
}
FunctionAssociations holds CloudFront Functions triggers for a behaviour.
type FunctionConfig ¶
type FunctionConfig struct {
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
Runtime string `xml:"Runtime" json:"runtime"` // cloudfront-js-1.0 | cloudfront-js-2.0
}
FunctionConfig holds the configuration for a CloudFront Function.
type FunctionMetadata ¶
type FunctionMetadata struct {
FunctionARN string `xml:"FunctionARN" json:"function_arn"`
Stage string `xml:"Stage" json:"stage"`
CreatedTime time.Time `xml:"CreatedTime" json:"created_time"`
LastModifiedTime time.Time `xml:"LastModifiedTime" json:"last_modified_time"`
}
FunctionMetadata holds metadata about a CloudFront Function.
type GeoRestriction ¶
type GeoRestriction struct {
RestrictionType string `xml:"RestrictionType" json:"restriction_type"` // none | whitelist | blacklist
Quantity int `xml:"Quantity" json:"quantity"`
Items []string `xml:"Items>Location,omitempty" json:"items,omitempty"`
}
GeoRestriction configures geographic access restrictions.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the CloudFront REST-XML API handlers.
func (*Handler) CreateCachePolicy ¶
func (h *Handler) CreateCachePolicy(w http.ResponseWriter, r *http.Request)
CreateCachePolicy handles POST /2020-05-31/cache-policy.
func (*Handler) CreateCloudFrontOriginAccessIdentity ¶
func (h *Handler) CreateCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
CreateCloudFrontOriginAccessIdentity handles POST /2020-05-31/origin-access-identity/cloudfront.
func (*Handler) CreateContinuousDeploymentPolicy ¶
func (h *Handler) CreateContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
CreateContinuousDeploymentPolicy handles POST /2020-05-31/continuous-deployment-policy.
func (*Handler) CreateDistribution ¶
func (h *Handler) CreateDistribution(w http.ResponseWriter, r *http.Request)
CreateDistribution handles POST /2020-05-31/distribution.
func (*Handler) CreateDistributionWithTags ¶
func (h *Handler) CreateDistributionWithTags(w http.ResponseWriter, r *http.Request)
CreateDistributionWithTags handles POST /2020-05-31/distribution?WithTags.
func (*Handler) CreateFieldLevelEncryptionConfig ¶
func (h *Handler) CreateFieldLevelEncryptionConfig(w http.ResponseWriter, r *http.Request)
CreateFieldLevelEncryptionConfig handles POST /2020-05-31/field-level-encryption.
func (*Handler) CreateFieldLevelEncryptionProfile ¶
func (h *Handler) CreateFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
CreateFieldLevelEncryptionProfile handles POST /2020-05-31/field-level-encryption-profile.
func (*Handler) CreateFunction ¶
func (h *Handler) CreateFunction(w http.ResponseWriter, r *http.Request)
CreateFunction handles POST /2020-05-31/function.
func (*Handler) CreateInvalidation ¶
func (h *Handler) CreateInvalidation(w http.ResponseWriter, r *http.Request)
CreateInvalidation handles POST /2020-05-31/distribution/{id}/invalidation.
func (*Handler) CreateKeyGroup ¶
func (h *Handler) CreateKeyGroup(w http.ResponseWriter, r *http.Request)
CreateKeyGroup handles POST /2020-05-31/key-group.
func (*Handler) CreateMonitoringSubscription ¶
func (h *Handler) CreateMonitoringSubscription(w http.ResponseWriter, r *http.Request)
CreateMonitoringSubscription handles POST /2020-05-31/distribution/{id}/monitoring-subscription.
func (*Handler) CreateOriginAccessControl ¶
func (h *Handler) CreateOriginAccessControl(w http.ResponseWriter, r *http.Request)
CreateOriginAccessControl handles POST /2020-05-31/origin-access-control.
func (*Handler) CreateOriginRequestPolicy ¶
func (h *Handler) CreateOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
CreateOriginRequestPolicy handles POST /2020-05-31/origin-request-policy.
func (*Handler) CreatePublicKey ¶
func (h *Handler) CreatePublicKey(w http.ResponseWriter, r *http.Request)
CreatePublicKey handles POST /2020-05-31/public-key.
func (*Handler) CreateRealtimeLogConfig ¶
func (h *Handler) CreateRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
CreateRealtimeLogConfig handles POST /2020-05-31/realtime-log-config.
func (*Handler) CreateResponseHeadersPolicy ¶
func (h *Handler) CreateResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
CreateResponseHeadersPolicy handles POST /2020-05-31/response-headers-policy.
func (*Handler) DeleteCachePolicy ¶
func (h *Handler) DeleteCachePolicy(w http.ResponseWriter, r *http.Request)
DeleteCachePolicy handles DELETE /2020-05-31/cache-policy/{id}.
func (*Handler) DeleteCloudFrontOriginAccessIdentity ¶
func (h *Handler) DeleteCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
DeleteCloudFrontOriginAccessIdentity handles DELETE /2020-05-31/origin-access-identity/cloudfront/{id}.
func (*Handler) DeleteContinuousDeploymentPolicy ¶
func (h *Handler) DeleteContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
DeleteContinuousDeploymentPolicy handles DELETE /2020-05-31/continuous-deployment-policy/{id}.
func (*Handler) DeleteDistribution ¶
func (h *Handler) DeleteDistribution(w http.ResponseWriter, r *http.Request)
DeleteDistribution handles DELETE /2020-05-31/distribution/{id}.
func (*Handler) DeleteFieldLevelEncryption ¶
func (h *Handler) DeleteFieldLevelEncryption(w http.ResponseWriter, r *http.Request)
DeleteFieldLevelEncryption handles DELETE /2020-05-31/field-level-encryption/{id}.
func (*Handler) DeleteFieldLevelEncryptionProfile ¶
func (h *Handler) DeleteFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
DeleteFieldLevelEncryptionProfile handles DELETE /2020-05-31/field-level-encryption-profile/{id}.
func (*Handler) DeleteFunction ¶
func (h *Handler) DeleteFunction(w http.ResponseWriter, r *http.Request)
DeleteFunction handles DELETE /2020-05-31/function/{name}.
func (*Handler) DeleteKeyGroup ¶
func (h *Handler) DeleteKeyGroup(w http.ResponseWriter, r *http.Request)
DeleteKeyGroup handles DELETE /2020-05-31/key-group/{id}.
func (*Handler) DeleteMonitoringSubscription ¶
func (h *Handler) DeleteMonitoringSubscription(w http.ResponseWriter, r *http.Request)
DeleteMonitoringSubscription handles DELETE /2020-05-31/distribution/{id}/monitoring-subscription.
func (*Handler) DeleteOriginAccessControl ¶
func (h *Handler) DeleteOriginAccessControl(w http.ResponseWriter, r *http.Request)
DeleteOriginAccessControl handles DELETE /2020-05-31/origin-access-control/{id}.
func (*Handler) DeleteOriginRequestPolicy ¶
func (h *Handler) DeleteOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
DeleteOriginRequestPolicy handles DELETE /2020-05-31/origin-request-policy/{id}.
func (*Handler) DeletePublicKey ¶
func (h *Handler) DeletePublicKey(w http.ResponseWriter, r *http.Request)
DeletePublicKey handles DELETE /2020-05-31/public-key/{id}.
func (*Handler) DeleteRealtimeLogConfig ¶
func (h *Handler) DeleteRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
DeleteRealtimeLogConfig handles DELETE /2020-05-31/delete-realtime-log-config.
func (*Handler) DeleteResponseHeadersPolicy ¶
func (h *Handler) DeleteResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
DeleteResponseHeadersPolicy handles DELETE /2020-05-31/response-headers-policy/{id}.
func (*Handler) DescribeFunction ¶
func (h *Handler) DescribeFunction(w http.ResponseWriter, r *http.Request)
DescribeFunction handles GET /2020-05-31/function/{name}/describe.
func (*Handler) GetCachePolicy ¶
func (h *Handler) GetCachePolicy(w http.ResponseWriter, r *http.Request)
GetCachePolicy handles GET /2020-05-31/cache-policy/{id}.
func (*Handler) GetCachePolicyConfig ¶
func (h *Handler) GetCachePolicyConfig(w http.ResponseWriter, r *http.Request)
GetCachePolicyConfig handles GET /2020-05-31/cache-policy/{id}/config.
func (*Handler) GetCloudFrontOriginAccessIdentity ¶
func (h *Handler) GetCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
GetCloudFrontOriginAccessIdentity handles GET /2020-05-31/origin-access-identity/cloudfront/{id}.
func (*Handler) GetCloudFrontOriginAccessIdentityConfig ¶
func (h *Handler) GetCloudFrontOriginAccessIdentityConfig(w http.ResponseWriter, r *http.Request)
GetCloudFrontOriginAccessIdentityConfig handles GET /2020-05-31/origin-access-identity/cloudfront/{id}/config.
func (*Handler) GetContinuousDeploymentPolicy ¶
func (h *Handler) GetContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
GetContinuousDeploymentPolicy handles GET /2020-05-31/continuous-deployment-policy/{id}.
func (*Handler) GetContinuousDeploymentPolicyConfig ¶
func (h *Handler) GetContinuousDeploymentPolicyConfig(w http.ResponseWriter, r *http.Request)
GetContinuousDeploymentPolicyConfig handles GET /2020-05-31/continuous-deployment-policy/{id}/config.
func (*Handler) GetDistribution ¶
func (h *Handler) GetDistribution(w http.ResponseWriter, r *http.Request)
GetDistribution handles GET /2020-05-31/distribution/{id}.
func (*Handler) GetDistributionConfig ¶
func (h *Handler) GetDistributionConfig(w http.ResponseWriter, r *http.Request)
GetDistributionConfig handles GET /2020-05-31/distribution/{id}/config.
func (*Handler) GetFieldLevelEncryption ¶
func (h *Handler) GetFieldLevelEncryption(w http.ResponseWriter, r *http.Request)
GetFieldLevelEncryption handles GET /2020-05-31/field-level-encryption/{id}.
func (*Handler) GetFieldLevelEncryptionConfig ¶
func (h *Handler) GetFieldLevelEncryptionConfig(w http.ResponseWriter, r *http.Request)
GetFieldLevelEncryptionConfig handles GET /2020-05-31/field-level-encryption/{id}/config.
func (*Handler) GetFieldLevelEncryptionProfile ¶
func (h *Handler) GetFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
GetFieldLevelEncryptionProfile handles GET /2020-05-31/field-level-encryption-profile/{id}.
func (*Handler) GetFieldLevelEncryptionProfileConfig ¶
func (h *Handler) GetFieldLevelEncryptionProfileConfig(w http.ResponseWriter, r *http.Request)
GetFieldLevelEncryptionProfileConfig handles GET /2020-05-31/field-level-encryption-profile/{id}/config.
func (*Handler) GetFunction ¶
func (h *Handler) GetFunction(w http.ResponseWriter, r *http.Request)
GetFunction handles GET /2020-05-31/function/{name}. Returns the function code in the response body with metadata in headers.
func (*Handler) GetInvalidation ¶
func (h *Handler) GetInvalidation(w http.ResponseWriter, r *http.Request)
GetInvalidation handles GET /2020-05-31/distribution/{id}/invalidation/{invalidationId}.
func (*Handler) GetKeyGroup ¶
func (h *Handler) GetKeyGroup(w http.ResponseWriter, r *http.Request)
GetKeyGroup handles GET /2020-05-31/key-group/{id}.
func (*Handler) GetKeyGroupConfig ¶
func (h *Handler) GetKeyGroupConfig(w http.ResponseWriter, r *http.Request)
GetKeyGroupConfig handles GET /2020-05-31/key-group/{id}/config.
func (*Handler) GetMonitoringSubscription ¶
func (h *Handler) GetMonitoringSubscription(w http.ResponseWriter, r *http.Request)
GetMonitoringSubscription handles GET /2020-05-31/distribution/{id}/monitoring-subscription.
func (*Handler) GetOriginAccessControl ¶
func (h *Handler) GetOriginAccessControl(w http.ResponseWriter, r *http.Request)
GetOriginAccessControl handles GET /2020-05-31/origin-access-control/{id}.
func (*Handler) GetOriginRequestPolicy ¶
func (h *Handler) GetOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
GetOriginRequestPolicy handles GET /2020-05-31/origin-request-policy/{id}.
func (*Handler) GetOriginRequestPolicyConfig ¶
func (h *Handler) GetOriginRequestPolicyConfig(w http.ResponseWriter, r *http.Request)
GetOriginRequestPolicyConfig handles GET /2020-05-31/origin-request-policy/{id}/config.
func (*Handler) GetPublicKey ¶
func (h *Handler) GetPublicKey(w http.ResponseWriter, r *http.Request)
GetPublicKey handles GET /2020-05-31/public-key/{id}.
func (*Handler) GetPublicKeyConfig ¶
func (h *Handler) GetPublicKeyConfig(w http.ResponseWriter, r *http.Request)
GetPublicKeyConfig handles GET /2020-05-31/public-key/{id}/config.
func (*Handler) GetRealtimeLogConfig ¶
func (h *Handler) GetRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
GetRealtimeLogConfig handles GET /2020-05-31/get-realtime-log-config.
func (*Handler) GetResponseHeadersPolicy ¶
func (h *Handler) GetResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
GetResponseHeadersPolicy handles GET /2020-05-31/response-headers-policy/{id}.
func (*Handler) GetResponseHeadersPolicyConfig ¶
func (h *Handler) GetResponseHeadersPolicyConfig(w http.ResponseWriter, r *http.Request)
GetResponseHeadersPolicyConfig handles GET /2020-05-31/response-headers-policy/{id}/config.
func (*Handler) ListCachePolicies ¶
func (h *Handler) ListCachePolicies(w http.ResponseWriter, r *http.Request)
ListCachePolicies handles GET /2020-05-31/cache-policy.
func (*Handler) ListCloudFrontOriginAccessIdentities ¶
func (h *Handler) ListCloudFrontOriginAccessIdentities(w http.ResponseWriter, r *http.Request)
ListCloudFrontOriginAccessIdentities handles GET /2020-05-31/origin-access-identity/cloudfront.
func (*Handler) ListContinuousDeploymentPolicies ¶
func (h *Handler) ListContinuousDeploymentPolicies(w http.ResponseWriter, r *http.Request)
ListContinuousDeploymentPolicies handles GET /2020-05-31/continuous-deployment-policy.
func (*Handler) ListDistributions ¶
func (h *Handler) ListDistributions(w http.ResponseWriter, r *http.Request)
ListDistributions handles GET /2020-05-31/distribution.
func (*Handler) ListFieldLevelEncryptionConfigs ¶
func (h *Handler) ListFieldLevelEncryptionConfigs(w http.ResponseWriter, r *http.Request)
ListFieldLevelEncryptionConfigs handles GET /2020-05-31/field-level-encryption.
func (*Handler) ListFieldLevelEncryptionProfiles ¶
func (h *Handler) ListFieldLevelEncryptionProfiles(w http.ResponseWriter, r *http.Request)
ListFieldLevelEncryptionProfiles handles GET /2020-05-31/field-level-encryption-profile.
func (*Handler) ListFunctions ¶
func (h *Handler) ListFunctions(w http.ResponseWriter, r *http.Request)
ListFunctions handles GET /2020-05-31/function.
func (*Handler) ListInvalidations ¶
func (h *Handler) ListInvalidations(w http.ResponseWriter, r *http.Request)
ListInvalidations handles GET /2020-05-31/distribution/{id}/invalidation.
func (*Handler) ListKeyGroups ¶
func (h *Handler) ListKeyGroups(w http.ResponseWriter, r *http.Request)
ListKeyGroups handles GET /2020-05-31/key-group.
func (*Handler) ListOriginAccessControls ¶
func (h *Handler) ListOriginAccessControls(w http.ResponseWriter, r *http.Request)
ListOriginAccessControls handles GET /2020-05-31/origin-access-control.
func (*Handler) ListOriginRequestPolicies ¶
func (h *Handler) ListOriginRequestPolicies(w http.ResponseWriter, r *http.Request)
ListOriginRequestPolicies handles GET /2020-05-31/origin-request-policy.
func (*Handler) ListPublicKeys ¶
func (h *Handler) ListPublicKeys(w http.ResponseWriter, r *http.Request)
ListPublicKeys handles GET /2020-05-31/public-key.
func (*Handler) ListRealtimeLogConfigs ¶
func (h *Handler) ListRealtimeLogConfigs(w http.ResponseWriter, r *http.Request)
ListRealtimeLogConfigs handles GET /2020-05-31/realtime-log-config.
func (*Handler) ListResponseHeadersPolicies ¶
func (h *Handler) ListResponseHeadersPolicies(w http.ResponseWriter, r *http.Request)
ListResponseHeadersPolicies handles GET /2020-05-31/response-headers-policy.
func (*Handler) ListTagsForResource ¶
func (h *Handler) ListTagsForResource(w http.ResponseWriter, r *http.Request)
ListTagsForResource handles GET /2020-05-31/tagging?Resource={arn}.
func (*Handler) ProxyRequest ¶
func (h *Handler) ProxyRequest(w http.ResponseWriter, r *http.Request)
ProxyRequest handles GET/HEAD/POST/PUT/DELETE/PATCH requests to /_cloudfront/{distId}/* and forwards them to the matched origin.
func (*Handler) PublishFunction ¶
func (h *Handler) PublishFunction(w http.ResponseWriter, r *http.Request)
PublishFunction handles POST /2020-05-31/function/{name}/publish. Promotes DEVELOPMENT stage function to LIVE.
func (*Handler) TagResource ¶
func (h *Handler) TagResource(w http.ResponseWriter, r *http.Request)
TagResource handles POST /2020-05-31/tagging?Operation=Tag&Resource={arn}.
func (*Handler) TestFunction ¶
func (h *Handler) TestFunction(w http.ResponseWriter, r *http.Request)
TestFunction handles POST /2020-05-31/function/{name}/test. The emulator does not execute JS code — it returns a mock success result.
func (*Handler) UntagResource ¶
func (h *Handler) UntagResource(w http.ResponseWriter, r *http.Request)
UntagResource handles POST /2020-05-31/tagging?Operation=Untag&Resource={arn}.
func (*Handler) UpdateCachePolicy ¶
func (h *Handler) UpdateCachePolicy(w http.ResponseWriter, r *http.Request)
UpdateCachePolicy handles PUT /2020-05-31/cache-policy/{id}.
func (*Handler) UpdateCloudFrontOriginAccessIdentity ¶
func (h *Handler) UpdateCloudFrontOriginAccessIdentity(w http.ResponseWriter, r *http.Request)
UpdateCloudFrontOriginAccessIdentity handles PUT /2020-05-31/origin-access-identity/cloudfront/{id}/config.
func (*Handler) UpdateContinuousDeploymentPolicy ¶
func (h *Handler) UpdateContinuousDeploymentPolicy(w http.ResponseWriter, r *http.Request)
UpdateContinuousDeploymentPolicy handles PUT /2020-05-31/continuous-deployment-policy/{id}.
func (*Handler) UpdateDistribution ¶
func (h *Handler) UpdateDistribution(w http.ResponseWriter, r *http.Request)
UpdateDistribution handles PUT /2020-05-31/distribution/{id}/config.
func (*Handler) UpdateFieldLevelEncryptionConfig ¶
func (h *Handler) UpdateFieldLevelEncryptionConfig(w http.ResponseWriter, r *http.Request)
UpdateFieldLevelEncryptionConfig handles PUT /2020-05-31/field-level-encryption/{id}/config.
func (*Handler) UpdateFieldLevelEncryptionProfile ¶
func (h *Handler) UpdateFieldLevelEncryptionProfile(w http.ResponseWriter, r *http.Request)
UpdateFieldLevelEncryptionProfile handles PUT /2020-05-31/field-level-encryption-profile/{id}/config.
func (*Handler) UpdateFunction ¶
func (h *Handler) UpdateFunction(w http.ResponseWriter, r *http.Request)
UpdateFunction handles PUT /2020-05-31/function/{name}.
func (*Handler) UpdateKeyGroup ¶
func (h *Handler) UpdateKeyGroup(w http.ResponseWriter, r *http.Request)
UpdateKeyGroup handles PUT /2020-05-31/key-group/{id}.
func (*Handler) UpdateOriginAccessControl ¶
func (h *Handler) UpdateOriginAccessControl(w http.ResponseWriter, r *http.Request)
UpdateOriginAccessControl handles PUT /2020-05-31/origin-access-control/{id}/config.
func (*Handler) UpdateOriginRequestPolicy ¶
func (h *Handler) UpdateOriginRequestPolicy(w http.ResponseWriter, r *http.Request)
UpdateOriginRequestPolicy handles PUT /2020-05-31/origin-request-policy/{id}.
func (*Handler) UpdatePublicKey ¶
func (h *Handler) UpdatePublicKey(w http.ResponseWriter, r *http.Request)
UpdatePublicKey handles PUT /2020-05-31/public-key/{id}/config.
func (*Handler) UpdateRealtimeLogConfig ¶
func (h *Handler) UpdateRealtimeLogConfig(w http.ResponseWriter, r *http.Request)
UpdateRealtimeLogConfig handles PUT /2020-05-31/realtime-log-config.
func (*Handler) UpdateResponseHeadersPolicy ¶
func (h *Handler) UpdateResponseHeadersPolicy(w http.ResponseWriter, r *http.Request)
UpdateResponseHeadersPolicy handles PUT /2020-05-31/response-headers-policy/{id}.
type Invalidation ¶
type Invalidation struct {
XMLName xml.Name `xml:"Invalidation" json:"-"`
ID string `xml:"Id" json:"id"`
Status string `xml:"Status" json:"status"` // InProgress | Completed
CreateTime time.Time `xml:"CreateTime" json:"create_time"`
InvalidationBatch InvalidationBatch `xml:"InvalidationBatch" json:"invalidation_batch"`
}
Invalidation represents a single invalidation request.
type InvalidationBatch ¶
type InvalidationBatch struct {
CallerReference string `xml:"CallerReference" json:"caller_reference"`
Paths Paths `xml:"Paths" json:"paths"`
}
InvalidationBatch holds the caller reference and paths to invalidate.
type InvalidationList ¶
type InvalidationList struct {
XMLName xml.Name `xml:"InvalidationList" json:"-"`
Marker string `xml:"Marker" json:"marker"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
IsTruncated bool `xml:"IsTruncated" json:"is_truncated"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []InvalidationSummary `xml:"Items>InvalidationSummary,omitempty" json:"items,omitempty"`
}
InvalidationList is the response envelope for ListInvalidations.
type InvalidationSummary ¶
type InvalidationSummary struct {
ID string `xml:"Id" json:"id"`
CreateTime time.Time `xml:"CreateTime" json:"create_time"`
Status string `xml:"Status" json:"status"`
}
InvalidationSummary is the per-item element within an InvalidationList.
type KeyGroup ¶
type KeyGroup struct {
ID string `json:"id"`
LastModifiedTime time.Time `json:"last_modified_time"`
KeyGroupConfig KeyGroupConfig `json:"key_group_config"`
Version int `json:"version"`
}
KeyGroup represents a CloudFront key group resource.
type KeyGroupConfig ¶
type KeyGroupConfig struct {
Name string `xml:"Name" json:"name"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
Items []string `xml:"Items>PublicKey" json:"items"`
}
KeyGroupConfig holds the configuration for a key group.
type KinesisStreamConfig ¶
type KinesisStreamConfig struct {
RoleARN string `xml:"RoleARN" json:"role_arn"`
StreamARN string `xml:"StreamARN" json:"stream_arn"`
}
KinesisStreamConfig holds the Kinesis stream destination config.
type LambdaFunctionAssociation ¶
type LambdaFunctionAssociation struct {
LambdaFunctionARN string `xml:"LambdaFunctionARN" json:"lambda_function_arn"`
EventType string `xml:"EventType" json:"event_type"` // viewer-request | viewer-response | origin-request | origin-response
IncludeBody *bool `xml:"IncludeBody,omitempty" json:"include_body,omitempty"`
}
LambdaFunctionAssociation maps a Lambda function ARN to a CloudFront event type.
type LambdaFunctionAssociations ¶
type LambdaFunctionAssociations struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []LambdaFunctionAssociation `xml:"Items>LambdaFunctionAssociation,omitempty" json:"items,omitempty"`
}
LambdaFunctionAssociations holds Lambda@Edge function triggers for a behaviour.
type LoggingConfig ¶
type LoggingConfig struct {
Enabled bool `xml:"Enabled" json:"enabled"`
IncludeCookies bool `xml:"IncludeCookies" json:"include_cookies"`
Bucket string `xml:"Bucket" json:"bucket"`
Prefix string `xml:"Prefix" json:"prefix"`
}
LoggingConfig controls access logging to an S3 bucket.
type MonitoringSubscription ¶
type MonitoringSubscription struct {
RealtimeMetricsSubscriptionConfig RealtimeMetricsConfig `json:"realtime_metrics_config"`
}
MonitoringSubscription represents a CloudFront monitoring subscription.
type Origin ¶
type Origin struct {
ID string `xml:"Id" json:"id"`
DomainName string `xml:"DomainName" json:"domain_name"`
OriginPath string `xml:"OriginPath,omitempty" json:"origin_path,omitempty"`
S3OriginConfig *S3OriginConfig `xml:"S3OriginConfig,omitempty" json:"s3_origin_config,omitempty"`
CustomOriginConfig *CustomOriginConfig `xml:"CustomOriginConfig,omitempty" json:"custom_origin_config,omitempty"`
CustomHeaders *CustomHeaders `xml:"CustomHeaders,omitempty" json:"custom_headers,omitempty"`
ConnectionAttempts *int `xml:"ConnectionAttempts,omitempty" json:"connection_attempts,omitempty"`
ConnectionTimeout *int `xml:"ConnectionTimeout,omitempty" json:"connection_timeout,omitempty"`
OriginAccessControlId string `xml:"OriginAccessControlId,omitempty" json:"origin_access_control_id,omitempty"`
OriginShield *OriginShield `xml:"OriginShield,omitempty" json:"origin_shield,omitempty"`
}
Origin represents a single origin server (S3 bucket or custom HTTP endpoint).
type OriginAccessControl ¶
type OriginAccessControl struct {
XMLName xml.Name `xml:"OriginAccessControl" json:"-"`
ID string `xml:"Id" json:"id"`
OriginAccessControlConfig OriginAccessControlConfig `xml:"OriginAccessControlConfig" json:"origin_access_control_config"`
Version int `xml:"-" json:"version"`
}
OriginAccessControl represents an OAC resource with its config.
type OriginAccessControlConfig ¶
type OriginAccessControlConfig struct {
Name string `xml:"Name" json:"name"`
Description string `xml:"Description,omitempty" json:"description,omitempty"`
SigningProtocol string `xml:"SigningProtocol" json:"signing_protocol"` // sigv4
SigningBehavior string `xml:"SigningBehavior" json:"signing_behavior"` // always | never | no-override
OriginAccessControlOriginType string `xml:"OriginAccessControlOriginType" json:"origin_access_control_origin_type"` // s3 | mediastore
}
OriginAccessControlConfig holds the configuration for an OAC.
type OriginAccessControlList ¶
type OriginAccessControlList struct {
XMLName xml.Name `xml:"OriginAccessControlList" json:"-"`
Marker string `xml:"Marker" json:"marker"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
IsTruncated bool `xml:"IsTruncated" json:"is_truncated"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []OriginAccessControlSummary `xml:"Items>OriginAccessControlSummary,omitempty" json:"items,omitempty"`
}
OriginAccessControlList is the response envelope for ListOriginAccessControls.
type OriginAccessControlSummary ¶
type OriginAccessControlSummary struct {
ID string `xml:"Id" json:"id"`
Name string `xml:"Name" json:"name"`
Description string `xml:"Description,omitempty" json:"description,omitempty"`
SigningProtocol string `xml:"SigningProtocol" json:"signing_protocol"`
SigningBehavior string `xml:"SigningBehavior" json:"signing_behavior"`
OriginAccessControlOriginType string `xml:"OriginAccessControlOriginType" json:"origin_access_control_origin_type"`
}
OriginAccessControlSummary is the per-item element within an OriginAccessControlList.
type OriginCustomHeader ¶
type OriginCustomHeader struct {
HeaderName string `xml:"HeaderName" json:"header_name"`
HeaderValue string `xml:"HeaderValue" json:"header_value"`
}
OriginCustomHeader is a single header name-value pair forwarded to the origin.
type OriginGroup ¶
type OriginGroup struct {
ID string `xml:"Id" json:"id"`
FailoverCriteria OriginGroupFailover `xml:"FailoverCriteria" json:"failover_criteria"`
Members OriginGroupMembers `xml:"Members" json:"members"`
}
OriginGroup represents a single origin group with primary and failover members.
type OriginGroupFailover ¶
type OriginGroupFailover struct {
StatusCodes OriginGroupStatusCodes `xml:"StatusCodes" json:"status_codes"`
}
OriginGroupFailover defines the HTTP status codes that trigger failover.
type OriginGroupMember ¶
type OriginGroupMember struct {
OriginId string `xml:"OriginId" json:"origin_id"`
}
OriginGroupMember references an origin by ID within an origin group.
type OriginGroupMembers ¶
type OriginGroupMembers struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []OriginGroupMember `xml:"Items>OriginGroupMember" json:"items,omitempty"`
}
OriginGroupMembers lists the origins in an origin group.
type OriginGroupStatusCodes ¶
type OriginGroupStatusCodes struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []int `xml:"Items>StatusCode" json:"items,omitempty"`
}
OriginGroupStatusCodes is the list of HTTP status codes for failover.
type OriginGroups ¶
type OriginGroups struct {
XMLName xml.Name `xml:"OriginGroups" json:"-"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []OriginGroup `xml:"Items>OriginGroup" json:"items,omitempty"`
}
OriginGroups represents the OriginGroups list in a distribution config.
type OriginRequestPolicy ¶
type OriginRequestPolicy struct {
XMLName xml.Name `xml:"OriginRequestPolicy" json:"-"`
ID string `xml:"Id" json:"id"`
LastModifiedTime time.Time `xml:"LastModifiedTime" json:"last_modified_time"`
OriginRequestPolicyConfig OriginRequestPolicyConfig `xml:"OriginRequestPolicyConfig" json:"origin_request_policy_config"`
Version int `xml:"-" json:"version"`
}
OriginRequestPolicy represents a managed origin request policy.
type OriginRequestPolicyConfig ¶
type OriginRequestPolicyConfig struct {
Name string `xml:"Name" json:"name"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
CookiesConfig *StringList `xml:"CookiesConfig,omitempty" json:"cookies_config,omitempty"`
HeadersConfig *StringList `xml:"HeadersConfig,omitempty" json:"headers_config,omitempty"`
QueryStringsConfig *StringList `xml:"QueryStringsConfig,omitempty" json:"query_strings_config,omitempty"`
}
OriginRequestPolicyConfig holds the configuration for an origin request policy.
type OriginRequestPolicyList ¶
type OriginRequestPolicyList struct {
XMLName xml.Name `xml:"OriginRequestPolicyList" json:"-"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []OriginRequestPolicySummary `xml:"Items>OriginRequestPolicySummary,omitempty" json:"items,omitempty"`
}
OriginRequestPolicyList is the response envelope for ListOriginRequestPolicies.
type OriginRequestPolicySummary ¶
type OriginRequestPolicySummary struct {
Type string `xml:"Type" json:"type"`
OriginRequestPolicy OriginRequestPolicy `xml:"OriginRequestPolicy" json:"origin_request_policy"`
}
OriginRequestPolicySummary is the per-item element within an OriginRequestPolicyList.
type OriginShield ¶
type OriginShield struct {
Enabled bool `xml:"Enabled" json:"enabled"`
OriginShieldRegion string `xml:"OriginShieldRegion,omitempty" json:"origin_shield_region,omitempty"`
}
OriginShield represents the OriginShield configuration for an origin.
type Origins ¶
type Origins struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []Origin `xml:"Items>Origin" json:"items"`
}
Origins holds the list of origins for a distribution.
type ParametersInCacheKeyAndForwardedToOrigin ¶
type ParametersInCacheKeyAndForwardedToOrigin struct {
EnableAcceptEncodingGzip bool `xml:"EnableAcceptEncodingGzip" json:"enable_accept_encoding_gzip"`
EnableAcceptEncodingBrotli bool `xml:"EnableAcceptEncodingBrotli" json:"enable_accept_encoding_brotli"`
CookiesConfig CachePolicyCookiesConfig `xml:"CookiesConfig" json:"cookies_config"`
HeadersConfig CachePolicyHeadersConfig `xml:"HeadersConfig" json:"headers_config"`
QueryStringsConfig CachePolicyQueryStringsConfig `xml:"QueryStringsConfig" json:"query_strings_config"`
}
ParametersInCacheKeyAndForwardedToOrigin controls what goes into the cache key.
type Paths ¶
type Paths struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []string `xml:"Items>Path,omitempty" json:"items,omitempty"`
}
Paths lists the object paths to invalidate.
type PublicKey ¶
type PublicKey struct {
ID string `json:"id"`
CreatedTime time.Time `json:"created_time"`
PublicKeyConfig PublicKeyConfig `json:"public_key_config"`
Version int `json:"version"`
}
PublicKey represents a CloudFront public key resource.
type PublicKeyConfig ¶
type PublicKeyConfig struct {
CallerReference string `xml:"CallerReference" json:"caller_reference"`
Name string `xml:"Name" json:"name"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
EncodedKey string `xml:"EncodedKey" json:"encoded_key"`
}
PublicKeyConfig holds the configuration for a public key.
type RealtimeLogConfig ¶
type RealtimeLogConfig struct {
ARN string `json:"arn"`
Name string `json:"name"`
SamplingRate int64 `json:"sampling_rate"`
Fields []string `json:"fields"`
EndPoints []EndPoint `json:"end_points"`
Version int `json:"version"`
}
RealtimeLogConfig represents a CloudFront realtime log configuration.
type RealtimeMetricsConfig ¶
type RealtimeMetricsConfig struct {
RealtimeMetricsSubscriptionStatus string `xml:"RealtimeMetricsSubscriptionStatus" json:"status"` // Enabled | Disabled
}
RealtimeMetricsConfig holds the realtime metrics subscription configuration.
type ReferrerPolicy ¶
type ReferrerPolicy struct {
ReferrerPolicy string `xml:"ReferrerPolicy" json:"referrer_policy"`
Override bool `xml:"Override" json:"override"`
}
ReferrerPolicy configures the Referrer-Policy header.
type ResponseCustomHeader ¶
type ResponseCustomHeader struct {
Header string `xml:"Header" json:"header"`
Value string `xml:"Value" json:"value"`
Override bool `xml:"Override" json:"override"`
}
ResponseCustomHeader is a single custom response header.
type ResponseCustomHeadersConfig ¶
type ResponseCustomHeadersConfig struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []ResponseCustomHeader `xml:"Items>ResponseCustomHeader,omitempty" json:"items,omitempty"`
}
ResponseCustomHeadersConfig holds custom headers injected into responses.
type ResponseHeadersPolicy ¶
type ResponseHeadersPolicy struct {
XMLName xml.Name `xml:"ResponseHeadersPolicy" json:"-"`
ID string `xml:"Id" json:"id"`
LastModifiedTime time.Time `xml:"LastModifiedTime" json:"last_modified_time"`
ResponseHeadersPolicyConfig ResponseHeadersPolicyConfig `xml:"ResponseHeadersPolicyConfig" json:"response_headers_policy_config"`
Version int `xml:"-" json:"version"`
}
ResponseHeadersPolicy represents a managed response headers policy.
type ResponseHeadersPolicyConfig ¶
type ResponseHeadersPolicyConfig struct {
Name string `xml:"Name" json:"name"`
Comment string `xml:"Comment,omitempty" json:"comment,omitempty"`
CorsConfig *CorsConfig `xml:"CorsConfig,omitempty" json:"cors_config,omitempty"`
SecurityHeadersConfig *SecurityHeadersConfig `xml:"SecurityHeadersConfig,omitempty" json:"security_headers_config,omitempty"`
CustomHeadersConfig *ResponseCustomHeadersConfig `xml:"CustomHeadersConfig,omitempty" json:"custom_headers_config,omitempty"`
}
ResponseHeadersPolicyConfig holds the configuration for a response headers policy.
type ResponseHeadersPolicyList ¶
type ResponseHeadersPolicyList struct {
XMLName xml.Name `xml:"ResponseHeadersPolicyList" json:"-"`
NextMarker string `xml:"NextMarker,omitempty" json:"next_marker,omitempty"`
MaxItems int `xml:"MaxItems" json:"max_items"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []ResponseHeadersPolicySummary `xml:"Items>ResponseHeadersPolicySummary,omitempty" json:"items,omitempty"`
}
ResponseHeadersPolicyList is the response envelope for ListResponseHeadersPolicies.
type ResponseHeadersPolicySummary ¶
type ResponseHeadersPolicySummary struct {
Type string `xml:"Type" json:"type"`
ResponseHeadersPolicy ResponseHeadersPolicy `xml:"ResponseHeadersPolicy" json:"response_headers_policy"`
}
ResponseHeadersPolicySummary is the per-item element within a ResponseHeadersPolicyList.
type Restrictions ¶
type Restrictions struct {
GeoRestriction GeoRestriction `xml:"GeoRestriction" json:"geo_restriction"`
}
Restrictions controls geo-restriction.
type S3OriginConfig ¶
type S3OriginConfig struct {
OriginAccessIdentity string `xml:"OriginAccessIdentity" json:"origin_access_identity"`
}
S3OriginConfig is used when the origin is an S3 bucket with legacy OAI.
type SecurityHeadersConfig ¶
type SecurityHeadersConfig struct {
ContentSecurityPolicy *ContentSecurityPolicy `xml:"ContentSecurityPolicy,omitempty" json:"content_security_policy,omitempty"`
ContentTypeOptions *ContentTypeOptions `xml:"ContentTypeOptions,omitempty" json:"content_type_options,omitempty"`
FrameOptions *FrameOptions `xml:"FrameOptions,omitempty" json:"frame_options,omitempty"`
ReferrerPolicy *ReferrerPolicy `xml:"ReferrerPolicy,omitempty" json:"referrer_policy,omitempty"`
StrictTransportSecurity *StrictTransportSecurity `xml:"StrictTransportSecurity,omitempty" json:"strict_transport_security,omitempty"`
XSSProtection *XSSProtection `xml:"XSSProtection,omitempty" json:"xss_protection,omitempty"`
}
SecurityHeadersConfig holds security header overrides.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements router.Service for CloudFront using REST paths.
func (*Service) HostRouteRewrite ¶
func (s *Service) HostRouteRewrite(r *http.Request, m middleware.HostRouteMatch)
HostRouteRewrite adapts a request on a distribution's real CloudFront hostname ({distributionId}.cloudfront.net) to the internal proxy route this file serves.
Unlike the other host-routed services the region is absent from the grammar: CloudFront is global, so the address is {id}.cloudfront.net with no region segment. middleware.ParseHostRoute already tolerates that — Region is optional — so "cloudfront" needs no special parsing, only this rewrite.
The ID is upper-cased because a Host is case-insensitive (RFC 3986 §3.2.2) and browsers lowercase it before sending, while a distribution ID is uppercase ("E" + 13 uppercase alphanumerics, generateDistributionID) and the store looks it up verbatim. Without this, pasting a minted DomainName into a browser 502s with `Distribution "e…" not found` while curl -H Host works. CloudFront is the only host-routed service whose IDs are not already lowercase, which is why only this rewrite needs to canonicalise.
func (*Service) RegisterRoutes ¶
RegisterRoutes satisfies router.Service. CloudFront uses /2020-05-31/* for the current API version.
type StagingDNSNames ¶
type StagingDNSNames struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []string `xml:"Items>DnsName,omitempty" json:"items,omitempty"`
}
StagingDNSNames holds the staging distribution DNS names.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store wraps state.Store with CloudFront-specific helpers.
func (*Store) DeleteAllInvalidations ¶
DeleteAllInvalidations removes every invalidation record for a distribution.
func (*Store) DeleteCachePolicy ¶
DeleteCachePolicy removes a cache policy by ID.
func (*Store) DeleteContinuousDeploymentPolicy ¶
DeleteContinuousDeploymentPolicy removes a continuous deployment policy by ID.
func (*Store) DeleteDistribution ¶
DeleteDistribution removes a distribution by ID.
func (*Store) DeleteFLEConfig ¶
DeleteFLEConfig removes a field-level encryption config by ID.
func (*Store) DeleteFLEProfile ¶
DeleteFLEProfile removes a field-level encryption profile by ID.
func (*Store) DeleteFunction ¶
DeleteFunction removes a CloudFront Function by name.
func (*Store) DeleteKeyGroup ¶
DeleteKeyGroup removes a key group by ID.
func (*Store) DeleteMonitoringSubscription ¶
DeleteMonitoringSubscription removes a monitoring subscription by distribution ID.
func (*Store) DeleteOriginRequestPolicy ¶
DeleteOriginRequestPolicy removes an origin request policy by ID.
func (*Store) DeletePublicKey ¶
DeletePublicKey removes a public key by ID.
func (*Store) DeleteRealtimeLogConfig ¶
DeleteRealtimeLogConfig removes a realtime log config by name.
func (*Store) DeleteResponseHeadersPolicy ¶
DeleteResponseHeadersPolicy removes a response headers policy by ID.
func (*Store) DeleteTags ¶
DeleteTags removes all tags for a resource ARN.
func (*Store) FindByCallerRef ¶
FindByCallerRef scans distributions to find one with a matching CallerReference. Returns nil, nil if no match is found.
func (*Store) GetCachePolicy ¶
GetCachePolicy retrieves a cache policy by ID.
func (*Store) GetContinuousDeploymentPolicy ¶
func (st *Store) GetContinuousDeploymentPolicy(ctx context.Context, id string) (*ContinuousDeploymentPolicy, error)
GetContinuousDeploymentPolicy retrieves a continuous deployment policy by ID.
func (*Store) GetDistribution ¶
GetDistribution retrieves a distribution by ID.
func (*Store) GetFLEConfig ¶
GetFLEConfig retrieves a field-level encryption config by ID.
func (*Store) GetFLEProfile ¶
GetFLEProfile retrieves a field-level encryption profile by ID.
func (*Store) GetFunction ¶
GetFunction retrieves a CloudFront Function by name.
func (*Store) GetFunctionByARN ¶
GetFunctionByARN returns the function with the given ARN, or nil if not found. ARN format: arn:aws:cloudfront::{accountID}:function/{name}. Only the trailing name is matched, so any account ID resolves.
func (*Store) GetInvalidation ¶
GetInvalidation retrieves an invalidation by distribution ID and invalidation ID.
func (*Store) GetKeyGroup ¶
GetKeyGroup retrieves a key group by ID.
func (*Store) GetMonitoringSubscription ¶
func (st *Store) GetMonitoringSubscription(ctx context.Context, distID string) (*MonitoringSubscription, error)
GetMonitoringSubscription retrieves a monitoring subscription by distribution ID.
func (*Store) GetOriginRequestPolicy ¶
func (st *Store) GetOriginRequestPolicy(ctx context.Context, id string) (*OriginRequestPolicy, error)
GetOriginRequestPolicy retrieves an origin request policy by ID.
func (*Store) GetPublicKey ¶
GetPublicKey retrieves a public key by ID.
func (*Store) GetRealtimeLogConfig ¶
GetRealtimeLogConfig retrieves a realtime log config by name.
func (*Store) GetResponseHeadersPolicy ¶
func (st *Store) GetResponseHeadersPolicy(ctx context.Context, id string) (*ResponseHeadersPolicy, error)
GetResponseHeadersPolicy retrieves a response headers policy by ID.
func (*Store) ListCachePolicies ¶
func (st *Store) ListCachePolicies(ctx context.Context) ([]*CachePolicy, error)
ListCachePolicies returns all cache policies.
func (*Store) ListContinuousDeploymentPolicies ¶
func (st *Store) ListContinuousDeploymentPolicies(ctx context.Context) ([]*ContinuousDeploymentPolicy, error)
ListContinuousDeploymentPolicies returns all continuous deployment policies.
func (*Store) ListDistributions ¶
func (st *Store) ListDistributions(ctx context.Context) ([]*Distribution, error)
ListDistributions returns all distributions.
func (*Store) ListFLEConfigs ¶
ListFLEConfigs returns all field-level encryption configs.
func (*Store) ListFLEProfiles ¶
func (st *Store) ListFLEProfiles(ctx context.Context) ([]*FLEProfile, error)
ListFLEProfiles returns all field-level encryption profiles.
func (*Store) ListFunctions ¶
func (st *Store) ListFunctions(ctx context.Context) ([]*CloudFrontFunction, error)
ListFunctions returns all CloudFront Functions.
func (*Store) ListInvalidations ¶
ListInvalidations returns all invalidations for a distribution.
func (*Store) ListKeyGroups ¶
ListKeyGroups returns all key groups.
func (*Store) ListOACs ¶
func (st *Store) ListOACs(ctx context.Context) ([]*OriginAccessControl, error)
ListOACs returns all origin access controls.
func (*Store) ListOAIs ¶
func (st *Store) ListOAIs(ctx context.Context) ([]*CloudFrontOriginAccessIdentity, error)
ListOAIs returns all legacy origin access identities.
func (*Store) ListOriginRequestPolicies ¶
func (st *Store) ListOriginRequestPolicies(ctx context.Context) ([]*OriginRequestPolicy, error)
ListOriginRequestPolicies returns all origin request policies.
func (*Store) ListPublicKeys ¶
ListPublicKeys returns all public keys.
func (*Store) ListRealtimeLogConfigs ¶
func (st *Store) ListRealtimeLogConfigs(ctx context.Context) ([]*RealtimeLogConfig, error)
ListRealtimeLogConfigs returns all realtime log configs.
func (*Store) ListResponseHeadersPolicies ¶
func (st *Store) ListResponseHeadersPolicies(ctx context.Context) ([]*ResponseHeadersPolicy, error)
ListResponseHeadersPolicies returns all response headers policies.
func (*Store) PutCachePolicy ¶
func (st *Store) PutCachePolicy(ctx context.Context, cp *CachePolicy) error
PutCachePolicy persists a cache policy.
func (*Store) PutContinuousDeploymentPolicy ¶
func (st *Store) PutContinuousDeploymentPolicy(ctx context.Context, p *ContinuousDeploymentPolicy) error
PutContinuousDeploymentPolicy persists a continuous deployment policy.
func (*Store) PutDistribution ¶
func (st *Store) PutDistribution(ctx context.Context, d *Distribution) error
PutDistribution persists a distribution.
func (*Store) PutFLEConfig ¶
PutFLEConfig persists a field-level encryption config.
func (*Store) PutFLEProfile ¶
func (st *Store) PutFLEProfile(ctx context.Context, p *FLEProfile) error
PutFLEProfile persists a field-level encryption profile.
func (*Store) PutFunction ¶
func (st *Store) PutFunction(ctx context.Context, f *CloudFrontFunction) error
PutFunction persists a CloudFront Function.
func (*Store) PutInvalidation ¶
PutInvalidation persists an invalidation scoped to a distribution.
func (*Store) PutKeyGroup ¶
PutKeyGroup persists a key group.
func (*Store) PutMonitoringSubscription ¶
func (st *Store) PutMonitoringSubscription(ctx context.Context, distID string, ms *MonitoringSubscription) error
PutMonitoringSubscription persists a monitoring subscription.
func (*Store) PutOAC ¶
func (st *Store) PutOAC(ctx context.Context, oac *OriginAccessControl) error
PutOAC persists an origin access control.
func (*Store) PutOAI ¶
func (st *Store) PutOAI(ctx context.Context, oai *CloudFrontOriginAccessIdentity) error
PutOAI persists a legacy origin access identity.
func (*Store) PutOriginRequestPolicy ¶
func (st *Store) PutOriginRequestPolicy(ctx context.Context, p *OriginRequestPolicy) error
PutOriginRequestPolicy persists an origin request policy.
func (*Store) PutPublicKey ¶
PutPublicKey persists a public key.
func (*Store) PutRealtimeLogConfig ¶
func (st *Store) PutRealtimeLogConfig(ctx context.Context, rlc *RealtimeLogConfig) error
PutRealtimeLogConfig persists a realtime log config.
func (*Store) PutResponseHeadersPolicy ¶
func (st *Store) PutResponseHeadersPolicy(ctx context.Context, p *ResponseHeadersPolicy) error
PutResponseHeadersPolicy persists a response headers policy.
type StrictTransportSecurity ¶
type StrictTransportSecurity struct {
AccessControlMaxAgeSec int `xml:"AccessControlMaxAgeSec" json:"access_control_max_age_sec"`
IncludeSubdomains bool `xml:"IncludeSubdomains" json:"include_subdomains"`
Preload bool `xml:"Preload" json:"preload"`
Override bool `xml:"Override" json:"override"`
}
StrictTransportSecurity configures the Strict-Transport-Security header.
type StringList ¶
type StringList struct {
Quantity int `xml:"Quantity" json:"quantity"`
Items []string `xml:"Items>Item,omitempty" json:"items,omitempty"`
}
StringList is a generic Quantity + Items wrapper used by Aliases, OriginSslProtocols, Headers, WhitelistedNames, etc.
type TagKeys ¶
type TagKeys struct {
XMLName xml.Name `xml:"TagKeys" json:"-"`
Items []string `xml:"Items>Key,omitempty" json:"items,omitempty"`
}
TagKeys is used in UntagResource requests.
type Tagging ¶
type Tagging struct {
XMLName xml.Name `xml:"Tagging" json:"-"`
Tags Tags `xml:"Tags" json:"tags"`
}
Tagging is the response envelope for ListTagsForResource.
type Tags ¶
type Tags struct {
XMLName xml.Name `xml:"Tags" json:"-"`
Items []Tag `xml:"Items>Tag,omitempty" json:"items,omitempty"`
}
Tags is the container for resource tags.
type TrustedEntities ¶
type TrustedEntities struct {
Enabled bool `xml:"Enabled" json:"enabled"`
Quantity int `xml:"Quantity" json:"quantity"`
Items []string `xml:"Items>AwsAccountNumber,omitempty" json:"items,omitempty"`
}
TrustedEntities represents TrustedSigners or TrustedKeyGroups.
type ViewerCertificate ¶
type ViewerCertificate struct {
CloudFrontDefaultCertificate *bool `xml:"CloudFrontDefaultCertificate,omitempty" json:"cloudfront_default_certificate,omitempty"`
ACMCertificateArn string `xml:"ACMCertificateArn,omitempty" json:"acm_certificate_arn,omitempty"`
IAMCertificateId string `xml:"IAMCertificateId,omitempty" json:"iam_certificate_id,omitempty"`
SSLSupportMethod string `xml:"SSLSupportMethod,omitempty" json:"ssl_support_method,omitempty"`
MinimumProtocolVersion string `xml:"MinimumProtocolVersion,omitempty" json:"minimum_protocol_version,omitempty"`
}
ViewerCertificate controls the SSL/TLS certificate for the distribution.
type XSSProtection ¶
type XSSProtection struct {
ModeBlock bool `xml:"ModeBlock" json:"mode_block"`
Protection bool `xml:"Protection" json:"protection"`
ReportUri string `xml:"ReportUri,omitempty" json:"report_uri,omitempty"`
Override bool `xml:"Override" json:"override"`
}
XSSProtection configures the X-XSS-Protection header.