0% found this document useful (0 votes)
4 views444 pages

Cloudfront API

The Amazon CloudFront API Reference document provides detailed information on various API actions, including creating, deleting, and retrieving configurations for cache policies, distributions, and encryption profiles. It outlines request syntax, parameters, response elements, and potential errors for each action. This reference is essential for developers working with Amazon CloudFront services.

Uploaded by

monirforever
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views444 pages

Cloudfront API

The Amazon CloudFront API Reference document provides detailed information on various API actions, including creating, deleting, and retrieving configurations for cache policies, distributions, and encryption profiles. It outlines request syntax, parameters, response elements, and potential errors for each action. This reference is essential for developers working with Amazon CloudFront services.

Uploaded by

monirforever
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Amazon CloudFront

API Reference
API Version 2020-05-31
Amazon CloudFront API Reference

Amazon CloudFront: API Reference


Copyright © 2020 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
Amazon CloudFront API Reference

Table of Contents
Welcome ........................................................................................................................................... 1
Actions ............................................................................................................................................. 2
CreateCachePolicy ...................................................................................................................... 4
Request Syntax .................................................................................................................. 4
URI Request Parameters ...................................................................................................... 5
Request Body .................................................................................................................... 5
Response Syntax ................................................................................................................ 6
Response Elements ............................................................................................................. 7
Errors ............................................................................................................................... 7
See Also ............................................................................................................................ 8
CreateCloudFrontOriginAccessIdentity ........................................................................................... 9
Request Syntax .................................................................................................................. 9
URI Request Parameters ...................................................................................................... 9
Request Body .................................................................................................................... 9
Response Syntax .............................................................................................................. 10
Response Elements ........................................................................................................... 10
Errors .............................................................................................................................. 10
See Also .......................................................................................................................... 11
CreateDistribution .................................................................................................................... 12
Request Syntax ................................................................................................................ 12
URI Request Parameters .................................................................................................... 16
Request Body ................................................................................................................... 16
Response Syntax .............................................................................................................. 20
Response Elements ........................................................................................................... 24
Errors .............................................................................................................................. 25
See Also .......................................................................................................................... 30
CreateDistributionWithTags ........................................................................................................ 31
Request Syntax ................................................................................................................ 31
URI Request Parameters .................................................................................................... 35
Request Body ................................................................................................................... 35
Response Syntax .............................................................................................................. 35
Response Elements ........................................................................................................... 40
Errors .............................................................................................................................. 41
See Also .......................................................................................................................... 45
CreateFieldLevelEncryptionConfig ............................................................................................... 47
Request Syntax ................................................................................................................ 47
URI Request Parameters .................................................................................................... 47
Request Body ................................................................................................................... 47
Response Syntax .............................................................................................................. 48
Response Elements ........................................................................................................... 49
Errors .............................................................................................................................. 49
See Also .......................................................................................................................... 50
CreateFieldLevelEncryptionProfile ............................................................................................... 51
Request Syntax ................................................................................................................ 51
URI Request Parameters .................................................................................................... 51
Request Body ................................................................................................................... 51
Response Syntax .............................................................................................................. 52
Response Elements ........................................................................................................... 52
Errors .............................................................................................................................. 53
See Also .......................................................................................................................... 54
CreateInvalidation .................................................................................................................... 55
Request Syntax ................................................................................................................ 55
URI Request Parameters .................................................................................................... 55
Request Body ................................................................................................................... 55

API Version 2020-05-31


iii
Amazon CloudFront API Reference

Response Syntax .............................................................................................................. 56


Response Elements ........................................................................................................... 56
Errors .............................................................................................................................. 56
See Also .......................................................................................................................... 57
CreateMonitoringSubscription .................................................................................................... 58
Request Syntax ................................................................................................................ 58
URI Request Parameters .................................................................................................... 58
Request Body ................................................................................................................... 58
Response Syntax .............................................................................................................. 58
Response Elements ........................................................................................................... 58
Errors .............................................................................................................................. 59
See Also .......................................................................................................................... 59
CreateOriginRequestPolicy ......................................................................................................... 60
Request Syntax ................................................................................................................ 60
URI Request Parameters .................................................................................................... 61
Request Body ................................................................................................................... 61
Response Syntax .............................................................................................................. 61
Response Elements ........................................................................................................... 62
Errors .............................................................................................................................. 63
See Also .......................................................................................................................... 63
CreatePublicKey ....................................................................................................................... 65
Request Syntax ................................................................................................................ 65
URI Request Parameters .................................................................................................... 65
Request Body ................................................................................................................... 65
Response Syntax .............................................................................................................. 66
Response Elements ........................................................................................................... 66
Errors .............................................................................................................................. 66
See Also .......................................................................................................................... 67
CreateRealtimeLogConfig .......................................................................................................... 68
Request Syntax ................................................................................................................ 68
URI Request Parameters .................................................................................................... 68
Request Body ................................................................................................................... 68
Response Syntax .............................................................................................................. 69
Response Elements ........................................................................................................... 69
Errors .............................................................................................................................. 70
See Also .......................................................................................................................... 70
CreateStreamingDistribution ...................................................................................................... 71
Request Syntax ................................................................................................................ 71
URI Request Parameters .................................................................................................... 72
Request Body ................................................................................................................... 72
Response Syntax .............................................................................................................. 73
Response Elements ........................................................................................................... 74
Errors .............................................................................................................................. 75
See Also .......................................................................................................................... 76
CreateStreamingDistributionWithTags ......................................................................................... 77
Request Syntax ................................................................................................................ 77
URI Request Parameters .................................................................................................... 77
Request Body ................................................................................................................... 77
Response Syntax .............................................................................................................. 78
Response Elements ........................................................................................................... 79
Errors .............................................................................................................................. 80
See Also .......................................................................................................................... 81
DeleteCachePolicy .................................................................................................................... 82
Request Syntax ................................................................................................................ 82
URI Request Parameters .................................................................................................... 82
Request Body ................................................................................................................... 82
Response Syntax .............................................................................................................. 82

API Version 2020-05-31


iv
Amazon CloudFront API Reference

Response Elements ........................................................................................................... 82


Errors .............................................................................................................................. 82
See Also .......................................................................................................................... 83
DeleteCloudFrontOriginAccessIdentity ......................................................................................... 84
Request Syntax ................................................................................................................ 84
URI Request Parameters .................................................................................................... 84
Request Body ................................................................................................................... 84
Response Syntax .............................................................................................................. 84
Response Elements ........................................................................................................... 84
Errors .............................................................................................................................. 84
See Also .......................................................................................................................... 85
DeleteDistribution .................................................................................................................... 86
Request Syntax ................................................................................................................ 86
URI Request Parameters .................................................................................................... 86
Request Body ................................................................................................................... 86
Response Syntax .............................................................................................................. 86
Response Elements ........................................................................................................... 86
Errors .............................................................................................................................. 86
See Also .......................................................................................................................... 87
DeleteFieldLevelEncryptionConfig ............................................................................................... 88
Request Syntax ................................................................................................................ 88
URI Request Parameters .................................................................................................... 88
Request Body ................................................................................................................... 88
Response Syntax .............................................................................................................. 88
Response Elements ........................................................................................................... 88
Errors .............................................................................................................................. 88
See Also .......................................................................................................................... 89
DeleteFieldLevelEncryptionProfile ............................................................................................... 90
Request Syntax ................................................................................................................ 90
URI Request Parameters .................................................................................................... 90
Request Body ................................................................................................................... 90
Response Syntax .............................................................................................................. 90
Response Elements ........................................................................................................... 90
Errors .............................................................................................................................. 90
See Also .......................................................................................................................... 91
DeleteMonitoringSubscription .................................................................................................... 92
Request Syntax ................................................................................................................ 92
URI Request Parameters .................................................................................................... 92
Request Body ................................................................................................................... 92
Response Syntax .............................................................................................................. 92
Response Elements ........................................................................................................... 92
Errors .............................................................................................................................. 92
See Also .......................................................................................................................... 92
DeleteOriginRequestPolicy ......................................................................................................... 94
Request Syntax ................................................................................................................ 94
URI Request Parameters .................................................................................................... 94
Request Body ................................................................................................................... 94
Response Syntax .............................................................................................................. 94
Response Elements ........................................................................................................... 94
Errors .............................................................................................................................. 94
See Also .......................................................................................................................... 95
DeletePublicKey ....................................................................................................................... 96
Request Syntax ................................................................................................................ 96
URI Request Parameters .................................................................................................... 96
Request Body ................................................................................................................... 96
Response Syntax .............................................................................................................. 96
Response Elements ........................................................................................................... 96

API Version 2020-05-31


v
Amazon CloudFront API Reference

Errors .............................................................................................................................. 96
See Also .......................................................................................................................... 97
DeleteRealtimeLogConfig .......................................................................................................... 98
Request Syntax ................................................................................................................ 98
URI Request Parameters .................................................................................................... 98
Request Body ................................................................................................................... 98
Response Syntax .............................................................................................................. 98
Response Elements ........................................................................................................... 99
Errors .............................................................................................................................. 99
See Also .......................................................................................................................... 99
DeleteStreamingDistribution .................................................................................................... 100
Request Syntax .............................................................................................................. 100
URI Request Parameters .................................................................................................. 100
Request Body ................................................................................................................. 100
Response Syntax ............................................................................................................ 101
Response Elements ......................................................................................................... 101
Errors ............................................................................................................................ 101
See Also ........................................................................................................................ 101
GetCachePolicy ....................................................................................................................... 103
Request Syntax .............................................................................................................. 103
URI Request Parameters .................................................................................................. 103
Request Body ................................................................................................................. 103
Response Syntax ............................................................................................................ 103
Response Elements ......................................................................................................... 104
Errors ............................................................................................................................ 104
See Also ........................................................................................................................ 105
GetCachePolicyConfig ............................................................................................................. 106
Request Syntax .............................................................................................................. 106
URI Request Parameters .................................................................................................. 106
Request Body ................................................................................................................. 106
Response Syntax ............................................................................................................ 106
Response Elements ......................................................................................................... 107
Errors ............................................................................................................................ 108
See Also ........................................................................................................................ 108
GetCloudFrontOriginAccessIdentity ........................................................................................... 109
Request Syntax .............................................................................................................. 109
URI Request Parameters .................................................................................................. 109
Request Body ................................................................................................................. 109
Response Syntax ............................................................................................................ 109
Response Elements ......................................................................................................... 109
Errors ............................................................................................................................ 110
See Also ........................................................................................................................ 110
GetCloudFrontOriginAccessIdentityConfig .................................................................................. 111
Request Syntax .............................................................................................................. 111
URI Request Parameters .................................................................................................. 111
Request Body ................................................................................................................. 111
Response Syntax ............................................................................................................ 111
Response Elements ......................................................................................................... 111
Errors ............................................................................................................................ 112
See Also ........................................................................................................................ 112
GetDistribution ....................................................................................................................... 113
Request Syntax .............................................................................................................. 113
URI Request Parameters .................................................................................................. 113
Request Body ................................................................................................................. 113
Response Syntax ............................................................................................................ 113
Response Elements ......................................................................................................... 117
Errors ............................................................................................................................ 119

API Version 2020-05-31


vi
Amazon CloudFront API Reference

See Also ........................................................................................................................ 119


GetDistributionConfig .............................................................................................................. 120
Request Syntax .............................................................................................................. 120
URI Request Parameters .................................................................................................. 120
Request Body ................................................................................................................. 120
Response Syntax ............................................................................................................ 120
Response Elements ......................................................................................................... 124
Errors ............................................................................................................................ 127
See Also ........................................................................................................................ 128
GetFieldLevelEncryption .......................................................................................................... 129
Request Syntax .............................................................................................................. 129
URI Request Parameters .................................................................................................. 129
Request Body ................................................................................................................. 129
Response Syntax ............................................................................................................ 129
Response Elements ......................................................................................................... 130
Errors ............................................................................................................................ 130
See Also ........................................................................................................................ 130
GetFieldLevelEncryptionConfig ................................................................................................. 132
Request Syntax .............................................................................................................. 132
URI Request Parameters .................................................................................................. 132
Request Body ................................................................................................................. 132
Response Syntax ............................................................................................................ 132
Response Elements ......................................................................................................... 133
Errors ............................................................................................................................ 133
See Also ........................................................................................................................ 133
GetFieldLevelEncryptionProfile ................................................................................................. 135
Request Syntax .............................................................................................................. 135
URI Request Parameters .................................................................................................. 135
Request Body ................................................................................................................. 135
Response Syntax ............................................................................................................ 135
Response Elements ......................................................................................................... 135
Errors ............................................................................................................................ 136
See Also ........................................................................................................................ 136
GetFieldLevelEncryptionProfileConfig ........................................................................................ 138
Request Syntax .............................................................................................................. 138
URI Request Parameters .................................................................................................. 138
Request Body ................................................................................................................. 138
Response Syntax ............................................................................................................ 138
Response Elements ......................................................................................................... 138
Errors ............................................................................................................................ 139
See Also ........................................................................................................................ 139
GetInvalidation ....................................................................................................................... 140
Request Syntax .............................................................................................................. 140
URI Request Parameters .................................................................................................. 140
Request Body ................................................................................................................. 140
Response Syntax ............................................................................................................ 140
Response Elements ......................................................................................................... 140
Errors ............................................................................................................................ 141
See Also ........................................................................................................................ 141
GetMonitoringSubscription ...................................................................................................... 143
Request Syntax .............................................................................................................. 143
URI Request Parameters .................................................................................................. 143
Request Body ................................................................................................................. 143
Response Syntax ............................................................................................................ 143
Response Elements ......................................................................................................... 143
Errors ............................................................................................................................ 143
See Also ........................................................................................................................ 144

API Version 2020-05-31


vii
Amazon CloudFront API Reference

GetOriginRequestPolicy ........................................................................................................... 145


Request Syntax .............................................................................................................. 145
URI Request Parameters .................................................................................................. 145
Request Body ................................................................................................................. 145
Response Syntax ............................................................................................................ 145
Response Elements ......................................................................................................... 146
Errors ............................................................................................................................ 146
See Also ........................................................................................................................ 147
GetOriginRequestPolicyConfig .................................................................................................. 148
Request Syntax .............................................................................................................. 148
URI Request Parameters .................................................................................................. 148
Request Body ................................................................................................................. 148
Response Syntax ............................................................................................................ 148
Response Elements ......................................................................................................... 149
Errors ............................................................................................................................ 149
See Also ........................................................................................................................ 150
GetPublicKey .......................................................................................................................... 151
Request Syntax .............................................................................................................. 151
URI Request Parameters .................................................................................................. 151
Request Body ................................................................................................................. 151
Response Syntax ............................................................................................................ 151
Response Elements ......................................................................................................... 151
Errors ............................................................................................................................ 152
See Also ........................................................................................................................ 152
GetPublicKeyConfig ................................................................................................................. 153
Request Syntax .............................................................................................................. 153
URI Request Parameters .................................................................................................. 153
Request Body ................................................................................................................. 153
Response Syntax ............................................................................................................ 153
Response Elements ......................................................................................................... 153
Errors ............................................................................................................................ 154
See Also ........................................................................................................................ 154
GetRealtimeLogConfig ............................................................................................................. 155
Request Syntax .............................................................................................................. 155
URI Request Parameters .................................................................................................. 155
Request Body ................................................................................................................. 155
Response Syntax ............................................................................................................ 155
Response Elements ......................................................................................................... 156
Errors ............................................................................................................................ 156
See Also ........................................................................................................................ 156
GetStreamingDistribution ........................................................................................................ 158
Request Syntax .............................................................................................................. 158
URI Request Parameters .................................................................................................. 158
Request Body ................................................................................................................. 158
Response Syntax ............................................................................................................ 158
Response Elements ......................................................................................................... 159
Errors ............................................................................................................................ 160
See Also ........................................................................................................................ 160
GetStreamingDistributionConfig ............................................................................................... 161
Request Syntax .............................................................................................................. 161
URI Request Parameters .................................................................................................. 161
Request Body ................................................................................................................. 161
Response Syntax ............................................................................................................ 161
Response Elements ......................................................................................................... 162
Errors ............................................................................................................................ 163
See Also ........................................................................................................................ 163
ListCachePolicies ..................................................................................................................... 164

API Version 2020-05-31


viii
Amazon CloudFront API Reference

Request Syntax .............................................................................................................. 164


URI Request Parameters .................................................................................................. 164
Request Body ................................................................................................................. 164
Response Syntax ............................................................................................................ 164
Response Elements ......................................................................................................... 165
Errors ............................................................................................................................ 166
See Also ........................................................................................................................ 166
ListCloudFrontOriginAccessIdentities ......................................................................................... 167
Request Syntax .............................................................................................................. 167
URI Request Parameters .................................................................................................. 167
Request Body ................................................................................................................. 167
Response Syntax ............................................................................................................ 167
Response Elements ......................................................................................................... 167
Errors ............................................................................................................................ 168
See Also ........................................................................................................................ 168
ListDistributions ..................................................................................................................... 170
Request Syntax .............................................................................................................. 170
URI Request Parameters .................................................................................................. 170
Request Body ................................................................................................................. 170
Response Syntax ............................................................................................................ 170
Response Elements ......................................................................................................... 174
Errors ............................................................................................................................ 175
See Also ........................................................................................................................ 175
ListDistributionsByCachePolicyId ............................................................................................... 176
Request Syntax .............................................................................................................. 176
URI Request Parameters .................................................................................................. 176
Request Body ................................................................................................................. 176
Response Syntax ............................................................................................................ 176
Response Elements ......................................................................................................... 177
Errors ............................................................................................................................ 177
See Also ........................................................................................................................ 178
ListDistributionsByOriginRequestPolicyId ................................................................................... 179
Request Syntax .............................................................................................................. 179
URI Request Parameters .................................................................................................. 179
Request Body ................................................................................................................. 179
Response Syntax ............................................................................................................ 179
Response Elements ......................................................................................................... 180
Errors ............................................................................................................................ 180
See Also ........................................................................................................................ 181
ListDistributionsByRealtimeLogConfig ....................................................................................... 182
Request Syntax .............................................................................................................. 182
URI Request Parameters .................................................................................................. 182
Request Body ................................................................................................................. 182
Response Syntax ............................................................................................................ 183
Response Elements ......................................................................................................... 187
Errors ............................................................................................................................ 188
See Also ........................................................................................................................ 188
ListDistributionsByWebACLId .................................................................................................... 189
Request Syntax .............................................................................................................. 189
URI Request Parameters .................................................................................................. 189
Request Body ................................................................................................................. 189
Response Syntax ............................................................................................................ 189
Response Elements ......................................................................................................... 193
Errors ............................................................................................................................ 194
See Also ........................................................................................................................ 194
ListFieldLevelEncryptionConfigs ................................................................................................ 196
Request Syntax .............................................................................................................. 196

API Version 2020-05-31


ix
Amazon CloudFront API Reference

URI Request Parameters .................................................................................................. 196


Request Body ................................................................................................................. 196
Response Syntax ............................................................................................................ 196
Response Elements ......................................................................................................... 197
Errors ............................................................................................................................ 197
See Also ........................................................................................................................ 198
ListFieldLevelEncryptionProfiles ................................................................................................ 199
Request Syntax .............................................................................................................. 199
URI Request Parameters .................................................................................................. 199
Request Body ................................................................................................................. 199
Response Syntax ............................................................................................................ 199
Response Elements ......................................................................................................... 200
Errors ............................................................................................................................ 200
See Also ........................................................................................................................ 200
ListInvalidations ..................................................................................................................... 202
Request Syntax .............................................................................................................. 202
URI Request Parameters .................................................................................................. 202
Request Body ................................................................................................................. 202
Response Syntax ............................................................................................................ 202
Response Elements ......................................................................................................... 202
Errors ............................................................................................................................ 203
See Also ........................................................................................................................ 204
ListOriginRequestPolicies ......................................................................................................... 205
Request Syntax .............................................................................................................. 205
URI Request Parameters .................................................................................................. 205
Request Body ................................................................................................................. 205
Response Syntax ............................................................................................................ 205
Response Elements ......................................................................................................... 206
Errors ............................................................................................................................ 207
See Also ........................................................................................................................ 207
ListPublicKeys ........................................................................................................................ 208
Request Syntax .............................................................................................................. 208
URI Request Parameters .................................................................................................. 208
Request Body ................................................................................................................. 208
Response Syntax ............................................................................................................ 208
Response Elements ......................................................................................................... 208
Errors ............................................................................................................................ 209
See Also ........................................................................................................................ 209
ListRealtimeLogConfigs ........................................................................................................... 210
Request Syntax .............................................................................................................. 210
URI Request Parameters .................................................................................................. 210
Request Body ................................................................................................................. 210
Response Syntax ............................................................................................................ 210
Response Elements ......................................................................................................... 211
Errors ............................................................................................................................ 211
See Also ........................................................................................................................ 211
ListStreamingDistributions ....................................................................................................... 213
Request Syntax .............................................................................................................. 213
URI Request Parameters .................................................................................................. 213
Request Body ................................................................................................................. 213
Response Syntax ............................................................................................................ 213
Response Elements ......................................................................................................... 214
Errors ............................................................................................................................ 214
See Also ........................................................................................................................ 215
ListTagsForResource ................................................................................................................ 216
Request Syntax .............................................................................................................. 216
URI Request Parameters .................................................................................................. 216

API Version 2020-05-31


x
Amazon CloudFront API Reference

Request Body ................................................................................................................. 216


Response Syntax ............................................................................................................ 216
Response Elements ......................................................................................................... 216
Errors ............................................................................................................................ 217
See Also ........................................................................................................................ 217
TagResource ........................................................................................................................... 218
Request Syntax .............................................................................................................. 218
URI Request Parameters .................................................................................................. 218
Request Body ................................................................................................................. 218
Response Syntax ............................................................................................................ 218
Response Elements ......................................................................................................... 218
Errors ............................................................................................................................ 218
See Also ........................................................................................................................ 219
UntagResource ....................................................................................................................... 220
Request Syntax .............................................................................................................. 220
URI Request Parameters .................................................................................................. 220
Request Body ................................................................................................................. 220
Response Syntax ............................................................................................................ 220
Response Elements ......................................................................................................... 220
Errors ............................................................................................................................ 220
See Also ........................................................................................................................ 221
UpdateCachePolicy ................................................................................................................. 222
Request Syntax .............................................................................................................. 222
URI Request Parameters .................................................................................................. 222
Request Body ................................................................................................................. 223
Response Syntax ............................................................................................................ 224
Response Elements ......................................................................................................... 224
Errors ............................................................................................................................ 225
See Also ........................................................................................................................ 226
UpdateCloudFrontOriginAccessIdentity ...................................................................................... 227
Request Syntax .............................................................................................................. 227
URI Request Parameters .................................................................................................. 227
Request Body ................................................................................................................. 227
Response Syntax ............................................................................................................ 227
Response Elements ......................................................................................................... 228
Errors ............................................................................................................................ 228
See Also ........................................................................................................................ 229
UpdateDistribution ................................................................................................................. 230
Request Syntax .............................................................................................................. 230
URI Request Parameters .................................................................................................. 234
Request Body ................................................................................................................. 234
Response Syntax ............................................................................................................ 238
Response Elements ......................................................................................................... 243
Errors ............................................................................................................................ 244
See Also ........................................................................................................................ 248
UpdateFieldLevelEncryptionConfig ............................................................................................ 250
Request Syntax .............................................................................................................. 250
URI Request Parameters .................................................................................................. 250
Request Body ................................................................................................................. 250
Response Syntax ............................................................................................................ 251
Response Elements ......................................................................................................... 252
Errors ............................................................................................................................ 252
See Also ........................................................................................................................ 253
UpdateFieldLevelEncryptionProfile ............................................................................................ 254
Request Syntax .............................................................................................................. 254
URI Request Parameters .................................................................................................. 254
Request Body ................................................................................................................. 254

API Version 2020-05-31


xi
Amazon CloudFront API Reference

Response Syntax ............................................................................................................ 255


Response Elements ......................................................................................................... 255
Errors ............................................................................................................................ 256
See Also ........................................................................................................................ 257
UpdateOriginRequestPolicy ...................................................................................................... 258
Request Syntax .............................................................................................................. 258
URI Request Parameters .................................................................................................. 258
Request Body ................................................................................................................. 258
Response Syntax ............................................................................................................ 259
Response Elements ......................................................................................................... 260
Errors ............................................................................................................................ 260
See Also ........................................................................................................................ 261
UpdatePublicKey .................................................................................................................... 263
Request Syntax .............................................................................................................. 263
URI Request Parameters .................................................................................................. 263
Request Body ................................................................................................................. 263
Response Syntax ............................................................................................................ 264
Response Elements ......................................................................................................... 264
Errors ............................................................................................................................ 264
See Also ........................................................................................................................ 265
UpdateRealtimeLogConfig ....................................................................................................... 266
Request Syntax .............................................................................................................. 266
URI Request Parameters .................................................................................................. 266
Request Body ................................................................................................................. 266
Response Syntax ............................................................................................................ 267
Response Elements ......................................................................................................... 268
Errors ............................................................................................................................ 268
See Also ........................................................................................................................ 268
UpdateStreamingDistribution ................................................................................................... 269
Request Syntax .............................................................................................................. 269
URI Request Parameters .................................................................................................. 269
Request Body ................................................................................................................. 269
Response Syntax ............................................................................................................ 271
Response Elements ......................................................................................................... 272
Errors ............................................................................................................................ 273
See Also ........................................................................................................................ 274
Data Types .................................................................................................................................... 275
ActiveTrustedSigners ............................................................................................................... 278
Contents ........................................................................................................................ 278
See Also ........................................................................................................................ 278
Aliases ................................................................................................................................... 279
Contents ........................................................................................................................ 279
See Also ........................................................................................................................ 279
AliasICPRecordal ..................................................................................................................... 280
Contents ........................................................................................................................ 280
See Also ........................................................................................................................ 280
AllowedMethods ..................................................................................................................... 281
Contents ........................................................................................................................ 281
See Also ........................................................................................................................ 281
CacheBehavior ........................................................................................................................ 283
Contents ........................................................................................................................ 283
See Also ........................................................................................................................ 287
CacheBehaviors ...................................................................................................................... 288
Contents ........................................................................................................................ 288
See Also ........................................................................................................................ 288
CachedMethods ...................................................................................................................... 289
Contents ........................................................................................................................ 289

API Version 2020-05-31


xii
Amazon CloudFront API Reference

See Also ........................................................................................................................ 289


CachePolicy ............................................................................................................................ 290
Contents ........................................................................................................................ 290
See Also ........................................................................................................................ 290
CachePolicyConfig .................................................................................................................. 291
Contents ........................................................................................................................ 291
See Also ........................................................................................................................ 292
CachePolicyCookiesConfig ........................................................................................................ 293
Contents ........................................................................................................................ 293
See Also ........................................................................................................................ 293
CachePolicyHeadersConfig ....................................................................................................... 294
Contents ........................................................................................................................ 294
See Also ........................................................................................................................ 294
CachePolicyList ....................................................................................................................... 295
Contents ........................................................................................................................ 295
See Also ........................................................................................................................ 295
CachePolicyQueryStringsConfig ................................................................................................ 296
Contents ........................................................................................................................ 296
See Also ........................................................................................................................ 296
CachePolicySummary .............................................................................................................. 297
Contents ........................................................................................................................ 297
See Also ........................................................................................................................ 297
CloudFrontOriginAccessIdentity ................................................................................................ 298
Contents ........................................................................................................................ 298
See Also ........................................................................................................................ 298
CloudFrontOriginAccessIdentityConfig ....................................................................................... 299
Contents ........................................................................................................................ 299
See Also ........................................................................................................................ 299
CloudFrontOriginAccessIdentityList ........................................................................................... 300
Contents ........................................................................................................................ 300
See Also ........................................................................................................................ 301
CloudFrontOriginAccessIdentitySummary ................................................................................... 302
Contents ........................................................................................................................ 302
See Also ........................................................................................................................ 302
ContentTypeProfile ................................................................................................................. 303
Contents ........................................................................................................................ 303
See Also ........................................................................................................................ 303
ContentTypeProfileConfig ........................................................................................................ 304
Contents ........................................................................................................................ 304
See Also ........................................................................................................................ 304
ContentTypeProfiles ................................................................................................................ 305
Contents ........................................................................................................................ 305
See Also ........................................................................................................................ 305
CookieNames ......................................................................................................................... 306
Contents ........................................................................................................................ 306
See Also ........................................................................................................................ 306
CookiePreference .................................................................................................................... 307
Contents ........................................................................................................................ 307
See Also ........................................................................................................................ 308
CustomErrorResponse ............................................................................................................. 309
Contents ........................................................................................................................ 309
See Also ........................................................................................................................ 310
CustomErrorResponses ............................................................................................................ 311
Contents ........................................................................................................................ 311
See Also ........................................................................................................................ 311
CustomHeaders ...................................................................................................................... 312
Contents ........................................................................................................................ 312

API Version 2020-05-31


xiii
Amazon CloudFront API Reference

See Also ........................................................................................................................ 312


CustomOriginConfig ................................................................................................................ 313
Contents ........................................................................................................................ 313
See Also ........................................................................................................................ 314
DefaultCacheBehavior ............................................................................................................. 315
Contents ........................................................................................................................ 315
See Also ........................................................................................................................ 318
Distribution ............................................................................................................................ 319
Contents ........................................................................................................................ 319
See Also ........................................................................................................................ 320
DistributionConfig ................................................................................................................... 321
Contents ........................................................................................................................ 321
See Also ........................................................................................................................ 324
DistributionConfigWithTags ...................................................................................................... 326
Contents ........................................................................................................................ 326
See Also ........................................................................................................................ 326
DistributionIdList .................................................................................................................... 327
Contents ........................................................................................................................ 327
See Also ........................................................................................................................ 327
DistributionList ....................................................................................................................... 329
Contents ........................................................................................................................ 329
See Also ........................................................................................................................ 329
DistributionSummary .............................................................................................................. 331
Contents ........................................................................................................................ 331
See Also ........................................................................................................................ 333
EncryptionEntities ................................................................................................................... 335
Contents ........................................................................................................................ 335
See Also ........................................................................................................................ 335
EncryptionEntity ..................................................................................................................... 336
Contents ........................................................................................................................ 336
See Also ........................................................................................................................ 336
EndPoint ............................................................................................................................... 337
Contents ........................................................................................................................ 337
See Also ........................................................................................................................ 337
FieldLevelEncryption ............................................................................................................... 338
Contents ........................................................................................................................ 338
See Also ........................................................................................................................ 338
FieldLevelEncryptionConfig ...................................................................................................... 339
Contents ........................................................................................................................ 339
See Also ........................................................................................................................ 339
FieldLevelEncryptionList .......................................................................................................... 340
Contents ........................................................................................................................ 340
See Also ........................................................................................................................ 340
FieldLevelEncryptionProfile ...................................................................................................... 341
Contents ........................................................................................................................ 341
See Also ........................................................................................................................ 341
FieldLevelEncryptionProfileConfig ............................................................................................. 342
Contents ........................................................................................................................ 342
See Also ........................................................................................................................ 342
FieldLevelEncryptionProfileList ................................................................................................. 343
Contents ........................................................................................................................ 343
See Also ........................................................................................................................ 343
FieldLevelEncryptionProfileSummary ......................................................................................... 344
Contents ........................................................................................................................ 344
See Also ........................................................................................................................ 344
FieldLevelEncryptionSummary .................................................................................................. 345
Contents ........................................................................................................................ 345

API Version 2020-05-31


xiv
Amazon CloudFront API Reference

See Also ........................................................................................................................ 345


FieldPatterns .......................................................................................................................... 346
Contents ........................................................................................................................ 346
See Also ........................................................................................................................ 346
ForwardedValues .................................................................................................................... 347
Contents ........................................................................................................................ 347
See Also ........................................................................................................................ 348
GeoRestriction ........................................................................................................................ 350
Contents ........................................................................................................................ 350
See Also ........................................................................................................................ 350
Headers ................................................................................................................................. 352
Contents ........................................................................................................................ 352
See Also ........................................................................................................................ 352
Invalidation ............................................................................................................................ 353
Contents ........................................................................................................................ 353
See Also ........................................................................................................................ 353
InvalidationBatch .................................................................................................................... 354
Contents ........................................................................................................................ 354
See Also ........................................................................................................................ 354
InvalidationList ....................................................................................................................... 355
Contents ........................................................................................................................ 355
See Also ........................................................................................................................ 355
InvalidationSummary .............................................................................................................. 357
Contents ........................................................................................................................ 357
See Also ........................................................................................................................ 357
KeyPairIds .............................................................................................................................. 358
Contents ........................................................................................................................ 358
See Also ........................................................................................................................ 358
KinesisStreamConfig ............................................................................................................... 359
Contents ........................................................................................................................ 359
See Also ........................................................................................................................ 359
LambdaFunctionAssociation ..................................................................................................... 360
Contents ........................................................................................................................ 360
See Also ........................................................................................................................ 360
LambdaFunctionAssociations .................................................................................................... 362
Contents ........................................................................................................................ 362
See Also ........................................................................................................................ 362
LoggingConfig ........................................................................................................................ 363
Contents ........................................................................................................................ 363
See Also ........................................................................................................................ 363
MonitoringSubscription ........................................................................................................... 365
Contents ........................................................................................................................ 365
See Also ........................................................................................................................ 365
Origin ................................................................................................................................... 366
Contents ........................................................................................................................ 366
See Also ........................................................................................................................ 367
OriginCustomHeader ............................................................................................................... 368
Contents ........................................................................................................................ 368
See Also ........................................................................................................................ 368
OriginGroup ........................................................................................................................... 369
Contents ........................................................................................................................ 369
See Also ........................................................................................................................ 369
OriginGroupFailoverCriteria ...................................................................................................... 370
Contents ........................................................................................................................ 370
See Also ........................................................................................................................ 370
OriginGroupMember ............................................................................................................... 371
Contents ........................................................................................................................ 371

API Version 2020-05-31


xv
Amazon CloudFront API Reference

See Also ........................................................................................................................ 371


OriginGroupMembers .............................................................................................................. 372
Contents ........................................................................................................................ 372
See Also ........................................................................................................................ 372
OriginGroups .......................................................................................................................... 373
Contents ........................................................................................................................ 373
See Also ........................................................................................................................ 373
OriginRequestPolicy ................................................................................................................ 374
Contents ........................................................................................................................ 374
See Also ........................................................................................................................ 374
OriginRequestPolicyConfig ....................................................................................................... 375
Contents ........................................................................................................................ 375
See Also ........................................................................................................................ 376
OriginRequestPolicyCookiesConfig ............................................................................................ 377
Contents ........................................................................................................................ 377
See Also ........................................................................................................................ 377
OriginRequestPolicyHeadersConfig ............................................................................................ 378
Contents ........................................................................................................................ 378
See Also ........................................................................................................................ 378
OriginRequestPolicyList ........................................................................................................... 379
Contents ........................................................................................................................ 379
See Also ........................................................................................................................ 379
OriginRequestPolicyQueryStringsConfig ..................................................................................... 380
Contents ........................................................................................................................ 380
See Also ........................................................................................................................ 380
OriginRequestPolicySummary ................................................................................................... 381
Contents ........................................................................................................................ 381
See Also ........................................................................................................................ 381
Origins .................................................................................................................................. 382
Contents ........................................................................................................................ 382
See Also ........................................................................................................................ 382
OriginSslProtocols .................................................................................................................. 383
Contents ........................................................................................................................ 383
See Also ........................................................................................................................ 383
ParametersInCacheKeyAndForwardedToOrigin ............................................................................ 384
Contents ........................................................................................................................ 384
See Also ........................................................................................................................ 385
Paths .................................................................................................................................... 386
Contents ........................................................................................................................ 386
See Also ........................................................................................................................ 386
PublicKey ............................................................................................................................... 387
Contents ........................................................................................................................ 387
See Also ........................................................................................................................ 387
PublicKeyConfig ..................................................................................................................... 388
Contents ........................................................................................................................ 388
See Also ........................................................................................................................ 388
PublicKeyList .......................................................................................................................... 389
Contents ........................................................................................................................ 389
See Also ........................................................................................................................ 389
PublicKeySummary ................................................................................................................. 390
Contents ........................................................................................................................ 390
See Also ........................................................................................................................ 390
QueryArgProfile ...................................................................................................................... 391
Contents ........................................................................................................................ 391
See Also ........................................................................................................................ 391
QueryArgProfileConfig ............................................................................................................ 392
Contents ........................................................................................................................ 392

API Version 2020-05-31


xvi
Amazon CloudFront API Reference

See Also ........................................................................................................................ 392


QueryArgProfiles .................................................................................................................... 393
Contents ........................................................................................................................ 393
See Also ........................................................................................................................ 393
QueryStringCacheKeys ............................................................................................................ 394
Contents ........................................................................................................................ 394
See Also ........................................................................................................................ 394
QueryStringNames .................................................................................................................. 395
Contents ........................................................................................................................ 395
See Also ........................................................................................................................ 395
RealtimeLogConfig .................................................................................................................. 396
Contents ........................................................................................................................ 396
See Also ........................................................................................................................ 396
RealtimeLogConfigs ................................................................................................................ 398
Contents ........................................................................................................................ 398
See Also ........................................................................................................................ 398
RealtimeMetricsSubscriptionConfig ........................................................................................... 399
Contents ........................................................................................................................ 399
See Also ........................................................................................................................ 399
Restrictions ............................................................................................................................ 400
Contents ........................................................................................................................ 400
See Also ........................................................................................................................ 400
S3Origin ................................................................................................................................ 401
Contents ........................................................................................................................ 401
See Also ........................................................................................................................ 401
S3OriginConfig ....................................................................................................................... 402
Contents ........................................................................................................................ 402
See Also ........................................................................................................................ 402
Signer ................................................................................................................................... 403
Contents ........................................................................................................................ 403
See Also ........................................................................................................................ 403
StatusCodes ........................................................................................................................... 404
Contents ........................................................................................................................ 404
See Also ........................................................................................................................ 404
StreamingDistribution ............................................................................................................. 405
Contents ........................................................................................................................ 405
See Also ........................................................................................................................ 406
StreamingDistributionConfig .................................................................................................... 407
Contents ........................................................................................................................ 407
See Also ........................................................................................................................ 408
StreamingDistributionConfigWithTags ....................................................................................... 409
Contents ........................................................................................................................ 409
See Also ........................................................................................................................ 409
StreamingDistributionList ........................................................................................................ 410
Contents ........................................................................................................................ 410
See Also ........................................................................................................................ 410
StreamingDistributionSummary ................................................................................................ 412
Contents ........................................................................................................................ 412
See Also ........................................................................................................................ 413
StreamingLoggingConfig ......................................................................................................... 414
Contents ........................................................................................................................ 414
See Also ........................................................................................................................ 414
Tag ....................................................................................................................................... 415
Contents ........................................................................................................................ 415
See Also ........................................................................................................................ 415
TagKeys ................................................................................................................................. 416
Contents ........................................................................................................................ 416

API Version 2020-05-31


xvii
Amazon CloudFront API Reference

See Also ........................................................................................................................ 416


Tags ...................................................................................................................................... 417
Contents ........................................................................................................................ 417
See Also ........................................................................................................................ 417
TrustedSigners ....................................................................................................................... 418
Contents ........................................................................................................................ 418
See Also ........................................................................................................................ 418
ViewerCertificate .................................................................................................................... 419
Contents ........................................................................................................................ 419
See Also ........................................................................................................................ 422
Common Parameters ...................................................................................................................... 423
Common Errors .............................................................................................................................. 425

API Version 2020-05-31


xviii
Amazon CloudFront API Reference

Welcome
This is the Amazon CloudFront API Reference. This guide is for developers who need detailed information
about CloudFront API actions, data types, and errors. For detailed information about CloudFront
features, see the Amazon CloudFront Developer Guide.

This document was last published on September 4, 2020.

API Version 2020-05-31


1
Amazon CloudFront API Reference

Actions
The following actions are supported:

• CreateCachePolicy (p. 4)
• CreateCloudFrontOriginAccessIdentity (p. 9)
• CreateDistribution (p. 12)
• CreateDistributionWithTags (p. 31)
• CreateFieldLevelEncryptionConfig (p. 47)
• CreateFieldLevelEncryptionProfile (p. 51)
• CreateInvalidation (p. 55)
• CreateMonitoringSubscription (p. 58)
• CreateOriginRequestPolicy (p. 60)
• CreatePublicKey (p. 65)
• CreateRealtimeLogConfig (p. 68)
• CreateStreamingDistribution (p. 71)
• CreateStreamingDistributionWithTags (p. 77)
• DeleteCachePolicy (p. 82)
• DeleteCloudFrontOriginAccessIdentity (p. 84)
• DeleteDistribution (p. 86)
• DeleteFieldLevelEncryptionConfig (p. 88)
• DeleteFieldLevelEncryptionProfile (p. 90)
• DeleteMonitoringSubscription (p. 92)
• DeleteOriginRequestPolicy (p. 94)
• DeletePublicKey (p. 96)
• DeleteRealtimeLogConfig (p. 98)
• DeleteStreamingDistribution (p. 100)
• GetCachePolicy (p. 103)
• GetCachePolicyConfig (p. 106)
• GetCloudFrontOriginAccessIdentity (p. 109)
• GetCloudFrontOriginAccessIdentityConfig (p. 111)
• GetDistribution (p. 113)
• GetDistributionConfig (p. 120)
• GetFieldLevelEncryption (p. 129)
• GetFieldLevelEncryptionConfig (p. 132)
• GetFieldLevelEncryptionProfile (p. 135)
• GetFieldLevelEncryptionProfileConfig (p. 138)
• GetInvalidation (p. 140)
• GetMonitoringSubscription (p. 143)
• GetOriginRequestPolicy (p. 145)
• GetOriginRequestPolicyConfig (p. 148)
• GetPublicKey (p. 151)
• GetPublicKeyConfig (p. 153)
• GetRealtimeLogConfig (p. 155)

API Version 2020-05-31


2
Amazon CloudFront API Reference

• GetStreamingDistribution (p. 158)


• GetStreamingDistributionConfig (p. 161)
• ListCachePolicies (p. 164)
• ListCloudFrontOriginAccessIdentities (p. 167)
• ListDistributions (p. 170)
• ListDistributionsByCachePolicyId (p. 176)
• ListDistributionsByOriginRequestPolicyId (p. 179)
• ListDistributionsByRealtimeLogConfig (p. 182)
• ListDistributionsByWebACLId (p. 189)
• ListFieldLevelEncryptionConfigs (p. 196)
• ListFieldLevelEncryptionProfiles (p. 199)
• ListInvalidations (p. 202)
• ListOriginRequestPolicies (p. 205)
• ListPublicKeys (p. 208)
• ListRealtimeLogConfigs (p. 210)
• ListStreamingDistributions (p. 213)
• ListTagsForResource (p. 216)
• TagResource (p. 218)
• UntagResource (p. 220)
• UpdateCachePolicy (p. 222)
• UpdateCloudFrontOriginAccessIdentity (p. 227)
• UpdateDistribution (p. 230)
• UpdateFieldLevelEncryptionConfig (p. 250)
• UpdateFieldLevelEncryptionProfile (p. 254)
• UpdateOriginRequestPolicy (p. 258)
• UpdatePublicKey (p. 263)
• UpdateRealtimeLogConfig (p. 266)
• UpdateStreamingDistribution (p. 269)

API Version 2020-05-31


3
Amazon CloudFront API Reference
CreateCachePolicy

CreateCachePolicy
Creates a cache policy.

After you create a cache policy, you can attach it to one or more cache behaviors. When it’s attached to a
cache behavior, the cache policy determines the following:

• The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies,
and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to
the viewer.
• The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the
CloudFront cache.

The headers, cookies, and query strings that are included in the cache key are automatically included in
requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find an object in
its cache that matches the request’s cache key. If you want to send values to the origin but not include
them in the cache key, use OriginRequestPolicy.

For more information about cache policies, see Controlling the cache key in the Amazon CloudFront
Developer Guide.

Request Syntax
POST /2020-05-31/cache-policy HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicyConfig xmlns="[Link]
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>

API Version 2020-05-31


4
Amazon CloudFront API Reference
URI Request Parameters

</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

CachePolicyConfig (p. 4)

Root level tag for the CachePolicyConfig parameters.

Required: Yes
Comment (p. 4)

A comment to describe the cache policy.

Type: String

Required: No
DefaultTTL (p. 4)

The default amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated.
CloudFront uses this value as the object’s time to live (TTL) only when the origin does not send
Cache-Control or Expires headers with the object. For more information, see Managing How
Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than
86400 seconds, then the default value for this field is the same as the value of MinTTL.

Type: Long

Required: No
MaxTTL (p. 4)

The maximum amount of time, in seconds, that objects stay in the CloudFront cache before
CloudFront sends another request to the origin to see if the object has been updated. CloudFront
uses this value only when the origin sends Cache-Control or Expires headers with the object.
For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

The default value for this field is 31536000 seconds (one year). If the value of MinTTL or
DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the
value of DefaultTTL.

Type: Long

Required: No
MinTTL (p. 4)

The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated. For

API Version 2020-05-31


5
Amazon CloudFront API Reference
Response Syntax

more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

Type: Long

Required: Yes
Name (p. 4)

A unique name to identify the cache policy.

Type: String

Required: Yes
ParametersInCacheKeyAndForwardedToOrigin (p. 4)

The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in
the cache key are automatically included in requests that CloudFront sends to the origin.

Type: ParametersInCacheKeyAndForwardedToOrigin (p. 384) object

Required: No

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicy>
<CachePolicyConfig>
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>

API Version 2020-05-31


6
Amazon CloudFront API Reference
Response Elements

</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</CachePolicy>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

CachePolicy (p. 6)

Root level tag for the CachePolicy parameters.

Required: Yes
CachePolicyConfig (p. 6)

The cache policy configuration.

Type: CachePolicyConfig (p. 291) object


Id (p. 6)

The unique identifier for the cache policy.

Type: String
LastModifiedTime (p. 6)

The date and time when the cache policy was last modified.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CachePolicyAlreadyExists

A cache policy with this name already exists. You must provide a unique name. To modify an existing
cache policy, use UpdateCachePolicy.

HTTP Status Code: 409


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

API Version 2020-05-31


7
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


TooManyCachePolicies

You have reached the maximum number of cache policies for this AWS account. For more
information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyCookiesInCachePolicy

The number of cookies in the cache policy exceeds the maximum. For more information, see Quotas
(formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyHeadersInCachePolicy

The number of headers in the cache policy exceeds the maximum. For more information, see Quotas
(formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyQueryStringsInCachePolicy

The number of query strings in the cache policy exceeds the maximum. For more information, see
Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


8
Amazon CloudFront API Reference
CreateCloudFrontOriginAccessIdentity

CreateCloudFrontOriginAccessIdentity
Creates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin
access identity to require users to access your content using a CloudFront URL instead of the Amazon
S3 URL. For more information about how to use origin access identities, see Serving Private Content
through CloudFront in the Amazon CloudFront Developer Guide.

Request Syntax
POST /2020-05-31/origin-access-identity/cloudfront HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentityConfig xmlns="[Link]
doc/2020-05-31/">
<CallerReference>string</CallerReference>
<Comment>string</Comment>
</CloudFrontOriginAccessIdentityConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

CloudFrontOriginAccessIdentityConfig (p. 9)

Root level tag for the CloudFrontOriginAccessIdentityConfig parameters.

Required: Yes
CallerReference (p. 9)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


CloudFrontOriginAccessIdentityConfig object), a new origin access identity is created.

If the CallerReference is a value already sent in a previous identity request, and the content of
the CloudFrontOriginAccessIdentityConfig is identical to the original request (ignoring
white space), the response includes the same information returned to the original request.

If the CallerReference is a value you already sent in a previous request to create an identity, but
the content of the CloudFrontOriginAccessIdentityConfig is different from the original
request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists error.

Type: String

Required: Yes
Comment (p. 9)

Any comments you want to include about the origin access identity.

Type: String

Required: Yes

API Version 2020-05-31


9
Amazon CloudFront API Reference
Response Syntax

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentity>
<CloudFrontOriginAccessIdentityConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
</CloudFrontOriginAccessIdentityConfig>
<Id>string</Id>
<S3CanonicalUserId>string</S3CanonicalUserId>
</CloudFrontOriginAccessIdentity>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

CloudFrontOriginAccessIdentity (p. 10)

Root level tag for the CloudFrontOriginAccessIdentity parameters.

Required: Yes
CloudFrontOriginAccessIdentityConfig (p. 10)

The current configuration information for the identity.

Type: CloudFrontOriginAccessIdentityConfig (p. 299) object


Id (p. 10)

The ID for the origin access identity, for example, E74FTE3AJFJ256A.

Type: String
S3CanonicalUserId (p. 10)

The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access
identity read permission to an object in Amazon S3.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

CloudFrontOriginAccessIdentityAlreadyExists

If the CallerReference is a value you already sent in a previous request to create an identity but
the content of the CloudFrontOriginAccessIdentityConfig is different from the original
request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists error.

HTTP Status Code: 409


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400

API Version 2020-05-31


10
Amazon CloudFront API Reference
See Also

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


TooManyCloudFrontOriginAccessIdentities

Processing your request would cause you to exceed the maximum number of origin access identities
allowed.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


11
Amazon CloudFront API Reference
CreateDistribution

CreateDistribution
Creates a new web distribution. You create a CloudFront distribution to tell CloudFront where you want
content to be delivered from, and the details about how to track and manage content delivery. Send a
POST request to the /CloudFront API version/distribution/distribution ID resource.
Important
When you update a distribution, there are more required fields than when you create a
distribution. When you update your distribution by using UpdateDistribution, follow the steps
included in the documentation to get the current configuration and then make your updates.
This helps to make sure that you include all of the required fields. To view a summary, see
Required Fields for Create Distribution and Update Distribution in the Amazon CloudFront
Developer Guide.

Request Syntax
POST /2020-05-31/distribution HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<DistributionConfig xmlns="[Link]
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>

API Version 2020-05-31


12
Amazon CloudFront API Reference
Request Syntax

<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>

API Version 2020-05-31


13
Amazon CloudFront API Reference
Request Syntax

<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>

API Version 2020-05-31


14
Amazon CloudFront API Reference
Request Syntax

<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>

API Version 2020-05-31


15
Amazon CloudFront API Reference
URI Request Parameters

<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

DistributionConfig (p. 12)

Root level tag for the DistributionConfig parameters.

Required: Yes
Aliases (p. 12)

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

Type: Aliases (p. 279) object

Required: No
CacheBehaviors (p. 12)

A complex type that contains zero or more CacheBehavior elements.

Type: CacheBehaviors (p. 288) object

Required: No
CallerReference (p. 12)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the DistributionConfig


object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String

Required: Yes
Comment (p. 12)

Any comments you want to include about the distribution.

If you don't want to specify a comment, include an empty Comment element.

To delete an existing comment, update the distribution configuration and include an empty
Comment element.

API Version 2020-05-31


16
Amazon CloudFront API Reference
Request Body

To add or change a comment, update the distribution configuration and specify the new comment.

Type: String

Required: Yes
CustomErrorResponses (p. 12)

A complex type that controls the following:


• 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.

Type: CustomErrorResponses (p. 311) object

Required: No
DefaultCacheBehavior (p. 12)

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: DefaultCacheBehavior (p. 315) object

Required: Yes
DefaultRootObject (p. 12)

The object that you want CloudFront to request from your origin (for example, [Link])
when a viewer requests the root URL for your distribution ([Link] instead
of an object in your distribution ([Link]
Specifying a default root object avoids exposing the contents of your distribution.

Specify only the object name, for example, [Link]. Don't add a / before the object name.

If you don't want to specify a default root object when you create a distribution, include an empty
DefaultRootObject element.

To delete the default root object from an existing distribution, update the distribution configuration
and include an empty DefaultRootObject element.

To replace the default root object, update the distribution configuration and specify the new object.

For more information about the default root object, see Creating a Default Root Object in the
Amazon CloudFront Developer Guide.

Type: String

Required: No
Enabled (p. 12)

From this field, you can enable or disable the selected distribution.

Type: Boolean

Required: Yes

API Version 2020-05-31


17
Amazon CloudFront API Reference
Request Body

HttpVersion (p. 12)

(Optional) 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
automatically use an earlier HTTP version.

For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support
Server Name Identification (SNI).

In general, configuring CloudFront to communicate with viewers using HTTP/2 reduces latency. You
can improve performance by optimizing for HTTP/2. For more information, do an Internet search for
"http/2 optimization."

Type: String

Valid Values: http1.1 | http2

Required: No
IsIPV6Enabled (p. 12)

If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution,
specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS
response code NOERROR and with no IP addresses. This allows viewers to submit a second request,
for an IPv4 address for your distribution.

In general, you should enable IPv6 if you have users on IPv6 networks who want to access your
content. However, if you're using signed URLs or signed cookies to restrict access to your content,
and if you're using a custom policy that includes the IpAddress parameter to restrict the IP
addresses that can access your content, don't enable IPv6. If you want to restrict access to some
content by IP address and not restrict access to other content (or restrict access but not by IP
address), you can create two distributions. For more information, see Creating a Signed URL Using a
Custom Policy in the Amazon CloudFront Developer Guide.

If you're using an Amazon Route 53 alias resource record set to route traffic to your CloudFront
distribution, you need to create a second alias resource record set when both of the following are
true:
• You enable IPv6 for the distribution
• You're using alternate domain names in the URLs for your objects

For more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your
Domain Name in the Amazon Route 53 Developer Guide.

If you created a CNAME resource record set, either with Amazon Route 53 or with another DNS
service, you don't need to make any changes. A CNAME record will route traffic to your distribution
regardless of the IP address format of the viewer request.

Type: Boolean

Required: No
Logging (p. 12)

A complex type that controls whether access logs are written for the distribution.

For more information about logging, see Access Logs in the Amazon CloudFront Developer Guide.

Type: LoggingConfig (p. 363) object

Required: No

API Version 2020-05-31


18
Amazon CloudFront API Reference
Request Body

OriginGroups (p. 12)

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

Type: OriginGroups (p. 373) object

Required: No
Origins (p. 12)

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

Type: Origins (p. 382) object

Required: Yes
PriceClass (p. 12)

The price class that corresponds with the maximum price that you want to pay for CloudFront
service. If you specify PriceClass_All, CloudFront responds to requests for your objects from all
CloudFront edge locations.

If you specify a price class other than PriceClass_All, CloudFront serves your objects from the
CloudFront edge location that has the lowest latency among the edge locations in your price class.
Viewers who are in or near regions that are excluded from your specified price class may encounter
slower performance.

For more information about price classes, see Choosing the Price Class for a CloudFront Distribution
in the Amazon CloudFront Developer Guide. For information about CloudFront pricing, including how
price classes (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing.
For price class information, scroll down to see the table at the bottom of the page.

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: No
Restrictions (p. 12)

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

Type: Restrictions (p. 400) object

Required: No
ViewerCertificate (p. 12)

A complex type that determines the distribution’s SSL/TLS configuration for communicating with
viewers.

Type: ViewerCertificate (p. 419) object

Required: No
WebACLId (p. 12)

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.
To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for example
arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-
f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using AWS WAF Classic, use the
ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

API Version 2020-05-31


19
Amazon CloudFront API Reference
Response Syntax

AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that
are forwarded to CloudFront, and lets you control access to your content. Based on conditions that
you specify, such as the IP addresses that requests originate from or the values of query strings,
CloudFront responds to requests either with the requested content or with an HTTP 403 status code
(Forbidden). You can also configure CloudFront to return a custom error page when a request is
blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.

Type: String

Required: No

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<Distribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>
</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<DistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>

API Version 2020-05-31


20
Amazon CloudFront API Reference
Response Syntax

<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>

API Version 2020-05-31


21
Amazon CloudFront API Reference
Response Syntax

<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>

API Version 2020-05-31


22
Amazon CloudFront API Reference
Response Syntax

<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>

API Version 2020-05-31


23
Amazon CloudFront API Reference
Response Elements

<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<InProgressInvalidationBatches>integer</InProgressInvalidationBatches>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
</Distribution>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

Distribution (p. 20)

Root level tag for the Distribution parameters.

Required: Yes
ActiveTrustedSigners (p. 20)

CloudFront automatically adds this element to the response only if you've set up the distribution to
serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware
of for each trusted signer. The Signer child element lists the AWS account number of the trusted
signer (or an empty Self element if the signer is you). The Signer element also includes the IDs
of any active key pairs associated with the trusted signer's AWS account. If no KeyPairId element
appears for a Signer, that signer can't create working signed URLs.

Type: ActiveTrustedSigners (p. 278) object


AliasICPRecordals (p. 20)

AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they
want to serve content publicly on an alternate domain name, also known as a CNAME, that they've
added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
distributions.

API Version 2020-05-31


24
Amazon CloudFront API Reference
Errors

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started
with AWS services in China.

Type: Array of AliasICPRecordal (p. 280) objects


ARN (p. 20)

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

Type: String
DistributionConfig (p. 20)

The current configuration information for the distribution. Send a GET request to the /CloudFront
API version/distribution ID/config resource.

Type: DistributionConfig (p. 321) object


DomainName (p. 20)

The domain name corresponding to the distribution, for example,


[Link].

Type: String
Id (p. 20)

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String
InProgressInvalidationBatches (p. 20)

The number of invalidation batches currently in progress.

Type: Integer
LastModifiedTime (p. 20)

The date and time the distribution was last modified.

Type: Timestamp
Status (p. 20)

This response element indicates the current status of the distribution. When the status is Deployed,
the distribution's information is fully propagated to all CloudFront edge locations.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CNAMEAlreadyExists

The CNAME specified is already defined for CloudFront.

API Version 2020-05-31


25
Amazon CloudFront API Reference
Errors

HTTP Status Code: 409


DistributionAlreadyExists

The caller reference you attempted to create the distribution with is associated with another
distribution.

HTTP Status Code: 409


IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior

The specified configuration for field-level encryption can't be associated with the specified cache
behavior.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidDefaultRootObject

The default root object file name is too big or contains an invalid character.

HTTP Status Code: 400


InvalidErrorCode

An invalid error code was specified.

HTTP Status Code: 400


InvalidForwardCookies

Your request contains forward cookies option which doesn't match with the expectation for the
whitelisted list of cookie names. Either list of cookie names has been specified when not allowed
or list of cookie names is missing when expected.

HTTP Status Code: 400


InvalidGeoRestrictionParameter

The specified geo restriction parameter is not valid.

HTTP Status Code: 400


InvalidHeadersForS3Origin

The headers specified are not valid for an Amazon S3 origin.

HTTP Status Code: 400


InvalidLambdaFunctionAssociation

The specified Lambda function association is invalid.

HTTP Status Code: 400


InvalidLocationCode

The location code specified is not valid.

API Version 2020-05-31


26
Amazon CloudFront API Reference
Errors

HTTP Status Code: 400


InvalidMinimumProtocolVersion

The minimum protocol version specified is not valid.

HTTP Status Code: 400


InvalidOrigin

The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

HTTP Status Code: 400


InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400


InvalidOriginKeepaliveTimeout

The keep alive timeout specified for the origin is not valid.

HTTP Status Code: 400


InvalidOriginReadTimeout

The read timeout specified for the origin is not valid.

HTTP Status Code: 400


InvalidProtocolSettings

You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients
that support Server Name Indication (SNI).

HTTP Status Code: 400


InvalidQueryStringParameters

The query string parameters specified are not valid.

HTTP Status Code: 400


InvalidRelativePath

The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

HTTP Status Code: 400


InvalidRequiredProtocol

This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your
request, or omit the RequiredProtocols element from your distribution configuration.

HTTP Status Code: 400


InvalidResponseCode

A response code is not valid.

HTTP Status Code: 400


InvalidTTLOrder

The TTL order specified is not valid.

HTTP Status Code: 400

API Version 2020-05-31


27
Amazon CloudFront API Reference
Errors

InvalidViewerCertificate

A viewer certificate specified is not valid.

HTTP Status Code: 400


InvalidWebACLId

A web ACL ID specified is not valid. To specify a web ACL created using the latest version of AWS
WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/
webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify
a web ACL created using AWS WAF Classic, use the ACL ID, for example 473e64fd-
f30b-4765-81a0-62ad96dd167a.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404


NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

HTTP Status Code: 404


NoSuchOrigin

No origin exists with the specified Origin Id.

HTTP Status Code: 404


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404


TooManyCacheBehaviors

You cannot create more cache behaviors for the distribution.

HTTP Status Code: 400


TooManyCertificates

You cannot create anymore custom SSL/TLS certificates.

HTTP Status Code: 400


TooManyCookieNamesInWhiteList

Your request contains more cookie names in the whitelist than are allowed per cache behavior.

HTTP Status Code: 400


TooManyDistributionCNAMEs

Your request contains more CNAMEs than are allowed per distribution.

API Version 2020-05-31


28
Amazon CloudFront API Reference
Errors

HTTP Status Code: 400


TooManyDistributions

Processing your request would cause you to exceed the maximum number of distributions allowed.

HTTP Status Code: 400


TooManyDistributionsAssociatedToCachePolicy

The maximum number of distributions have been associated with the specified cache policy. For
more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyDistributionsAssociatedToFieldLevelEncryptionConfig

The maximum number of distributions have been associated with the specified configuration for
field-level encryption.

HTTP Status Code: 400


TooManyDistributionsAssociatedToOriginRequestPolicy

The maximum number of distributions have been associated with the specified origin request policy.
For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer
Guide.

HTTP Status Code: 400


TooManyDistributionsWithLambdaAssociations

Processing your request would cause the maximum number of distributions with Lambda function
associations per owner to be exceeded.

HTTP Status Code: 400


TooManyDistributionsWithSingleFunctionARN

The maximum number of distributions have been associated with the specified Lambda function.

HTTP Status Code: 400


TooManyHeadersInForwardedValues

Your request contains too many headers in forwarded values.

HTTP Status Code: 400


TooManyLambdaFunctionAssociations

Your request contains more Lambda function associations than are allowed per distribution.

HTTP Status Code: 400


TooManyOriginCustomHeaders

Your request contains too many origin custom headers.

HTTP Status Code: 400


TooManyOriginGroupsPerDistribution

Processing your request would cause you to exceed the maximum number of origin groups allowed.

HTTP Status Code: 400


TooManyOrigins

You cannot create more origins for the distribution.

API Version 2020-05-31


29
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


TooManyQueryStringParameters

Your request contains too many query string parameters.

HTTP Status Code: 400


TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400


TrustedSignerDoesNotExist

One or more of your trusted signers don't exist.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


30
Amazon CloudFront API Reference
CreateDistributionWithTags

CreateDistributionWithTags
Create a new distribution with tags.

Request Syntax
POST /2020-05-31/distribution?WithTags HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<DistributionConfigWithTags xmlns="[Link]
<DistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>

API Version 2020-05-31


31
Amazon CloudFront API Reference
Request Syntax

<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>

API Version 2020-05-31


32
Amazon CloudFront API Reference
Request Syntax

<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>

API Version 2020-05-31


33
Amazon CloudFront API Reference
Request Syntax

<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>
<Tags>
<Items>

API Version 2020-05-31


34
Amazon CloudFront API Reference
URI Request Parameters

<Tag>
<Key>string</Key>
<Value>string</Value>
</Tag>
</Items>
</Tags>
</DistributionConfigWithTags>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

DistributionConfigWithTags (p. 31)

Root level tag for the DistributionConfigWithTags parameters.

Required: Yes
DistributionConfig (p. 31)

A distribution configuration.

Type: DistributionConfig (p. 321) object

Required: Yes
Tags (p. 31)

A complex type that contains zero or more Tag elements.

Type: Tags (p. 417) object

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<Distribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>

API Version 2020-05-31


35
Amazon CloudFront API Reference
Response Syntax

</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<DistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>

API Version 2020-05-31


36
Amazon CloudFront API Reference
Response Syntax

<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>

API Version 2020-05-31


37
Amazon CloudFront API Reference
Response Syntax

</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>

API Version 2020-05-31


38
Amazon CloudFront API Reference
Response Syntax

<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<InProgressInvalidationBatches>integer</InProgressInvalidationBatches>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
</Distribution>

API Version 2020-05-31


39
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

Distribution (p. 35)

Root level tag for the Distribution parameters.

Required: Yes
ActiveTrustedSigners (p. 35)

CloudFront automatically adds this element to the response only if you've set up the distribution to
serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware
of for each trusted signer. The Signer child element lists the AWS account number of the trusted
signer (or an empty Self element if the signer is you). The Signer element also includes the IDs
of any active key pairs associated with the trusted signer's AWS account. If no KeyPairId element
appears for a Signer, that signer can't create working signed URLs.

Type: ActiveTrustedSigners (p. 278) object


AliasICPRecordals (p. 35)

AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they
want to serve content publicly on an alternate domain name, also known as a CNAME, that they've
added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
distributions.

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started
with AWS services in China.

Type: Array of AliasICPRecordal (p. 280) objects


ARN (p. 35)

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

Type: String
DistributionConfig (p. 35)

The current configuration information for the distribution. Send a GET request to the /CloudFront
API version/distribution ID/config resource.

Type: DistributionConfig (p. 321) object


DomainName (p. 35)

The domain name corresponding to the distribution, for example,


[Link].

Type: String
Id (p. 35)

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String
InProgressInvalidationBatches (p. 35)

The number of invalidation batches currently in progress.

API Version 2020-05-31


40
Amazon CloudFront API Reference
Errors

Type: Integer
LastModifiedTime (p. 35)

The date and time the distribution was last modified.

Type: Timestamp
Status (p. 35)

This response element indicates the current status of the distribution. When the status is Deployed,
the distribution's information is fully propagated to all CloudFront edge locations.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CNAMEAlreadyExists

The CNAME specified is already defined for CloudFront.

HTTP Status Code: 409


DistributionAlreadyExists

The caller reference you attempted to create the distribution with is associated with another
distribution.

HTTP Status Code: 409


IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior

The specified configuration for field-level encryption can't be associated with the specified cache
behavior.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidDefaultRootObject

The default root object file name is too big or contains an invalid character.

HTTP Status Code: 400


InvalidErrorCode

An invalid error code was specified.

API Version 2020-05-31


41
Amazon CloudFront API Reference
Errors

HTTP Status Code: 400


InvalidForwardCookies

Your request contains forward cookies option which doesn't match with the expectation for the
whitelisted list of cookie names. Either list of cookie names has been specified when not allowed
or list of cookie names is missing when expected.

HTTP Status Code: 400


InvalidGeoRestrictionParameter

The specified geo restriction parameter is not valid.

HTTP Status Code: 400


InvalidHeadersForS3Origin

The headers specified are not valid for an Amazon S3 origin.

HTTP Status Code: 400


InvalidLambdaFunctionAssociation

The specified Lambda function association is invalid.

HTTP Status Code: 400


InvalidLocationCode

The location code specified is not valid.

HTTP Status Code: 400


InvalidMinimumProtocolVersion

The minimum protocol version specified is not valid.

HTTP Status Code: 400


InvalidOrigin

The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

HTTP Status Code: 400


InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400


InvalidOriginKeepaliveTimeout

The keep alive timeout specified for the origin is not valid.

HTTP Status Code: 400


InvalidOriginReadTimeout

The read timeout specified for the origin is not valid.

HTTP Status Code: 400


InvalidProtocolSettings

You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients
that support Server Name Indication (SNI).

HTTP Status Code: 400

API Version 2020-05-31


42
Amazon CloudFront API Reference
Errors

InvalidQueryStringParameters

The query string parameters specified are not valid.

HTTP Status Code: 400


InvalidRelativePath

The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

HTTP Status Code: 400


InvalidRequiredProtocol

This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your
request, or omit the RequiredProtocols element from your distribution configuration.

HTTP Status Code: 400


InvalidResponseCode

A response code is not valid.

HTTP Status Code: 400


InvalidTagging

The tagging specified is not valid.

HTTP Status Code: 400


InvalidTTLOrder

The TTL order specified is not valid.

HTTP Status Code: 400


InvalidViewerCertificate

A viewer certificate specified is not valid.

HTTP Status Code: 400


InvalidWebACLId

A web ACL ID specified is not valid. To specify a web ACL created using the latest version of AWS
WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/
webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify
a web ACL created using AWS WAF Classic, use the ACL ID, for example 473e64fd-
f30b-4765-81a0-62ad96dd167a.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404


NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

API Version 2020-05-31


43
Amazon CloudFront API Reference
Errors

HTTP Status Code: 404


NoSuchOrigin

No origin exists with the specified Origin Id.

HTTP Status Code: 404


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404


TooManyCacheBehaviors

You cannot create more cache behaviors for the distribution.

HTTP Status Code: 400


TooManyCertificates

You cannot create anymore custom SSL/TLS certificates.

HTTP Status Code: 400


TooManyCookieNamesInWhiteList

Your request contains more cookie names in the whitelist than are allowed per cache behavior.

HTTP Status Code: 400


TooManyDistributionCNAMEs

Your request contains more CNAMEs than are allowed per distribution.

HTTP Status Code: 400


TooManyDistributions

Processing your request would cause you to exceed the maximum number of distributions allowed.

HTTP Status Code: 400


TooManyDistributionsAssociatedToCachePolicy

The maximum number of distributions have been associated with the specified cache policy. For
more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyDistributionsAssociatedToFieldLevelEncryptionConfig

The maximum number of distributions have been associated with the specified configuration for
field-level encryption.

HTTP Status Code: 400


TooManyDistributionsAssociatedToOriginRequestPolicy

The maximum number of distributions have been associated with the specified origin request policy.
For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer
Guide.

HTTP Status Code: 400


TooManyDistributionsWithLambdaAssociations

Processing your request would cause the maximum number of distributions with Lambda function
associations per owner to be exceeded.

API Version 2020-05-31


44
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


TooManyDistributionsWithSingleFunctionARN

The maximum number of distributions have been associated with the specified Lambda function.

HTTP Status Code: 400


TooManyHeadersInForwardedValues

Your request contains too many headers in forwarded values.

HTTP Status Code: 400


TooManyLambdaFunctionAssociations

Your request contains more Lambda function associations than are allowed per distribution.

HTTP Status Code: 400


TooManyOriginCustomHeaders

Your request contains too many origin custom headers.

HTTP Status Code: 400


TooManyOriginGroupsPerDistribution

Processing your request would cause you to exceed the maximum number of origin groups allowed.

HTTP Status Code: 400


TooManyOrigins

You cannot create more origins for the distribution.

HTTP Status Code: 400


TooManyQueryStringParameters

Your request contains too many query string parameters.

HTTP Status Code: 400


TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400


TrustedSignerDoesNotExist

One or more of your trusted signers don't exist.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java

API Version 2020-05-31


45
Amazon CloudFront API Reference
See Also

• AWS SDK for JavaScript


• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


46
Amazon CloudFront API Reference
CreateFieldLevelEncryptionConfig

CreateFieldLevelEncryptionConfig
Create a new field-level encryption configuration.

Request Syntax
POST /2020-05-31/field-level-encryption HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionConfig xmlns="[Link]
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<QueryArgProfileConfig>
<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>
<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

FieldLevelEncryptionConfig (p. 47)

Root level tag for the FieldLevelEncryptionConfig parameters.

Required: Yes
CallerReference (p. 47)

A unique number that ensures the request can't be replayed.

Type: String

Required: Yes

API Version 2020-05-31


47
Amazon CloudFront API Reference
Response Syntax

Comment (p. 47)

An optional comment about the configuration.

Type: String

Required: No
ContentTypeProfileConfig (p. 47)

A complex data type that specifies when to forward content if a content type isn't recognized and
profiles to use as by default in a request if a query argument doesn't specify a profile to use.

Type: ContentTypeProfileConfig (p. 304) object

Required: No
QueryArgProfileConfig (p. 47)

A complex data type that specifies when to forward content if a profile isn't found and the profile
that can be provided as a query argument in a request.

Type: QueryArgProfileConfig (p. 392) object

Required: No

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryption>
<FieldLevelEncryptionConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<QueryArgProfileConfig>
<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>
<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</FieldLevelEncryption>

API Version 2020-05-31


48
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

FieldLevelEncryption (p. 48)

Root level tag for the FieldLevelEncryption parameters.

Required: Yes
FieldLevelEncryptionConfig (p. 48)

A complex data type that includes the profile configurations specified for field-level encryption.

Type: FieldLevelEncryptionConfig (p. 339) object


Id (p. 48)

The configuration ID for a field-level encryption configuration which includes a set of profiles that
specify certain selected data fields to be encrypted by specific public keys.

Type: String
LastModifiedTime (p. 48)

The last time the field-level encryption configuration was changed.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

FieldLevelEncryptionConfigAlreadyExists

The specified configuration for field-level encryption already exists.

HTTP Status Code: 409


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchFieldLevelEncryptionProfile

The specified profile for field-level encryption doesn't exist.

HTTP Status Code: 404


QueryArgProfileEmpty

No profile specified for the field-level encryption query argument.

HTTP Status Code: 400

API Version 2020-05-31


49
Amazon CloudFront API Reference
See Also

TooManyFieldLevelEncryptionConfigs

The maximum number of configurations for field-level encryption have been created.

HTTP Status Code: 400


TooManyFieldLevelEncryptionContentTypeProfiles

The maximum number of content type profiles for field-level encryption have been created.

HTTP Status Code: 400


TooManyFieldLevelEncryptionQueryArgProfiles

The maximum number of query arg profiles for field-level encryption have been created.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


50
Amazon CloudFront API Reference
CreateFieldLevelEncryptionProfile

CreateFieldLevelEncryptionProfile
Create a field-level encryption profile.

Request Syntax
POST /2020-05-31/field-level-encryption-profile HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfileConfig xmlns="[Link]
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Name>string</Name>
</FieldLevelEncryptionProfileConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

FieldLevelEncryptionProfileConfig (p. 51)

Root level tag for the FieldLevelEncryptionProfileConfig parameters.

Required: Yes
CallerReference (p. 51)

A unique number that ensures that the request can't be replayed.

Type: String

Required: Yes
Comment (p. 51)

An optional comment for the field-level encryption profile.

Type: String

Required: No

API Version 2020-05-31


51
Amazon CloudFront API Reference
Response Syntax

EncryptionEntities (p. 51)

A complex data type of encryption entities for the field-level encryption profile that include the
public key ID, provider, and field patterns for specifying which fields to encrypt with this key.

Type: EncryptionEntities (p. 335) object

Required: Yes
Name (p. 51)

Profile name for the field-level encryption profile.

Type: String

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfile>
<FieldLevelEncryptionProfileConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Name>string</Name>
</FieldLevelEncryptionProfileConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</FieldLevelEncryptionProfile>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

FieldLevelEncryptionProfile (p. 52)

Root level tag for the FieldLevelEncryptionProfile parameters.

Required: Yes
FieldLevelEncryptionProfileConfig (p. 52)

A complex data type that includes the profile name and the encryption entities for the field-level
encryption profile.

API Version 2020-05-31


52
Amazon CloudFront API Reference
Errors

Type: FieldLevelEncryptionProfileConfig (p. 342) object


Id (p. 52)

The ID for a field-level encryption profile configuration which includes a set of profiles that specify
certain selected data fields to be encrypted by specific public keys.

Type: String
LastModifiedTime (p. 52)

The last time the field-level encryption profile was updated.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

FieldLevelEncryptionProfileAlreadyExists

The specified profile for field-level encryption already exists.

HTTP Status Code: 409


FieldLevelEncryptionProfileSizeExceeded

The maximum size of a profile for field-level encryption was exceeded.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchPublicKey

The specified public key doesn't exist.

HTTP Status Code: 404


TooManyFieldLevelEncryptionEncryptionEntities

The maximum number of encryption entities for field-level encryption have been created.

HTTP Status Code: 400


TooManyFieldLevelEncryptionFieldPatterns

The maximum number of field patterns for field-level encryption have been created.

HTTP Status Code: 400


TooManyFieldLevelEncryptionProfiles

The maximum number of profiles for field-level encryption have been created.

HTTP Status Code: 400

API Version 2020-05-31


53
Amazon CloudFront API Reference
See Also

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


54
Amazon CloudFront API Reference
CreateInvalidation

CreateInvalidation
Create a new invalidation.

Request Syntax
POST /2020-05-31/distribution/DistributionId/invalidation HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<InvalidationBatch xmlns="[Link]
<CallerReference>string</CallerReference>
<Paths>
<Items>
<Path>string</Path>
</Items>
<Quantity>integer</Quantity>
</Paths>
</InvalidationBatch>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

InvalidationBatch (p. 55)

Root level tag for the InvalidationBatch parameters.

Required: Yes
CallerReference (p. 55)

A value that you specify to uniquely identify an invalidation request. CloudFront uses the value
to prevent you from accidentally resubmitting an identical request. Whenever you create a new
invalidation request, you must specify a new value for CallerReference and change other values
in the request as applicable. One way to ensure that the value of CallerReference is unique is to
use a timestamp, for example, 20120301090000.

If you make a second invalidation request with the same value for CallerReference, and if the
rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead,
CloudFront returns information about the invalidation request that you previously created with the
same CallerReference.

If CallerReference is a value you already sent in a previous invalidation batch request


but the content of any Path is different from the original request, CloudFront returns an
InvalidationBatchAlreadyExists error.

Type: String

Required: Yes
Paths (p. 55)

A complex type that contains information about the objects that you want to invalidate. For more
information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide.

Type: Paths (p. 386) object

API Version 2020-05-31


55
Amazon CloudFront API Reference
Response Syntax

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<Invalidation>
<CreateTime>timestamp</CreateTime>
<Id>string</Id>
<InvalidationBatch>
<CallerReference>string</CallerReference>
<Paths>
<Items>
<Path>string</Path>
</Items>
<Quantity>integer</Quantity>
</Paths>
</InvalidationBatch>
<Status>string</Status>
</Invalidation>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

Invalidation (p. 56)

Root level tag for the Invalidation parameters.

Required: Yes
CreateTime (p. 56)

The date and time the invalidation request was first made.

Type: Timestamp
Id (p. 56)

The identifier for the invalidation request. For example: IDFDVBD632BHDS5.

Type: String
InvalidationBatch (p. 56)

The current invalidation information for the batch request.

Type: InvalidationBatch (p. 354) object


Status (p. 56)

The status of the invalidation request. When the invalidation batch is finished, the status is
Completed.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

API Version 2020-05-31


56
Amazon CloudFront API Reference
See Also

AccessDenied

Access denied.

HTTP Status Code: 403


BatchTooLarge

Invalidation batch specified is too large.

HTTP Status Code: 413


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404


TooManyInvalidationsInProgress

You have exceeded the maximum number of allowable InProgress invalidation batch requests, or
invalidation objects.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


57
Amazon CloudFront API Reference
CreateMonitoringSubscription

CreateMonitoringSubscription
Enables additional CloudWatch metrics for the specified CloudFront distribution. The additional metrics
incur an additional cost.

For more information, see Viewing additional CloudFront distribution metrics in the Amazon CloudFront
Developer Guide.

Request Syntax
POST /2020-05-31/distributions/DistributionId/monitoring-subscription HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<MonitoringSubscription xmlns="[Link]
<RealtimeMetricsSubscriptionConfig>
<RealtimeMetricsSubscriptionStatus>string</RealtimeMetricsSubscriptionStatus>
</RealtimeMetricsSubscriptionConfig>
</MonitoringSubscription>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

MonitoringSubscription (p. 58)

Root level tag for the MonitoringSubscription parameters.

Required: Yes
RealtimeMetricsSubscriptionConfig (p. 58)

A subscription configuration for additional CloudWatch metrics.

Type: RealtimeMetricsSubscriptionConfig (p. 399) object

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<MonitoringSubscription>
<RealtimeMetricsSubscriptionConfig>
<RealtimeMetricsSubscriptionStatus>string</RealtimeMetricsSubscriptionStatus>
</RealtimeMetricsSubscriptionConfig>
</MonitoringSubscription>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

API Version 2020-05-31


58
Amazon CloudFront API Reference
Errors

MonitoringSubscription (p. 58)

Root level tag for the MonitoringSubscription parameters.

Required: Yes
RealtimeMetricsSubscriptionConfig (p. 58)

A subscription configuration for additional CloudWatch metrics.

Type: RealtimeMetricsSubscriptionConfig (p. 399) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


59
Amazon CloudFront API Reference
CreateOriginRequestPolicy

CreateOriginRequestPolicy
Creates an origin request policy.

After you create an origin request policy, you can attach it to one or more cache behaviors. When it’s
attached to a cache behavior, the origin request policy determines the values that CloudFront includes
in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the
following:

• The request body and the URL path (without the domain name) from the viewer request.
• The headers that CloudFront automatically includes in every origin request, including Host, User-
Agent, and X-Amz-Cf-Id.
• All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin
request policy. These can include items from the viewer request and, in the case of headers, additional
ones that are added by CloudFront.

CloudFront sends a request when it can’t find a valid object in its cache that matches the request. If you
want to send values to the origin and also include them in the cache key, use CachePolicy.

For more information about origin request policies, see Controlling origin requests in the Amazon
CloudFront Developer Guide.

Request Syntax
POST /2020-05-31/origin-request-policy HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicyConfig xmlns="[Link]
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>

API Version 2020-05-31


60
Amazon CloudFront API Reference
URI Request Parameters

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

OriginRequestPolicyConfig (p. 60)

Root level tag for the OriginRequestPolicyConfig parameters.

Required: Yes
Comment (p. 60)

A comment to describe the origin request policy.

Type: String

Required: No
CookiesConfig (p. 60)

The cookies from viewer requests to include in origin requests.

Type: OriginRequestPolicyCookiesConfig (p. 377) object

Required: Yes
HeadersConfig (p. 60)

The HTTP headers to include in origin requests. These can include headers from viewer requests and
additional headers added by CloudFront.

Type: OriginRequestPolicyHeadersConfig (p. 378) object

Required: Yes
Name (p. 60)

A unique name to identify the origin request policy.

Type: String

Required: Yes
QueryStringsConfig (p. 60)

The URL query strings from viewer requests to include in origin requests.

Type: OriginRequestPolicyQueryStringsConfig (p. 380) object

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicy>

API Version 2020-05-31


61
Amazon CloudFront API Reference
Response Elements

<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<OriginRequestPolicyConfig>
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>
</OriginRequestPolicy>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

OriginRequestPolicy (p. 61)

Root level tag for the OriginRequestPolicy parameters.

Required: Yes
Id (p. 61)

The unique identifier for the origin request policy.

Type: String
LastModifiedTime (p. 61)

The date and time when the origin request policy was last modified.

Type: Timestamp
OriginRequestPolicyConfig (p. 61)

The origin request policy configuration.

Type: OriginRequestPolicyConfig (p. 375) object

API Version 2020-05-31


62
Amazon CloudFront API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


OriginRequestPolicyAlreadyExists

An origin request policy with this name already exists. You must provide a unique name. To modify
an existing origin request policy, use UpdateOriginRequestPolicy.

HTTP Status Code: 409


TooManyCookiesInOriginRequestPolicy

The number of cookies in the origin request policy exceeds the maximum. For more information, see
Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyHeadersInOriginRequestPolicy

The number of headers in the origin request policy exceeds the maximum. For more information, see
Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyOriginRequestPolicies

You have reached the maximum number of origin request policies for this AWS account. For more
information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyQueryStringsInOriginRequestPolicy

The number of query strings in the origin request policy exceeds the maximum. For more
information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET

API Version 2020-05-31


63
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


64
Amazon CloudFront API Reference
CreatePublicKey

CreatePublicKey
Add a new public key to CloudFront to use, for example, for field-level encryption. You can add a
maximum of 10 public keys with one AWS account.

Request Syntax
POST /2020-05-31/public-key HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<PublicKeyConfig xmlns="[Link]
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncodedKey>string</EncodedKey>
<Name>string</Name>
</PublicKeyConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

PublicKeyConfig (p. 65)

Root level tag for the PublicKeyConfig parameters.

Required: Yes
CallerReference (p. 65)

A unique number that ensures that the request can't be replayed.

Type: String

Required: Yes
Comment (p. 65)

An optional comment about a public key.

Type: String

Required: No
EncodedKey (p. 65)

The encoded public key that you want to add to CloudFront to use with features like field-level
encryption.

Type: String

Required: Yes
Name (p. 65)

The name for a public key you add to CloudFront to use with features like field-level encryption.

API Version 2020-05-31


65
Amazon CloudFront API Reference
Response Syntax

Type: String

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<PublicKey>
<CreatedTime>timestamp</CreatedTime>
<Id>string</Id>
<PublicKeyConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncodedKey>string</EncodedKey>
<Name>string</Name>
</PublicKeyConfig>
</PublicKey>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

PublicKey (p. 66)

Root level tag for the PublicKey parameters.

Required: Yes
CreatedTime (p. 66)

A time you added a public key to CloudFront.

Type: Timestamp
Id (p. 66)

A unique ID assigned to a public key you've added to CloudFront.

Type: String
PublicKeyConfig (p. 66)

A complex data type for a public key you add to CloudFront to use with features like field-level
encryption.

Type: PublicKeyConfig (p. 388) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

API Version 2020-05-31


66
Amazon CloudFront API Reference
See Also

PublicKeyAlreadyExists

The specified public key already exists.

HTTP Status Code: 409


TooManyPublicKeys

The maximum number of public keys for field-level encryption have been created. To create a new
public key, delete one of the existing keys.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


67
Amazon CloudFront API Reference
CreateRealtimeLogConfig

CreateRealtimeLogConfig
Creates a real-time log configuration.

After you create a real-time log configuration, you can attach it to one or more cache behaviors to send
real-time log data to the specified Amazon Kinesis data stream.

For more information about real-time log configurations, see Real-time logs in the Amazon CloudFront
Developer Guide.

Request Syntax
POST /2020-05-31/realtime-log-config HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<CreateRealtimeLogConfigRequest xmlns="[Link]
<EndPoints>
<EndPoint>
<KinesisStreamConfig>
<RoleARN>string</RoleARN>
<StreamARN>string</StreamARN>
</KinesisStreamConfig>
<StreamType>string</StreamType>
</EndPoint>
</EndPoints>
<Fields>
<Field>string</Field>
</Fields>
<Name>string</Name>
<SamplingRate>long</SamplingRate>
</CreateRealtimeLogConfigRequest>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

CreateRealtimeLogConfigRequest (p. 68)

Root level tag for the CreateRealtimeLogConfigRequest parameters.

Required: Yes
EndPoints (p. 68)

Contains information about the Amazon Kinesis data stream where you are sending real-time log
data.

Type: Array of EndPoint (p. 337) objects

Required: Yes
Fields (p. 68)

A list of fields to include in each real-time log record.

For more information about fields, see Real-time log configuration fields in the Amazon CloudFront
Developer Guide.

API Version 2020-05-31


68
Amazon CloudFront API Reference
Response Syntax

Type: Array of strings

Required: Yes
Name (p. 68)

A unique name to identify this real-time log configuration.

Type: String

Required: Yes
SamplingRate (p. 68)

The sampling rate for this real-time log configuration. The sampling rate determines the percentage
of viewer requests that are represented in the real-time log data. You must provide an integer
between 1 and 100, inclusive.

Type: Long

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<CreateRealtimeLogConfigResult>
<RealtimeLogConfig>
<ARN>string</ARN>
<EndPoints>
<EndPoint>
<KinesisStreamConfig>
<RoleARN>string</RoleARN>
<StreamARN>string</StreamARN>
</KinesisStreamConfig>
<StreamType>string</StreamType>
</EndPoint>
</EndPoints>
<Fields>
<Field>string</Field>
</Fields>
<Name>string</Name>
<SamplingRate>long</SamplingRate>
</RealtimeLogConfig>
</CreateRealtimeLogConfigResult>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

CreateRealtimeLogConfigResult (p. 69)

Root level tag for the CreateRealtimeLogConfigResult parameters.

Required: Yes
RealtimeLogConfig (p. 69)

A real-time log configuration.

API Version 2020-05-31


69
Amazon CloudFront API Reference
Errors

Type: RealtimeLogConfig (p. 396) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


RealtimeLogConfigAlreadyExists

A real-time log configuration with this name already exists. You must provide a unique name. To
modify an existing real-time log configuration, use UpdateRealtimeLogConfig.

HTTP Status Code: 409


TooManyRealtimeLogConfigs

You have reached the maximum number of real-time log configurations for this AWS account. For
more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


70
Amazon CloudFront API Reference
CreateStreamingDistribution

CreateStreamingDistribution
Creates a new RTMP distribution. An RTMP distribution is similar to a web distribution, but an RTMP
distribution streams media files using the Adobe Real-Time Messaging Protocol (RTMP) instead of
serving files using HTTP.

To create a new distribution, submit a POST request to the CloudFront API version/distribution resource.
The request body must include a document with a StreamingDistributionConfig element. The response
echoes the StreamingDistributionConfig element and returns other information about the RTMP
distribution.

To get the status of your request, use the GET StreamingDistribution API action. When the value of
Enabled is true and the value of Status is Deployed, your distribution is ready. A distribution usually
deploys in less than 15 minutes.

For more information about web distributions, see Working with RTMP Distributions in the Amazon
CloudFront Developer Guide.
Important
Beginning with the 2012-05-05 version of the CloudFront API, we made substantial changes
to the format of the XML document that you include in the request body when you create
or update a web distribution or an RTMP distribution, and when you invalidate objects. With
previous versions of the API, we discovered that it was too easy to accidentally delete one or
more values for an element that accepts multiple values, for example, CNAMEs and trusted
signers. Our changes for the 2012-05-05 release are intended to prevent these accidental
deletions and to notify you when there's a mismatch between the number of values you say
you're specifying in the Quantity element and the number of values specified.

Request Syntax
POST /2020-05-31/streaming-distribution HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfig xmlns="[Link]
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>

API Version 2020-05-31


71
Amazon CloudFront API Reference
URI Request Parameters

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

StreamingDistributionConfig (p. 71)

Root level tag for the StreamingDistributionConfig parameters.

Required: Yes
Aliases (p. 71)

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

Type: Aliases (p. 279) object

Required: No
CallerReference (p. 71)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


StreamingDistributionConfig object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String

Required: Yes
Comment (p. 71)

Any comments you want to include about the streaming distribution.

Type: String

Required: Yes
Enabled (p. 71)

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

Type: Boolean

Required: Yes
Logging (p. 71)

A complex type that controls whether access logs are written for the streaming distribution.

Type: StreamingLoggingConfig (p. 414) object

Required: No
PriceClass (p. 71)

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

API Version 2020-05-31


72
Amazon CloudFront API Reference
Response Syntax

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: No
S3Origin (p. 71)

A complex type that contains information about the Amazon S3 bucket from which you want
CloudFront to get your media files for distribution.

Type: S3Origin (p. 401) object

Required: Yes
TrustedSigners (p. 71)

A complex type that specifies any AWS accounts that you want to permit to create signed URLs for
private content. If you want the distribution to use signed URLs, include this element; if you want
the distribution to use public URLs, remove this element. For more information, see Serving Private
Content through CloudFront in the Amazon CloudFront Developer Guide.

Type: TrustedSigners (p. 418) object

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<ARN>string</ARN>
<DomainName>string</DomainName>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
<StreamingDistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>

API Version 2020-05-31


73
Amazon CloudFront API Reference
Response Elements

<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>
</StreamingDistribution>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

StreamingDistribution (p. 73)

Root level tag for the StreamingDistribution parameters.

Required: Yes
ActiveTrustedSigners (p. 73)

A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed
URLs for private content.

The Signer complex type lists the AWS account number of the trusted signer or self if the signer
is the AWS account that created the distribution. The Signer element also includes the IDs of
any active CloudFront key pairs that are associated with the trusted signer's AWS account. If no
KeyPairId element appears for a Signer, that signer can't create signed URLs.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Type: ActiveTrustedSigners (p. 278) object


ARN (p. 73)

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

Type: String
DomainName (p. 73)

The domain name that corresponds to the streaming distribution, for example,
[Link].

Type: String
Id (p. 73)

The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.

API Version 2020-05-31


74
Amazon CloudFront API Reference
Errors

Type: String
LastModifiedTime (p. 73)

The date and time that the distribution was last modified.

Type: Timestamp
Status (p. 73)

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

Type: String
StreamingDistributionConfig (p. 73)

The current configuration information for the RTMP distribution.

Type: StreamingDistributionConfig (p. 407) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CNAMEAlreadyExists

The CNAME specified is already defined for CloudFront.

HTTP Status Code: 409


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidOrigin

The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

HTTP Status Code: 400


InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

API Version 2020-05-31


75
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


StreamingDistributionAlreadyExists

The caller reference you attempted to create the streaming distribution with is associated with
another distribution

HTTP Status Code: 409


TooManyStreamingDistributionCNAMEs

Your request contains more CNAMEs than are allowed per distribution.

HTTP Status Code: 400


TooManyStreamingDistributions

Processing your request would cause you to exceed the maximum number of streaming distributions
allowed.

HTTP Status Code: 400


TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400


TrustedSignerDoesNotExist

One or more of your trusted signers don't exist.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


76
Amazon CloudFront API Reference
CreateStreamingDistributionWithTags

CreateStreamingDistributionWithTags
Create a new streaming distribution with tags.

Request Syntax
POST /2020-05-31/streaming-distribution?WithTags HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfigWithTags xmlns="[Link]
doc/2020-05-31/">
<StreamingDistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>
<Tags>
<Items>
<Tag>
<Key>string</Key>
<Value>string</Value>
</Tag>
</Items>
</Tags>
</StreamingDistributionConfigWithTags>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

StreamingDistributionConfigWithTags (p. 77)

Root level tag for the StreamingDistributionConfigWithTags parameters.

API Version 2020-05-31


77
Amazon CloudFront API Reference
Response Syntax

Required: Yes
StreamingDistributionConfig (p. 77)

A streaming distribution Configuration.

Type: StreamingDistributionConfig (p. 407) object

Required: Yes
Tags (p. 77)

A complex type that contains zero or more Tag elements.

Type: Tags (p. 417) object

Required: Yes

Response Syntax
HTTP/1.1 201
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<ARN>string</ARN>
<DomainName>string</DomainName>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
<StreamingDistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>

API Version 2020-05-31


78
Amazon CloudFront API Reference
Response Elements

<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>
</StreamingDistribution>

Response Elements
If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in XML format by the service.

StreamingDistribution (p. 78)

Root level tag for the StreamingDistribution parameters.

Required: Yes
ActiveTrustedSigners (p. 78)

A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed
URLs for private content.

The Signer complex type lists the AWS account number of the trusted signer or self if the signer
is the AWS account that created the distribution. The Signer element also includes the IDs of
any active CloudFront key pairs that are associated with the trusted signer's AWS account. If no
KeyPairId element appears for a Signer, that signer can't create signed URLs.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Type: ActiveTrustedSigners (p. 278) object


ARN (p. 78)

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

Type: String
DomainName (p. 78)

The domain name that corresponds to the streaming distribution, for example,
[Link].

Type: String
Id (p. 78)

The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.

Type: String
LastModifiedTime (p. 78)

The date and time that the distribution was last modified.

Type: Timestamp

API Version 2020-05-31


79
Amazon CloudFront API Reference
Errors

Status (p. 78)

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

Type: String
StreamingDistributionConfig (p. 78)

The current configuration information for the RTMP distribution.

Type: StreamingDistributionConfig (p. 407) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CNAMEAlreadyExists

The CNAME specified is already defined for CloudFront.

HTTP Status Code: 409


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidOrigin

The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.

HTTP Status Code: 400


InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400


InvalidTagging

The tagging specified is not valid.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400

API Version 2020-05-31


80
Amazon CloudFront API Reference
See Also

StreamingDistributionAlreadyExists

The caller reference you attempted to create the streaming distribution with is associated with
another distribution

HTTP Status Code: 409


TooManyStreamingDistributionCNAMEs

Your request contains more CNAMEs than are allowed per distribution.

HTTP Status Code: 400


TooManyStreamingDistributions

Processing your request would cause you to exceed the maximum number of streaming distributions
allowed.

HTTP Status Code: 400


TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400


TrustedSignerDoesNotExist

One or more of your trusted signers don't exist.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


81
Amazon CloudFront API Reference
DeleteCachePolicy

DeleteCachePolicy
Deletes a cache policy.

You cannot delete a cache policy if it’s attached to a cache behavior. First update your distributions to
remove the cache policy from all cache behaviors, then delete the cache policy.

To delete a cache policy, you must provide the policy’s identifier and version. To get these values, you can
use ListCachePolicies or GetCachePolicy.

Request Syntax
DELETE /2020-05-31/cache-policy/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 82)

The unique identifier for the cache policy that you are deleting. To get the identifier, you can use
ListCachePolicies.

Required: Yes
If-Match (p. 82)

The version of the cache policy that you are deleting. The version is the cache policy’s ETag value,
which you can get using ListCachePolicies, GetCachePolicy, or GetCachePolicyConfig.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403

API Version 2020-05-31


82
Amazon CloudFront API Reference
See Also

CachePolicyInUse

Cannot delete the cache policy because it is attached to one or more cache behaviors.

HTTP Status Code: 409


IllegalDelete

You cannot delete a managed policy.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


83
Amazon CloudFront API Reference
DeleteCloudFrontOriginAccessIdentity

DeleteCloudFrontOriginAccessIdentity
Delete an origin access identity.

Request Syntax
DELETE /2020-05-31/origin-access-identity/cloudfront/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 84)

The origin access identity's ID.

Required: Yes
If-Match (p. 84)

The value of the ETag header you received from a previous GET or PUT request. For example:
E2QWRUHAPOMQZL.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CloudFrontOriginAccessIdentityInUse

The Origin Access Identity specified is already in use.

HTTP Status Code: 409


InvalidIfMatchVersion

The If-Match version is missing or not valid.

API Version 2020-05-31


84
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


NoSuchCloudFrontOriginAccessIdentity

The specified origin access identity does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


85
Amazon CloudFront API Reference
DeleteDistribution

DeleteDistribution
Delete a distribution.

Request Syntax
DELETE /2020-05-31/distribution/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 86)

The distribution ID.

Required: Yes
If-Match (p. 86)

The value of the ETag header that you received when you disabled the distribution. For example:
E2QWRUHAPOMQZL.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


DistributionNotDisabled

The specified CloudFront distribution is not disabled. You must disable the distribution before you
can delete it.

HTTP Status Code: 409

API Version 2020-05-31


86
Amazon CloudFront API Reference
See Also

InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


87
Amazon CloudFront API Reference
DeleteFieldLevelEncryptionConfig

DeleteFieldLevelEncryptionConfig
Remove a field-level encryption configuration.

Request Syntax
DELETE /2020-05-31/field-level-encryption/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 88)

The ID of the configuration you want to delete from CloudFront.

Required: Yes
If-Match (p. 88)

The value of the ETag header that you received when retrieving the configuration identity to delete.
For example: E2QWRUHAPOMQZL.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


FieldLevelEncryptionConfigInUse

The specified configuration for field-level encryption is in use.

HTTP Status Code: 409


InvalidIfMatchVersion

The If-Match version is missing or not valid.

API Version 2020-05-31


88
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


89
Amazon CloudFront API Reference
DeleteFieldLevelEncryptionProfile

DeleteFieldLevelEncryptionProfile
Remove a field-level encryption profile.

Request Syntax
DELETE /2020-05-31/field-level-encryption-profile/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 90)

Request the ID of the profile you want to delete from CloudFront.

Required: Yes
If-Match (p. 90)

The value of the ETag header that you received when retrieving the profile to delete. For example:
E2QWRUHAPOMQZL.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


FieldLevelEncryptionProfileInUse

The specified profile for field-level encryption is in use.

HTTP Status Code: 409


InvalidIfMatchVersion

The If-Match version is missing or not valid.

API Version 2020-05-31


90
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


NoSuchFieldLevelEncryptionProfile

The specified profile for field-level encryption doesn't exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


91
Amazon CloudFront API Reference
DeleteMonitoringSubscription

DeleteMonitoringSubscription
Disables additional CloudWatch metrics for the specified CloudFront distribution.

Request Syntax
DELETE /2020-05-31/distributions/DistributionId/monitoring-subscription HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

DistributionId (p. 92)

The ID of the distribution that you are disabling metrics for.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200

Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

API Version 2020-05-31


92
Amazon CloudFront API Reference
See Also

• AWS SDK for .NET


• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


93
Amazon CloudFront API Reference
DeleteOriginRequestPolicy

DeleteOriginRequestPolicy
Deletes an origin request policy.

You cannot delete an origin request policy if it’s attached to any cache behaviors. First update your
distributions to remove the origin request policy from all cache behaviors, then delete the origin request
policy.

To delete an origin request policy, you must provide the policy’s identifier and version. To get the
identifier, you can use ListOriginRequestPolicies or GetOriginRequestPolicy.

Request Syntax
DELETE /2020-05-31/origin-request-policy/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 94)

The unique identifier for the origin request policy that you are deleting. To get the identifier, you can
use ListOriginRequestPolicies.

Required: Yes
If-Match (p. 94)

The version of the origin request policy that you are deleting. The version is the origin
request policy’s ETag value, which you can get using ListOriginRequestPolicies,
GetOriginRequestPolicy, or GetOriginRequestPolicyConfig.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

API Version 2020-05-31


94
Amazon CloudFront API Reference
See Also

HTTP Status Code: 403


IllegalDelete

You cannot delete a managed policy.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404


OriginRequestPolicyInUse

Cannot delete the origin request policy because it is attached to one or more cache behaviors.

HTTP Status Code: 409


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


95
Amazon CloudFront API Reference
DeletePublicKey

DeletePublicKey
Remove a public key you previously added to CloudFront.

Request Syntax
DELETE /2020-05-31/public-key/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 96)

The ID of the public key you want to remove from CloudFront.

Required: Yes
If-Match (p. 96)

The value of the ETag header that you received when retrieving the public key identity to delete. For
example: E2QWRUHAPOMQZL.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchPublicKey

The specified public key doesn't exist.

API Version 2020-05-31


96
Amazon CloudFront API Reference
See Also

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


PublicKeyInUse

The specified public key is in use.

HTTP Status Code: 409

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


97
Amazon CloudFront API Reference
DeleteRealtimeLogConfig

DeleteRealtimeLogConfig
Deletes a real-time log configuration.

You cannot delete a real-time log configuration if it’s attached to a cache behavior. First update your
distributions to remove the real-time log configuration from all cache behaviors, then delete the real-
time log configuration.

To delete a real-time log configuration, you can provide the configuration’s name or its Amazon Resource
Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify
the real-time log configuration to delete.

Request Syntax
POST /2020-05-31/delete-realtime-log-config/ HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<DeleteRealtimeLogConfigRequest xmlns="[Link]
<ARN>string</ARN>
<Name>string</Name>
</DeleteRealtimeLogConfigRequest>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

DeleteRealtimeLogConfigRequest (p. 98)

Root level tag for the DeleteRealtimeLogConfigRequest parameters.

Required: Yes
ARN (p. 98)

The Amazon Resource Name (ARN) of the real-time log configuration to delete.

Type: String

Required: No
Name (p. 98)

The name of the real-time log configuration to delete.

Type: String

Required: No

Response Syntax
HTTP/1.1 204

API Version 2020-05-31


98
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchRealtimeLogConfig

The real-time log configuration does not exist.

HTTP Status Code: 404


RealtimeLogConfigInUse

Cannot delete the real-time log configuration because it is attached to one or more cache behaviors.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


99
Amazon CloudFront API Reference
DeleteStreamingDistribution

DeleteStreamingDistribution
Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the
following steps.

To delete an RTMP distribution using the CloudFront API:

1. Disable the RTMP distribution.


2. Submit a GET Streaming Distribution Config request to get the current configuration and the
Etag header for the distribution.
3. Update the XML document that was returned in the response to your GET Streaming
Distribution Config request to change the value of Enabled to false.
4. Submit a PUT Streaming Distribution Config request to update the configuration for your
distribution. In the request body, include the XML document that you updated in Step 3. Then set the
value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when
you submitted the GET Streaming Distribution Config request in Step 2.
5. Review the response to the PUT Streaming Distribution Config request to confirm that the
distribution was successfully disabled.
6. Submit a GET Streaming Distribution Config request to confirm that your changes have
propagated. When propagation is complete, the value of Status is Deployed.
7. Submit a DELETE Streaming Distribution request. Set the value of the HTTP If-Match header
to the value of the ETag header that CloudFront returned when you submitted the GET Streaming
Distribution Config request in Step 2.
8. Review the response to your DELETE Streaming Distribution request to confirm that the
distribution was successfully deleted.

For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in
the Amazon CloudFront Developer Guide.

Request Syntax
DELETE /2020-05-31/streaming-distribution/Id HTTP/1.1
If-Match: IfMatch

URI Request Parameters


The request uses the following URI parameters.

Id (p. 100)

The distribution ID.

Required: Yes
If-Match (p. 100)

The value of the ETag header that you received when you disabled the streaming distribution. For
example: E2QWRUHAPOMQZL.

Request Body
The request does not have a request body.

API Version 2020-05-31


100
Amazon CloudFront API Reference
Response Syntax

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchStreamingDistribution

The specified streaming distribution does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


StreamingDistributionNotDisabled

The specified CloudFront distribution is not disabled. You must disable the distribution before you
can delete it.

HTTP Status Code: 409

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


101
Amazon CloudFront API Reference
See Also

API Version 2020-05-31


102
Amazon CloudFront API Reference
GetCachePolicy

GetCachePolicy
Gets a cache policy, including the following metadata:

• The policy’s identifier.


• The date and time when the policy was last modified.

To get a cache policy, you must provide the policy’s identifier. If the cache policy is attached to a
distribution’s cache behavior, you can get the policy’s identifier using ListDistributions or
GetDistribution. If the cache policy is not attached to a cache behavior, you can get the identifier
using ListCachePolicies.

Request Syntax
GET /2020-05-31/cache-policy/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 103)

The unique identifier for the cache policy. If the cache policy is attached to a distribution’s cache
behavior, you can get the policy’s identifier using ListDistributions or GetDistribution.
If the cache policy is not attached to a cache behavior, you can get the identifier using
ListCachePolicies.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicy>
<CachePolicyConfig>
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>

API Version 2020-05-31


103
Amazon CloudFront API Reference
Response Elements

<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</CachePolicy>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CachePolicy (p. 103)

Root level tag for the CachePolicy parameters.

Required: Yes
CachePolicyConfig (p. 103)

The cache policy configuration.

Type: CachePolicyConfig (p. 291) object


Id (p. 103)

The unique identifier for the cache policy.

Type: String
LastModifiedTime (p. 103)

The date and time when the cache policy was last modified.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

API Version 2020-05-31


104
Amazon CloudFront API Reference
See Also

HTTP Status Code: 403


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


105
Amazon CloudFront API Reference
GetCachePolicyConfig

GetCachePolicyConfig
Gets a cache policy configuration.

To get a cache policy configuration, you must provide the policy’s identifier. If the cache
policy is attached to a distribution’s cache behavior, you can get the policy’s identifier using
ListDistributions or GetDistribution. If the cache policy is not attached to a cache behavior, you
can get the identifier using ListCachePolicies.

Request Syntax
GET /2020-05-31/cache-policy/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 106)

The unique identifier for the cache policy. If the cache policy is attached to a distribution’s cache
behavior, you can get the policy’s identifier using ListDistributions or GetDistribution.
If the cache policy is not attached to a cache behavior, you can get the identifier using
ListCachePolicies.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicyConfig>
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>

API Version 2020-05-31


106
Amazon CloudFront API Reference
Response Elements

<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CachePolicyConfig (p. 106)

Root level tag for the CachePolicyConfig parameters.

Required: Yes
Comment (p. 106)

A comment to describe the cache policy.

Type: String
DefaultTTL (p. 106)

The default amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated.
CloudFront uses this value as the object’s time to live (TTL) only when the origin does not send
Cache-Control or Expires headers with the object. For more information, see Managing How
Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than
86400 seconds, then the default value for this field is the same as the value of MinTTL.

Type: Long
MaxTTL (p. 106)

The maximum amount of time, in seconds, that objects stay in the CloudFront cache before
CloudFront sends another request to the origin to see if the object has been updated. CloudFront
uses this value only when the origin sends Cache-Control or Expires headers with the object.
For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

The default value for this field is 31536000 seconds (one year). If the value of MinTTL or
DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the
value of DefaultTTL.

Type: Long

API Version 2020-05-31


107
Amazon CloudFront API Reference
Errors

MinTTL (p. 106)

The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated. For
more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

Type: Long
Name (p. 106)

A unique name to identify the cache policy.

Type: String
ParametersInCacheKeyAndForwardedToOrigin (p. 106)

The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in
the cache key are automatically included in requests that CloudFront sends to the origin.

Type: ParametersInCacheKeyAndForwardedToOrigin (p. 384) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


108
Amazon CloudFront API Reference
GetCloudFrontOriginAccessIdentity

GetCloudFrontOriginAccessIdentity
Get the information about an origin access identity.

Request Syntax
GET /2020-05-31/origin-access-identity/cloudfront/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 109)

The identity's ID.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentity>
<CloudFrontOriginAccessIdentityConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
</CloudFrontOriginAccessIdentityConfig>
<Id>string</Id>
<S3CanonicalUserId>string</S3CanonicalUserId>
</CloudFrontOriginAccessIdentity>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CloudFrontOriginAccessIdentity (p. 109)

Root level tag for the CloudFrontOriginAccessIdentity parameters.

Required: Yes
CloudFrontOriginAccessIdentityConfig (p. 109)

The current configuration information for the identity.

Type: CloudFrontOriginAccessIdentityConfig (p. 299) object


Id (p. 109)

The ID for the origin access identity, for example, E74FTE3AJFJ256A.

API Version 2020-05-31


109
Amazon CloudFront API Reference
Errors

Type: String
S3CanonicalUserId (p. 109)

The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access
identity read permission to an object in Amazon S3.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchCloudFrontOriginAccessIdentity

The specified origin access identity does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


110
Amazon CloudFront API Reference
GetCloudFrontOriginAccessIdentityConfig

GetCloudFrontOriginAccessIdentityConfig
Get the configuration information about an origin access identity.

Request Syntax
GET /2020-05-31/origin-access-identity/cloudfront/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 111)

The identity's ID.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentityConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
</CloudFrontOriginAccessIdentityConfig>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CloudFrontOriginAccessIdentityConfig (p. 111)

Root level tag for the CloudFrontOriginAccessIdentityConfig parameters.

Required: Yes
CallerReference (p. 111)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


CloudFrontOriginAccessIdentityConfig object), a new origin access identity is created.

If the CallerReference is a value already sent in a previous identity request, and the content of
the CloudFrontOriginAccessIdentityConfig is identical to the original request (ignoring
white space), the response includes the same information returned to the original request.

API Version 2020-05-31


111
Amazon CloudFront API Reference
Errors

If the CallerReference is a value you already sent in a previous request to create an identity, but
the content of the CloudFrontOriginAccessIdentityConfig is different from the original
request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists error.

Type: String
Comment (p. 111)

Any comments you want to include about the origin access identity.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchCloudFrontOriginAccessIdentity

The specified origin access identity does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


112
Amazon CloudFront API Reference
GetDistribution

GetDistribution
Get the information about a distribution.

Request Syntax
GET /2020-05-31/distribution/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 113)

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<Distribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>
</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<DistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>

API Version 2020-05-31


113
Amazon CloudFront API Reference
Response Syntax

<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>

API Version 2020-05-31


114
Amazon CloudFront API Reference
Response Syntax

</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>

API Version 2020-05-31


115
Amazon CloudFront API Reference
Response Syntax

</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>

API Version 2020-05-31


116
Amazon CloudFront API Reference
Response Elements

</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<InProgressInvalidationBatches>integer</InProgressInvalidationBatches>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
</Distribution>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

Distribution (p. 113)

Root level tag for the Distribution parameters.

Required: Yes

API Version 2020-05-31


117
Amazon CloudFront API Reference
Response Elements

ActiveTrustedSigners (p. 113)

CloudFront automatically adds this element to the response only if you've set up the distribution to
serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware
of for each trusted signer. The Signer child element lists the AWS account number of the trusted
signer (or an empty Self element if the signer is you). The Signer element also includes the IDs
of any active key pairs associated with the trusted signer's AWS account. If no KeyPairId element
appears for a Signer, that signer can't create working signed URLs.

Type: ActiveTrustedSigners (p. 278) object


AliasICPRecordals (p. 113)

AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they
want to serve content publicly on an alternate domain name, also known as a CNAME, that they've
added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
distributions.

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started
with AWS services in China.

Type: Array of AliasICPRecordal (p. 280) objects


ARN (p. 113)

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

Type: String
DistributionConfig (p. 113)

The current configuration information for the distribution. Send a GET request to the /CloudFront
API version/distribution ID/config resource.

Type: DistributionConfig (p. 321) object


DomainName (p. 113)

The domain name corresponding to the distribution, for example,


[Link].

Type: String
Id (p. 113)

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String
InProgressInvalidationBatches (p. 113)

The number of invalidation batches currently in progress.

Type: Integer
LastModifiedTime (p. 113)

The date and time the distribution was last modified.

Type: Timestamp
Status (p. 113)

This response element indicates the current status of the distribution. When the status is Deployed,
the distribution's information is fully propagated to all CloudFront edge locations.

API Version 2020-05-31


118
Amazon CloudFront API Reference
Errors

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


119
Amazon CloudFront API Reference
GetDistributionConfig

GetDistributionConfig
Get the configuration information about a distribution.

Request Syntax
GET /2020-05-31/distribution/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 120)

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>

API Version 2020-05-31


120
Amazon CloudFront API Reference
Response Syntax

<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>

API Version 2020-05-31


121
Amazon CloudFront API Reference
Response Syntax

<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>

API Version 2020-05-31


122
Amazon CloudFront API Reference
Response Syntax

<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>

API Version 2020-05-31


123
Amazon CloudFront API Reference
Response Elements

</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

DistributionConfig (p. 120)

Root level tag for the DistributionConfig parameters.

Required: Yes
Aliases (p. 120)

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

Type: Aliases (p. 279) object


CacheBehaviors (p. 120)

A complex type that contains zero or more CacheBehavior elements.

Type: CacheBehaviors (p. 288) object


CallerReference (p. 120)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the DistributionConfig


object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String
Comment (p. 120)

Any comments you want to include about the distribution.

API Version 2020-05-31


124
Amazon CloudFront API Reference
Response Elements

If you don't want to specify a comment, include an empty Comment element.

To delete an existing comment, update the distribution configuration and include an empty
Comment element.

To add or change a comment, update the distribution configuration and specify the new comment.

Type: String
CustomErrorResponses (p. 120)

A complex type that controls the following:


• 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.

Type: CustomErrorResponses (p. 311) object


DefaultCacheBehavior (p. 120)

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: DefaultCacheBehavior (p. 315) object


DefaultRootObject (p. 120)

The object that you want CloudFront to request from your origin (for example, [Link])
when a viewer requests the root URL for your distribution ([Link] instead
of an object in your distribution ([Link]
Specifying a default root object avoids exposing the contents of your distribution.

Specify only the object name, for example, [Link]. Don't add a / before the object name.

If you don't want to specify a default root object when you create a distribution, include an empty
DefaultRootObject element.

To delete the default root object from an existing distribution, update the distribution configuration
and include an empty DefaultRootObject element.

To replace the default root object, update the distribution configuration and specify the new object.

For more information about the default root object, see Creating a Default Root Object in the
Amazon CloudFront Developer Guide.

Type: String
Enabled (p. 120)

From this field, you can enable or disable the selected distribution.

Type: Boolean
HttpVersion (p. 120)

(Optional) 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
automatically use an earlier HTTP version.

API Version 2020-05-31


125
Amazon CloudFront API Reference
Response Elements

For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support
Server Name Identification (SNI).

In general, configuring CloudFront to communicate with viewers using HTTP/2 reduces latency. You
can improve performance by optimizing for HTTP/2. For more information, do an Internet search for
"http/2 optimization."

Type: String

Valid Values: http1.1 | http2


IsIPV6Enabled (p. 120)

If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution,
specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS
response code NOERROR and with no IP addresses. This allows viewers to submit a second request,
for an IPv4 address for your distribution.

In general, you should enable IPv6 if you have users on IPv6 networks who want to access your
content. However, if you're using signed URLs or signed cookies to restrict access to your content,
and if you're using a custom policy that includes the IpAddress parameter to restrict the IP
addresses that can access your content, don't enable IPv6. If you want to restrict access to some
content by IP address and not restrict access to other content (or restrict access but not by IP
address), you can create two distributions. For more information, see Creating a Signed URL Using a
Custom Policy in the Amazon CloudFront Developer Guide.

If you're using an Amazon Route 53 alias resource record set to route traffic to your CloudFront
distribution, you need to create a second alias resource record set when both of the following are
true:
• You enable IPv6 for the distribution
• You're using alternate domain names in the URLs for your objects

For more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your
Domain Name in the Amazon Route 53 Developer Guide.

If you created a CNAME resource record set, either with Amazon Route 53 or with another DNS
service, you don't need to make any changes. A CNAME record will route traffic to your distribution
regardless of the IP address format of the viewer request.

Type: Boolean
Logging (p. 120)

A complex type that controls whether access logs are written for the distribution.

For more information about logging, see Access Logs in the Amazon CloudFront Developer Guide.

Type: LoggingConfig (p. 363) object


OriginGroups (p. 120)

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

Type: OriginGroups (p. 373) object


Origins (p. 120)

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

Type: Origins (p. 382) object

API Version 2020-05-31


126
Amazon CloudFront API Reference
Errors

PriceClass (p. 120)

The price class that corresponds with the maximum price that you want to pay for CloudFront
service. If you specify PriceClass_All, CloudFront responds to requests for your objects from all
CloudFront edge locations.

If you specify a price class other than PriceClass_All, CloudFront serves your objects from the
CloudFront edge location that has the lowest latency among the edge locations in your price class.
Viewers who are in or near regions that are excluded from your specified price class may encounter
slower performance.

For more information about price classes, see Choosing the Price Class for a CloudFront Distribution
in the Amazon CloudFront Developer Guide. For information about CloudFront pricing, including how
price classes (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing.
For price class information, scroll down to see the table at the bottom of the page.

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All


Restrictions (p. 120)

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

Type: Restrictions (p. 400) object


ViewerCertificate (p. 120)

A complex type that determines the distribution’s SSL/TLS configuration for communicating with
viewers.

Type: ViewerCertificate (p. 419) object


WebACLId (p. 120)

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.
To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for example
arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-
f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using AWS WAF Classic, use the
ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that
are forwarded to CloudFront, and lets you control access to your content. Based on conditions that
you specify, such as the IP addresses that requests originate from or the values of query strings,
CloudFront responds to requests either with the requested content or with an HTTP 403 status code
(Forbidden). You can also configure CloudFront to return a custom error page when a request is
blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchDistribution

The specified distribution does not exist.

API Version 2020-05-31


127
Amazon CloudFront API Reference
See Also

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


128
Amazon CloudFront API Reference
GetFieldLevelEncryption

GetFieldLevelEncryption
Get the field-level encryption configuration information.

Request Syntax
GET /2020-05-31/field-level-encryption/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 129)

Request the ID for the field-level encryption configuration information.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryption>
<FieldLevelEncryptionConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<QueryArgProfileConfig>
<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>
<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionConfig>

API Version 2020-05-31


129
Amazon CloudFront API Reference
Response Elements

<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</FieldLevelEncryption>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryption (p. 129)

Root level tag for the FieldLevelEncryption parameters.

Required: Yes
FieldLevelEncryptionConfig (p. 129)

A complex data type that includes the profile configurations specified for field-level encryption.

Type: FieldLevelEncryptionConfig (p. 339) object


Id (p. 129)

The configuration ID for a field-level encryption configuration which includes a set of profiles that
specify certain selected data fields to be encrypted by specific public keys.

Type: String
LastModifiedTime (p. 129)

The last time the field-level encryption configuration was changed.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go

API Version 2020-05-31


130
Amazon CloudFront API Reference
See Also

• AWS SDK for Java


• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


131
Amazon CloudFront API Reference
GetFieldLevelEncryptionConfig

GetFieldLevelEncryptionConfig
Get the field-level encryption configuration information.

Request Syntax
GET /2020-05-31/field-level-encryption/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 132)

Request the ID for the field-level encryption configuration information.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<QueryArgProfileConfig>
<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>
<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionConfig>

API Version 2020-05-31


132
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryptionConfig (p. 132)

Root level tag for the FieldLevelEncryptionConfig parameters.

Required: Yes
CallerReference (p. 132)

A unique number that ensures the request can't be replayed.

Type: String
Comment (p. 132)

An optional comment about the configuration.

Type: String
ContentTypeProfileConfig (p. 132)

A complex data type that specifies when to forward content if a content type isn't recognized and
profiles to use as by default in a request if a query argument doesn't specify a profile to use.

Type: ContentTypeProfileConfig (p. 304) object


QueryArgProfileConfig (p. 132)

A complex data type that specifies when to forward content if a profile isn't found and the profile
that can be provided as a query argument in a request.

Type: QueryArgProfileConfig (p. 392) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET

API Version 2020-05-31


133
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


134
Amazon CloudFront API Reference
GetFieldLevelEncryptionProfile

GetFieldLevelEncryptionProfile
Get the field-level encryption profile information.

Request Syntax
GET /2020-05-31/field-level-encryption-profile/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 135)

Get the ID for the field-level encryption profile information.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfile>
<FieldLevelEncryptionProfileConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Name>string</Name>
</FieldLevelEncryptionProfileConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</FieldLevelEncryptionProfile>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

API Version 2020-05-31


135
Amazon CloudFront API Reference
Errors

The following data is returned in XML format by the service.

FieldLevelEncryptionProfile (p. 135)

Root level tag for the FieldLevelEncryptionProfile parameters.

Required: Yes
FieldLevelEncryptionProfileConfig (p. 135)

A complex data type that includes the profile name and the encryption entities for the field-level
encryption profile.

Type: FieldLevelEncryptionProfileConfig (p. 342) object


Id (p. 135)

The ID for a field-level encryption profile configuration which includes a set of profiles that specify
certain selected data fields to be encrypted by specific public keys.

Type: String
LastModifiedTime (p. 135)

The last time the field-level encryption profile was updated.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchFieldLevelEncryptionProfile

The specified profile for field-level encryption doesn't exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


136
Amazon CloudFront API Reference
See Also

API Version 2020-05-31


137
Amazon CloudFront API Reference
GetFieldLevelEncryptionProfileConfig

GetFieldLevelEncryptionProfileConfig
Get the field-level encryption profile configuration information.

Request Syntax
GET /2020-05-31/field-level-encryption-profile/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 138)

Get the ID for the field-level encryption profile configuration information.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfileConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Name>string</Name>
</FieldLevelEncryptionProfileConfig>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryptionProfileConfig (p. 138)

Root level tag for the FieldLevelEncryptionProfileConfig parameters.

API Version 2020-05-31


138
Amazon CloudFront API Reference
Errors

Required: Yes
CallerReference (p. 138)

A unique number that ensures that the request can't be replayed.

Type: String
Comment (p. 138)

An optional comment for the field-level encryption profile.

Type: String
EncryptionEntities (p. 138)

A complex data type of encryption entities for the field-level encryption profile that include the
public key ID, provider, and field patterns for specifying which fields to encrypt with this key.

Type: EncryptionEntities (p. 335) object


Name (p. 138)

Profile name for the field-level encryption profile.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchFieldLevelEncryptionProfile

The specified profile for field-level encryption doesn't exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


139
Amazon CloudFront API Reference
GetInvalidation

GetInvalidation
Get the information about an invalidation.

Request Syntax
GET /2020-05-31/distribution/DistributionId/invalidation/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

DistributionId (p. 140)

The distribution's ID.

Required: Yes
Id (p. 140)

The identifier for the invalidation request, for example, IDFDVBD632BHDS5.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<Invalidation>
<CreateTime>timestamp</CreateTime>
<Id>string</Id>
<InvalidationBatch>
<CallerReference>string</CallerReference>
<Paths>
<Items>
<Path>string</Path>
</Items>
<Quantity>integer</Quantity>
</Paths>
</InvalidationBatch>
<Status>string</Status>
</Invalidation>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

Invalidation (p. 140)

Root level tag for the Invalidation parameters.

API Version 2020-05-31


140
Amazon CloudFront API Reference
Errors

Required: Yes
CreateTime (p. 140)

The date and time the invalidation request was first made.

Type: Timestamp
Id (p. 140)

The identifier for the invalidation request. For example: IDFDVBD632BHDS5.

Type: String
InvalidationBatch (p. 140)

The current invalidation information for the batch request.

Type: InvalidationBatch (p. 354) object


Status (p. 140)

The status of the invalidation request. When the invalidation batch is finished, the status is
Completed.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404


NoSuchInvalidation

The specified invalidation does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3

API Version 2020-05-31


141
Amazon CloudFront API Reference
See Also

• AWS SDK for Python


• AWS SDK for Ruby V3

API Version 2020-05-31


142
Amazon CloudFront API Reference
GetMonitoringSubscription

GetMonitoringSubscription
Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront
distribution.

Request Syntax
GET /2020-05-31/distributions/DistributionId/monitoring-subscription HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

DistributionId (p. 143)

The ID of the distribution that you are getting metrics information for.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<MonitoringSubscription>
<RealtimeMetricsSubscriptionConfig>
<RealtimeMetricsSubscriptionStatus>string</RealtimeMetricsSubscriptionStatus>
</RealtimeMetricsSubscriptionConfig>
</MonitoringSubscription>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

MonitoringSubscription (p. 143)

Root level tag for the MonitoringSubscription parameters.

Required: Yes
RealtimeMetricsSubscriptionConfig (p. 143)

A subscription configuration for additional CloudWatch metrics.

Type: RealtimeMetricsSubscriptionConfig (p. 399) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

API Version 2020-05-31


143
Amazon CloudFront API Reference
See Also

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


144
Amazon CloudFront API Reference
GetOriginRequestPolicy

GetOriginRequestPolicy
Gets an origin request policy, including the following metadata:

• The policy’s identifier.


• The date and time when the policy was last modified.

To get an origin request policy, you must provide the policy’s identifier. If the origin request
policy is attached to a distribution’s cache behavior, you can get the policy’s identifier using
ListDistributions or GetDistribution. If the origin request policy is not attached to a cache
behavior, you can get the identifier using ListOriginRequestPolicies.

Request Syntax
GET /2020-05-31/origin-request-policy/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 145)

The unique identifier for the origin request policy. If the origin request policy is attached to a
distribution’s cache behavior, you can get the policy’s identifier using ListDistributions or
GetDistribution. If the origin request policy is not attached to a cache behavior, you can get the
identifier using ListOriginRequestPolicies.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicy>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<OriginRequestPolicyConfig>
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>

API Version 2020-05-31


145
Amazon CloudFront API Reference
Response Elements

<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>
</OriginRequestPolicy>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

OriginRequestPolicy (p. 145)

Root level tag for the OriginRequestPolicy parameters.

Required: Yes
Id (p. 145)

The unique identifier for the origin request policy.

Type: String
LastModifiedTime (p. 145)

The date and time when the origin request policy was last modified.

Type: Timestamp
OriginRequestPolicyConfig (p. 145)

The origin request policy configuration.

Type: OriginRequestPolicyConfig (p. 375) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchOriginRequestPolicy

The origin request policy does not exist.

API Version 2020-05-31


146
Amazon CloudFront API Reference
See Also

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


147
Amazon CloudFront API Reference
GetOriginRequestPolicyConfig

GetOriginRequestPolicyConfig
Gets an origin request policy configuration.

To get an origin request policy configuration, you must provide the policy’s identifier. If the origin
request policy is attached to a distribution’s cache behavior, you can get the policy’s identifier using
ListDistributions or GetDistribution. If the origin request policy is not attached to a cache
behavior, you can get the identifier using ListOriginRequestPolicies.

Request Syntax
GET /2020-05-31/origin-request-policy/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 148)

The unique identifier for the origin request policy. If the origin request policy is attached to a
distribution’s cache behavior, you can get the policy’s identifier using ListDistributions or
GetDistribution. If the origin request policy is not attached to a cache behavior, you can get the
identifier using ListOriginRequestPolicies.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicyConfig>
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>

API Version 2020-05-31


148
Amazon CloudFront API Reference
Response Elements

<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

OriginRequestPolicyConfig (p. 148)

Root level tag for the OriginRequestPolicyConfig parameters.

Required: Yes
Comment (p. 148)

A comment to describe the origin request policy.

Type: String
CookiesConfig (p. 148)

The cookies from viewer requests to include in origin requests.

Type: OriginRequestPolicyCookiesConfig (p. 377) object


HeadersConfig (p. 148)

The HTTP headers to include in origin requests. These can include headers from viewer requests and
additional headers added by CloudFront.

Type: OriginRequestPolicyHeadersConfig (p. 378) object


Name (p. 148)

A unique name to identify the origin request policy.

Type: String
QueryStringsConfig (p. 148)

The URL query strings from viewer requests to include in origin requests.

Type: OriginRequestPolicyQueryStringsConfig (p. 380) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403

API Version 2020-05-31


149
Amazon CloudFront API Reference
See Also

NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


150
Amazon CloudFront API Reference
GetPublicKey

GetPublicKey
Get the public key information.

Request Syntax
GET /2020-05-31/public-key/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 151)

Request the ID for the public key.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<PublicKey>
<CreatedTime>timestamp</CreatedTime>
<Id>string</Id>
<PublicKeyConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncodedKey>string</EncodedKey>
<Name>string</Name>
</PublicKeyConfig>
</PublicKey>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

PublicKey (p. 151)

Root level tag for the PublicKey parameters.

Required: Yes
CreatedTime (p. 151)

A time you added a public key to CloudFront.

Type: Timestamp

API Version 2020-05-31


151
Amazon CloudFront API Reference
Errors

Id (p. 151)

A unique ID assigned to a public key you've added to CloudFront.

Type: String
PublicKeyConfig (p. 151)

A complex data type for a public key you add to CloudFront to use with features like field-level
encryption.

Type: PublicKeyConfig (p. 388) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchPublicKey

The specified public key doesn't exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


152
Amazon CloudFront API Reference
GetPublicKeyConfig

GetPublicKeyConfig
Return public key configuration informaation

Request Syntax
GET /2020-05-31/public-key/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 153)

Request the ID for the public key configuration.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<PublicKeyConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncodedKey>string</EncodedKey>
<Name>string</Name>
</PublicKeyConfig>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

PublicKeyConfig (p. 153)

Root level tag for the PublicKeyConfig parameters.

Required: Yes
CallerReference (p. 153)

A unique number that ensures that the request can't be replayed.

Type: String
Comment (p. 153)

An optional comment about a public key.

API Version 2020-05-31


153
Amazon CloudFront API Reference
Errors

Type: String
EncodedKey (p. 153)

The encoded public key that you want to add to CloudFront to use with features like field-level
encryption.

Type: String
Name (p. 153)

The name for a public key you add to CloudFront to use with features like field-level encryption.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchPublicKey

The specified public key doesn't exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


154
Amazon CloudFront API Reference
GetRealtimeLogConfig

GetRealtimeLogConfig
Gets a real-time log configuration.

To get a real-time log configuration, you can provide the configuration’s name or its Amazon Resource
Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify
the real-time log configuration to get.

Request Syntax
POST /2020-05-31/get-realtime-log-config/ HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<GetRealtimeLogConfigRequest xmlns="[Link]
<ARN>string</ARN>
<Name>string</Name>
</GetRealtimeLogConfigRequest>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

GetRealtimeLogConfigRequest (p. 155)

Root level tag for the GetRealtimeLogConfigRequest parameters.

Required: Yes
ARN (p. 155)

The Amazon Resource Name (ARN) of the real-time log configuration to get.

Type: String

Required: No
Name (p. 155)

The name of the real-time log configuration to get.

Type: String

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<GetRealtimeLogConfigResult>
<RealtimeLogConfig>
<ARN>string</ARN>
<EndPoints>
<EndPoint>

API Version 2020-05-31


155
Amazon CloudFront API Reference
Response Elements

<KinesisStreamConfig>
<RoleARN>string</RoleARN>
<StreamARN>string</StreamARN>
</KinesisStreamConfig>
<StreamType>string</StreamType>
</EndPoint>
</EndPoints>
<Fields>
<Field>string</Field>
</Fields>
<Name>string</Name>
<SamplingRate>long</SamplingRate>
</RealtimeLogConfig>
</GetRealtimeLogConfigResult>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

GetRealtimeLogConfigResult (p. 155)

Root level tag for the GetRealtimeLogConfigResult parameters.

Required: Yes
RealtimeLogConfig (p. 155)

A real-time log configuration.

Type: RealtimeLogConfig (p. 396) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchRealtimeLogConfig

The real-time log configuration does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java

API Version 2020-05-31


156
Amazon CloudFront API Reference
See Also

• AWS SDK for JavaScript


• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


157
Amazon CloudFront API Reference
GetStreamingDistribution

GetStreamingDistribution
Gets information about a specified RTMP distribution, including the distribution configuration.

Request Syntax
GET /2020-05-31/streaming-distribution/Id HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 158)

The streaming distribution's ID.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<ARN>string</ARN>
<DomainName>string</DomainName>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
<StreamingDistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>

API Version 2020-05-31


158
Amazon CloudFront API Reference
Response Elements

<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>
</StreamingDistribution>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

StreamingDistribution (p. 158)

Root level tag for the StreamingDistribution parameters.

Required: Yes
ActiveTrustedSigners (p. 158)

A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed
URLs for private content.

The Signer complex type lists the AWS account number of the trusted signer or self if the signer
is the AWS account that created the distribution. The Signer element also includes the IDs of
any active CloudFront key pairs that are associated with the trusted signer's AWS account. If no
KeyPairId element appears for a Signer, that signer can't create signed URLs.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Type: ActiveTrustedSigners (p. 278) object


ARN (p. 158)

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

Type: String
DomainName (p. 158)

The domain name that corresponds to the streaming distribution, for example,
[Link].

Type: String

API Version 2020-05-31


159
Amazon CloudFront API Reference
Errors

Id (p. 158)

The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.

Type: String
LastModifiedTime (p. 158)

The date and time that the distribution was last modified.

Type: Timestamp
Status (p. 158)

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

Type: String
StreamingDistributionConfig (p. 158)

The current configuration information for the RTMP distribution.

Type: StreamingDistributionConfig (p. 407) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchStreamingDistribution

The specified streaming distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


160
Amazon CloudFront API Reference
GetStreamingDistributionConfig

GetStreamingDistributionConfig
Get the configuration information about a streaming distribution.

Request Syntax
GET /2020-05-31/streaming-distribution/Id/config HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Id (p. 161)

The streaming distribution's ID.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>

API Version 2020-05-31


161
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

StreamingDistributionConfig (p. 161)

Root level tag for the StreamingDistributionConfig parameters.

Required: Yes
Aliases (p. 161)

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

Type: Aliases (p. 279) object


CallerReference (p. 161)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


StreamingDistributionConfig object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String
Comment (p. 161)

Any comments you want to include about the streaming distribution.

Type: String
Enabled (p. 161)

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

Type: Boolean
Logging (p. 161)

A complex type that controls whether access logs are written for the streaming distribution.

Type: StreamingLoggingConfig (p. 414) object


PriceClass (p. 161)

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

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All


S3Origin (p. 161)

A complex type that contains information about the Amazon S3 bucket from which you want
CloudFront to get your media files for distribution.

Type: S3Origin (p. 401) object


TrustedSigners (p. 161)

A complex type that specifies any AWS accounts that you want to permit to create signed URLs for
private content. If you want the distribution to use signed URLs, include this element; if you want

API Version 2020-05-31


162
Amazon CloudFront API Reference
Errors

the distribution to use public URLs, remove this element. For more information, see Serving Private
Content through CloudFront in the Amazon CloudFront Developer Guide.

Type: TrustedSigners (p. 418) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


NoSuchStreamingDistribution

The specified streaming distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


163
Amazon CloudFront API Reference
ListCachePolicies

ListCachePolicies
Gets a list of cache policies.

You can optionally apply a filter to return only the managed policies created by AWS, or only the custom
policies created in your AWS account.

You can optionally specify the maximum number of items to receive in the response. If the total number
of items in the list exceeds the maximum that you specify, or the default maximum, the response is
paginated. To get the next page of items, send a subsequent request that specifies the NextMarker
value from the current response as the Marker value in the subsequent request.

Request Syntax
GET /2020-05-31/cache-policy?Marker=Marker&MaxItems=MaxItems&Type=Type HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 164)

Use this field when paginating results to indicate where to begin in your list of cache policies. The
response includes cache policies in the list that occur after the marker. To get the next page of the
list, set this field’s value to the value of NextMarker from the current page’s response.
MaxItems (p. 164)

The maximum number of cache policies that you want in the response.
Type (p. 164)

A filter to return only the specified kinds of cache policies. Valid values are:
• managed – Returns only the managed policies created by AWS.
• custom – Returns only the custom policies created in your AWS account.

Valid Values: managed | custom

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicyList>
<Items>
<CachePolicySummary>
<CachePolicy>
<CachePolicyConfig>
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>

API Version 2020-05-31


164
Amazon CloudFront API Reference
Response Elements

<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</CachePolicy>
<Type>string</Type>
</CachePolicySummary>
</Items>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</CachePolicyList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CachePolicyList (p. 164)

Root level tag for the CachePolicyList parameters.

Required: Yes
Items (p. 164)

Contains the cache policies in the list.

Type: Array of CachePolicySummary (p. 297) objects


MaxItems (p. 164)

The maximum number of cache policies requested.

API Version 2020-05-31


165
Amazon CloudFront API Reference
Errors

Type: Integer
NextMarker (p. 164)

If there are more items in the list than are in this response, this element is present. It contains the
value that you should use in the Marker field of a subsequent request to continue listing cache
policies where you left off.

Type: String
Quantity (p. 164)

The total number of cache policies returned in the response.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


166
Amazon CloudFront API Reference
ListCloudFrontOriginAccessIdentities

ListCloudFrontOriginAccessIdentities
Lists origin access identities.

Request Syntax
GET /2020-05-31/origin-access-identity/cloudfront?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 167)

Use this when paginating results to indicate where to begin in your list of origin access identities.
The results include identities in the list that occur after the marker. To get the next page of results,
set the Marker to the value of the NextMarker from the current page's response (which is also the
ID of the last identity on that page).
MaxItems (p. 167)

The maximum number of origin access identities you want in the response body.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentityList>
<IsTruncated>boolean</IsTruncated>
<Items>
<CloudFrontOriginAccessIdentitySummary>
<Comment>string</Comment>
<Id>string</Id>
<S3CanonicalUserId>string</S3CanonicalUserId>
</CloudFrontOriginAccessIdentitySummary>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</CloudFrontOriginAccessIdentityList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CloudFrontOriginAccessIdentityList (p. 167)

Root level tag for the CloudFrontOriginAccessIdentityList parameters.

API Version 2020-05-31


167
Amazon CloudFront API Reference
Errors

Required: Yes
IsTruncated (p. 167)

A flag that indicates whether more origin access identities remain to be listed. If your results were
truncated, you can make a follow-up pagination request using the Marker request parameter to
retrieve more items in the list.

Type: Boolean
Items (p. 167)

A complex type that contains one CloudFrontOriginAccessIdentitySummary element for each


origin access identity that was created by the current AWS account.

Type: Array of CloudFrontOriginAccessIdentitySummary (p. 302) objects


Marker (p. 167)

Use this when paginating results to indicate where to begin in your list of origin access identities.
The results include identities in the list that occur after the marker. To get the next page of results,
set the Marker to the value of the NextMarker from the current page's response (which is also the
ID of the last identity on that page).

Type: String
MaxItems (p. 167)

The maximum number of origin access identities you want in the response body.

Type: Integer
NextMarker (p. 167)

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your origin access identities where they left off.

Type: String
Quantity (p. 167)

The number of CloudFront origin access identities that were created by the current AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET

API Version 2020-05-31


168
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


169
Amazon CloudFront API Reference
ListDistributions

ListDistributions
List CloudFront distributions.

Request Syntax
GET /2020-05-31/distribution?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 170)

Use this when paginating results to indicate where to begin in your list of distributions. The results
include distributions in the list that occur after the marker. To get the next page of results, set the
Marker to the value of the NextMarker from the current page's response (which is also the ID of
the last distribution on that page).
MaxItems (p. 170)

The maximum number of distributions you want in the response body.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DistributionList>
<IsTruncated>boolean</IsTruncated>
<Items>
<DistributionSummary>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>
</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>

API Version 2020-05-31


170
Amazon CloudFront API Reference
Response Syntax

<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<Comment>string</Comment>
<CustomErrorResponses>

API Version 2020-05-31


171
Amazon CloudFront API Reference
Response Syntax

<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>

API Version 2020-05-31


172
Amazon CloudFront API Reference
Response Syntax

<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DomainName>string</DomainName>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<Id>string</Id>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<LastModifiedTime>timestamp</LastModifiedTime>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>

API Version 2020-05-31


173
Amazon CloudFront API Reference
Response Elements

</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<Status>string</Status>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionSummary>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</DistributionList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

DistributionList (p. 170)

Root level tag for the DistributionList parameters.

Required: Yes
IsTruncated (p. 170)

A flag that indicates whether more distributions remain to be listed. If your results were truncated,
you can make a follow-up pagination request using the Marker request parameter to retrieve more
distributions in the list.

Type: Boolean
Items (p. 170)

A complex type that contains one DistributionSummary element for each distribution that was
created by the current AWS account.

API Version 2020-05-31


174
Amazon CloudFront API Reference
Errors

Type: Array of DistributionSummary (p. 331) objects


Marker (p. 170)

The value you provided for the Marker request parameter.

Type: String
MaxItems (p. 170)

The value you provided for the MaxItems request parameter.

Type: Integer
NextMarker (p. 170)

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your distributions where they left off.

Type: String
Quantity (p. 170)

The number of distributions that were created by the current AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


175
Amazon CloudFront API Reference
ListDistributionsByCachePolicyId

ListDistributionsByCachePolicyId
Gets a list of distribution IDs for distributions that have a cache behavior that’s associated with the
specified cache policy.

You can optionally specify the maximum number of items to receive in the response. If the total number
of items in the list exceeds the maximum that you specify, or the default maximum, the response is
paginated. To get the next page of items, send a subsequent request that specifies the NextMarker
value from the current response as the Marker value in the subsequent request.

Request Syntax
GET /2020-05-31/distributionsByCachePolicyId/CachePolicyId?Marker=Marker&MaxItems=MaxItems
HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

CachePolicyId (p. 176)

The ID of the cache policy whose associated distribution IDs you want to list.

Required: Yes
Marker (p. 176)

Use this field when paginating results to indicate where to begin in your list of distribution IDs. The
response includes distribution IDs in the list that occur after the marker. To get the next page of the
list, set this field’s value to the value of NextMarker from the current page’s response.
MaxItems (p. 176)

The maximum number of distribution IDs that you want in the response.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DistributionIdList>
<IsTruncated>boolean</IsTruncated>
<Items>
<DistributionId>string</DistributionId>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</DistributionIdList>

API Version 2020-05-31


176
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

DistributionIdList (p. 176)

Root level tag for the DistributionIdList parameters.

Required: Yes
IsTruncated (p. 176)

A flag that indicates whether more distribution IDs remain to be listed. If your results were
truncated, you can make a subsequent request using the Marker request field to retrieve more
distribution IDs in the list.

Type: Boolean
Items (p. 176)

Contains the distribution IDs in the list.

Type: Array of strings


Marker (p. 176)

The value provided in the Marker request field.

Type: String
MaxItems (p. 176)

The maximum number of distribution IDs requested.

Type: Integer
NextMarker (p. 176)

Contains the value that you should use in the Marker field of a subsequent request to continue
listing distribution IDs where you left off.

Type: String
Quantity (p. 176)

The total number of distribution IDs returned in the response.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

API Version 2020-05-31


177
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


178
Amazon CloudFront API Reference
ListDistributionsByOriginRequestPolicyId

ListDistributionsByOriginRequestPolicyId
Gets a list of distribution IDs for distributions that have a cache behavior that’s associated with the
specified origin request policy.

You can optionally specify the maximum number of items to receive in the response. If the total number
of items in the list exceeds the maximum that you specify, or the default maximum, the response is
paginated. To get the next page of items, send a subsequent request that specifies the NextMarker
value from the current response as the Marker value in the subsequent request.

Request Syntax
GET /2020-05-31/distributionsByOriginRequestPolicyId/OriginRequestPolicyId?
Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 179)

Use this field when paginating results to indicate where to begin in your list of distribution IDs. The
response includes distribution IDs in the list that occur after the marker. To get the next page of the
list, set this field’s value to the value of NextMarker from the current page’s response.
MaxItems (p. 179)

The maximum number of distribution IDs that you want in the response.
OriginRequestPolicyId (p. 179)

The ID of the origin request policy whose associated distribution IDs you want to list.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DistributionIdList>
<IsTruncated>boolean</IsTruncated>
<Items>
<DistributionId>string</DistributionId>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</DistributionIdList>

API Version 2020-05-31


179
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

DistributionIdList (p. 179)

Root level tag for the DistributionIdList parameters.

Required: Yes
IsTruncated (p. 179)

A flag that indicates whether more distribution IDs remain to be listed. If your results were
truncated, you can make a subsequent request using the Marker request field to retrieve more
distribution IDs in the list.

Type: Boolean
Items (p. 179)

Contains the distribution IDs in the list.

Type: Array of strings


Marker (p. 179)

The value provided in the Marker request field.

Type: String
MaxItems (p. 179)

The maximum number of distribution IDs requested.

Type: Integer
NextMarker (p. 179)

Contains the value that you should use in the Marker field of a subsequent request to continue
listing distribution IDs where you left off.

Type: String
Quantity (p. 179)

The total number of distribution IDs returned in the response.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

API Version 2020-05-31


180
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


181
Amazon CloudFront API Reference
ListDistributionsByRealtimeLogConfig

ListDistributionsByRealtimeLogConfig
Gets a list of distributions that have a cache behavior that’s associated with the specified real-time log
configuration.

You can specify the real-time log configuration by its name or its Amazon Resource Name (ARN). You
must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log
configuration to list distributions for.

You can optionally specify the maximum number of items to receive in the response. If the total number
of items in the list exceeds the maximum that you specify, or the default maximum, the response is
paginated. To get the next page of items, send a subsequent request that specifies the NextMarker
value from the current response as the Marker value in the subsequent request.

Request Syntax
POST /2020-05-31/distributionsByRealtimeLogConfig/ HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<ListDistributionsByRealtimeLogConfigRequest xmlns="[Link]
doc/2020-05-31/">
<Marker>string</Marker>
<MaxItems>string</MaxItems>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<RealtimeLogConfigName>string</RealtimeLogConfigName>
</ListDistributionsByRealtimeLogConfigRequest>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

ListDistributionsByRealtimeLogConfigRequest (p. 182)

Root level tag for the ListDistributionsByRealtimeLogConfigRequest parameters.

Required: Yes
Marker (p. 182)

Use this field when paginating results to indicate where to begin in your list of distributions. The
response includes distributions in the list that occur after the marker. To get the next page of the list,
set this field’s value to the value of NextMarker from the current page’s response.

Type: String

Required: No
MaxItems (p. 182)

The maximum number of distributions that you want in the response.

Type: String

Required: No

API Version 2020-05-31


182
Amazon CloudFront API Reference
Response Syntax

RealtimeLogConfigArn (p. 182)

The Amazon Resource Name (ARN) of the real-time log configuration whose associated distributions
you want to list.

Type: String

Required: No
RealtimeLogConfigName (p. 182)

The name of the real-time log configuration whose associated distributions you want to list.

Type: String

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DistributionList>
<IsTruncated>boolean</IsTruncated>
<Items>
<DistributionSummary>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>
</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>

API Version 2020-05-31


183
Amazon CloudFront API Reference
Response Syntax

</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>

API Version 2020-05-31


184
Amazon CloudFront API Reference
Response Syntax

</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DomainName>string</DomainName>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<Id>string</Id>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<LastModifiedTime>timestamp</LastModifiedTime>
<OriginGroups>

API Version 2020-05-31


185
Amazon CloudFront API Reference
Response Syntax

<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>

API Version 2020-05-31


186
Amazon CloudFront API Reference
Response Elements

<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<Status>string</Status>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionSummary>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</DistributionList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

DistributionList (p. 183)

Root level tag for the DistributionList parameters.

Required: Yes
IsTruncated (p. 183)

A flag that indicates whether more distributions remain to be listed. If your results were truncated,
you can make a follow-up pagination request using the Marker request parameter to retrieve more
distributions in the list.

Type: Boolean
Items (p. 183)

A complex type that contains one DistributionSummary element for each distribution that was
created by the current AWS account.

Type: Array of DistributionSummary (p. 331) objects


Marker (p. 183)

The value you provided for the Marker request parameter.

Type: String
MaxItems (p. 183)

The value you provided for the MaxItems request parameter.

Type: Integer
NextMarker (p. 183)

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your distributions where they left off.

API Version 2020-05-31


187
Amazon CloudFront API Reference
Errors

Type: String
Quantity (p. 183)

The number of distributions that were created by the current AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


188
Amazon CloudFront API Reference
ListDistributionsByWebACLId

ListDistributionsByWebACLId
List the distributions that are associated with a specified AWS WAF web ACL.

Request Syntax
GET /2020-05-31/distributionsByWebACLId/WebACLId?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 189)

Use Marker and MaxItems to control pagination of results. If you have more than MaxItems
distributions that satisfy the request, the response includes a NextMarker element. To get the next
page of results, submit another request. For the value of Marker, specify the value of NextMarker
from the last response. (For the first request, omit Marker.)
MaxItems (p. 189)

The maximum number of distributions that you want CloudFront to return in the response body. The
maximum and default values are both 100.
WebACLId (p. 189)

The ID of the AWS WAF web ACL that you want to list the associated distributions. If you specify
"null" for the ID, the request returns a list of the distributions that aren't associated with a web ACL.

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<DistributionList>
<IsTruncated>boolean</IsTruncated>
<Items>
<DistributionSummary>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>
</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<CacheBehaviors>

API Version 2020-05-31


189
Amazon CloudFront API Reference
Response Syntax

<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>

API Version 2020-05-31


190
Amazon CloudFront API Reference
Response Syntax

<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>

API Version 2020-05-31


191
Amazon CloudFront API Reference
Response Syntax

<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DomainName>string</DomainName>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<Id>string</Id>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<LastModifiedTime>timestamp</LastModifiedTime>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>

API Version 2020-05-31


192
Amazon CloudFront API Reference
Response Elements

<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<Status>string</Status>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionSummary>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</DistributionList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

DistributionList (p. 189)

Root level tag for the DistributionList parameters.

Required: Yes
IsTruncated (p. 189)

A flag that indicates whether more distributions remain to be listed. If your results were truncated,
you can make a follow-up pagination request using the Marker request parameter to retrieve more
distributions in the list.

API Version 2020-05-31


193
Amazon CloudFront API Reference
Errors

Type: Boolean
Items (p. 189)

A complex type that contains one DistributionSummary element for each distribution that was
created by the current AWS account.

Type: Array of DistributionSummary (p. 331) objects


Marker (p. 189)

The value you provided for the Marker request parameter.

Type: String
MaxItems (p. 189)

The value you provided for the MaxItems request parameter.

Type: Integer
NextMarker (p. 189)

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your distributions where they left off.

Type: String
Quantity (p. 189)

The number of distributions that were created by the current AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidWebACLId

A web ACL ID specified is not valid. To specify a web ACL created using the latest version of AWS
WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/
webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify
a web ACL created using AWS WAF Classic, use the ACL ID, for example 473e64fd-
f30b-4765-81a0-62ad96dd167a.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++

API Version 2020-05-31


194
Amazon CloudFront API Reference
See Also

• AWS SDK for Go


• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


195
Amazon CloudFront API Reference
ListFieldLevelEncryptionConfigs

ListFieldLevelEncryptionConfigs
List all field-level encryption configurations that have been created in CloudFront for this account.

Request Syntax
GET /2020-05-31/field-level-encryption?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 196)

Use this when paginating results to indicate where to begin in your list of configurations. The results
include configurations in the list that occur after the marker. To get the next page of results, set the
Marker to the value of the NextMarker from the current page's response (which is also the ID of
the last configuration on that page).
MaxItems (p. 196)

The maximum number of field-level encryption configurations you want in the response body.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionList>
<Items>
<FieldLevelEncryptionSummary>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<QueryArgProfileConfig>

<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>

API Version 2020-05-31


196
Amazon CloudFront API Reference
Response Elements

<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionSummary>
</Items>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</FieldLevelEncryptionList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryptionList (p. 196)

Root level tag for the FieldLevelEncryptionList parameters.

Required: Yes
Items (p. 196)

An array of field-level encryption items.

Type: Array of FieldLevelEncryptionSummary (p. 345) objects


MaxItems (p. 196)

The maximum number of elements you want in the response body.

Type: Integer
NextMarker (p. 196)

If there are more elements to be listed, this element is present and contains the value that you can
use for the Marker request parameter to continue listing your configurations where you left off.

Type: String
Quantity (p. 196)

The number of field-level encryption items.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

API Version 2020-05-31


197
Amazon CloudFront API Reference
See Also

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


198
Amazon CloudFront API Reference
ListFieldLevelEncryptionProfiles

ListFieldLevelEncryptionProfiles
Request a list of field-level encryption profiles that have been created in CloudFront for this account.

Request Syntax
GET /2020-05-31/field-level-encryption-profile?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 199)

Use this when paginating results to indicate where to begin in your list of profiles. The results
include profiles in the list that occur after the marker. To get the next page of results, set the
Marker to the value of the NextMarker from the current page's response (which is also the ID of
the last profile on that page).
MaxItems (p. 199)

The maximum number of field-level encryption profiles you want in the response body.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfileList>
<Items>
<FieldLevelEncryptionProfileSummary>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<Name>string</Name>
</FieldLevelEncryptionProfileSummary>
</Items>
<MaxItems>integer</MaxItems>

API Version 2020-05-31


199
Amazon CloudFront API Reference
Response Elements

<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</FieldLevelEncryptionProfileList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryptionProfileList (p. 199)

Root level tag for the FieldLevelEncryptionProfileList parameters.

Required: Yes
Items (p. 199)

The field-level encryption profile items.

Type: Array of FieldLevelEncryptionProfileSummary (p. 344) objects


MaxItems (p. 199)

The maximum number of field-level encryption profiles you want in the response body.

Type: Integer
NextMarker (p. 199)

If there are more elements to be listed, this element is present and contains the value that you can
use for the Marker request parameter to continue listing your profiles where you left off.

Type: String
Quantity (p. 199)

The number of field-level encryption profiles.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go

API Version 2020-05-31


200
Amazon CloudFront API Reference
See Also

• AWS SDK for Java


• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


201
Amazon CloudFront API Reference
ListInvalidations

ListInvalidations
Lists invalidation batches.

Request Syntax
GET /2020-05-31/distribution/DistributionId/invalidation?Marker=Marker&MaxItems=MaxItems
HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

DistributionId (p. 202)

The distribution's ID.

Required: Yes
Marker (p. 202)

Use this parameter when paginating results to indicate where to begin in your list of invalidation
batches. Because the results are returned in decreasing order from most recent to oldest, the most
recent results are on the first page, the second page will contain earlier results, and so on. To get the
next page of results, set Marker to the value of the NextMarker from the current page's response.
This value is the same as the ID of the last invalidation batch on that page.
MaxItems (p. 202)

The maximum number of invalidation batches that you want in the response body.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<InvalidationList>
<IsTruncated>boolean</IsTruncated>
<Items>
<InvalidationSummary>
<CreateTime>timestamp</CreateTime>
<Id>string</Id>
<Status>string</Status>
</InvalidationSummary>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</InvalidationList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

API Version 2020-05-31


202
Amazon CloudFront API Reference
Errors

The following data is returned in XML format by the service.

InvalidationList (p. 202)

Root level tag for the InvalidationList parameters.

Required: Yes
IsTruncated (p. 202)

A flag that indicates whether more invalidation batch requests remain to be listed. If your results
were truncated, you can make a follow-up pagination request using the Marker request parameter
to retrieve more invalidation batches in the list.

Type: Boolean
Items (p. 202)

A complex type that contains one InvalidationSummary element for each invalidation batch
created by the current AWS account.

Type: Array of InvalidationSummary (p. 357) objects


Marker (p. 202)

The value that you provided for the Marker request parameter.

Type: String
MaxItems (p. 202)

The value that you provided for the MaxItems request parameter.

Type: Integer
NextMarker (p. 202)

If IsTruncated is true, this element is present and contains the value that you can use for the
Marker request parameter to continue listing your invalidation batches where they left off.

Type: String
Quantity (p. 202)

The number of invalidation batches that were created by the current AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

HTTP Status Code: 400

API Version 2020-05-31


203
Amazon CloudFront API Reference
See Also

NoSuchDistribution

The specified distribution does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


204
Amazon CloudFront API Reference
ListOriginRequestPolicies

ListOriginRequestPolicies
Gets a list of origin request policies.

You can optionally apply a filter to return only the managed policies created by AWS, or only the custom
policies created in your AWS account.

You can optionally specify the maximum number of items to receive in the response. If the total number
of items in the list exceeds the maximum that you specify, or the default maximum, the response is
paginated. To get the next page of items, send a subsequent request that specifies the NextMarker
value from the current response as the Marker value in the subsequent request.

Request Syntax
GET /2020-05-31/origin-request-policy?Marker=Marker&MaxItems=MaxItems&Type=Type HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 205)

Use this field when paginating results to indicate where to begin in your list of origin request
policies. The response includes origin request policies in the list that occur after the marker. To get
the next page of the list, set this field’s value to the value of NextMarker from the current page’s
response.
MaxItems (p. 205)

The maximum number of origin request policies that you want in the response.
Type (p. 205)

A filter to return only the specified kinds of origin request policies. Valid values are:
• managed – Returns only the managed policies created by AWS.
• custom – Returns only the custom policies created in your AWS account.

Valid Values: managed | custom

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicyList>
<Items>
<OriginRequestPolicySummary>
<OriginRequestPolicy>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>

API Version 2020-05-31


205
Amazon CloudFront API Reference
Response Elements

<OriginRequestPolicyConfig>
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>
</OriginRequestPolicy>
<Type>string</Type>
</OriginRequestPolicySummary>
</Items>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</OriginRequestPolicyList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

OriginRequestPolicyList (p. 205)

Root level tag for the OriginRequestPolicyList parameters.

Required: Yes
Items (p. 205)

Contains the origin request policies in the list.

Type: Array of OriginRequestPolicySummary (p. 381) objects


MaxItems (p. 205)

The maximum number of origin request policies requested.

Type: Integer

API Version 2020-05-31


206
Amazon CloudFront API Reference
Errors

NextMarker (p. 205)

If there are more items in the list than are in this response, this element is present. It contains the
value that you should use in the Marker field of a subsequent request to continue listing origin
request policies where you left off.

Type: String
Quantity (p. 205)

The total number of origin request policies returned in the response.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


207
Amazon CloudFront API Reference
ListPublicKeys

ListPublicKeys
List all public keys that have been added to CloudFront for this account.

Request Syntax
GET /2020-05-31/public-key?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 208)

Use this when paginating results to indicate where to begin in your list of public keys. The results
include public keys in the list that occur after the marker. To get the next page of results, set the
Marker to the value of the NextMarker from the current page's response (which is also the ID of
the last public key on that page).
MaxItems (p. 208)

The maximum number of public keys you want in the response body.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<PublicKeyList>
<Items>
<PublicKeySummary>
<Comment>string</Comment>
<CreatedTime>timestamp</CreatedTime>
<EncodedKey>string</EncodedKey>
<Id>string</Id>
<Name>string</Name>
</PublicKeySummary>
</Items>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</PublicKeyList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

PublicKeyList (p. 208)

Root level tag for the PublicKeyList parameters.

API Version 2020-05-31


208
Amazon CloudFront API Reference
Errors

Required: Yes
Items (p. 208)

An array of information about a public key you add to CloudFront to use with features like field-level
encryption.

Type: Array of PublicKeySummary (p. 390) objects


MaxItems (p. 208)

The maximum number of public keys you want in the response body.

Type: Integer
NextMarker (p. 208)

If there are more elements to be listed, this element is present and contains the value that you can
use for the Marker request parameter to continue listing your public keys where you left off.

Type: String
Quantity (p. 208)

The number of public keys you added to CloudFront to use with features like field-level encryption.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


209
Amazon CloudFront API Reference
ListRealtimeLogConfigs

ListRealtimeLogConfigs
Gets a list of real-time log configurations.

You can optionally specify the maximum number of items to receive in the response. If the total number
of items in the list exceeds the maximum that you specify, or the default maximum, the response is
paginated. To get the next page of items, send a subsequent request that specifies the NextMarker
value from the current response as the Marker value in the subsequent request.

Request Syntax
GET /2020-05-31/realtime-log-config?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 210)

Use this field when paginating results to indicate where to begin in your list of real-time log
configurations. The response includes real-time log configurations in the list that occur after the
marker. To get the next page of the list, set this field’s value to the value of NextMarker from the
current page’s response.
MaxItems (p. 210)

The maximum number of real-time log configurations that you want in the response.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<RealtimeLogConfigs>
<IsTruncated>boolean</IsTruncated>
<Items>
<RealtimeLogConfig>
<ARN>string</ARN>
<EndPoints>
<EndPoint>
<KinesisStreamConfig>
<RoleARN>string</RoleARN>
<StreamARN>string</StreamARN>
</KinesisStreamConfig>
<StreamType>string</StreamType>
</EndPoint>
</EndPoints>
<Fields>
<Field>string</Field>
</Fields>
<Name>string</Name>
<SamplingRate>long</SamplingRate>
</RealtimeLogConfig>

API Version 2020-05-31


210
Amazon CloudFront API Reference
Response Elements

</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
</RealtimeLogConfigs>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

RealtimeLogConfigs (p. 210)

Root level tag for the RealtimeLogConfigs parameters.

Required: Yes
IsTruncated (p. 210)

A flag that indicates whether there are more real-time log configurations than are contained in this
list.

Type: Boolean
Items (p. 210)

Contains the list of real-time log configurations.

Type: Array of RealtimeLogConfig (p. 396) objects


Marker (p. 210)

This parameter indicates where this list of real-time log configurations begins. This list includes real-
time log configurations that occur after the marker.

Type: String
MaxItems (p. 210)

The maximum number of real-time log configurations requested.

Type: Integer
NextMarker (p. 210)

If there are more items in the list than are in this response, this element is present. It contains the
value that you should use in the Marker field of a subsequent request to continue listing real-time
log configurations where you left off.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

API Version 2020-05-31


211
Amazon CloudFront API Reference
See Also

• AWS SDK for .NET


• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


212
Amazon CloudFront API Reference
ListStreamingDistributions

ListStreamingDistributions
List streaming distributions.

Request Syntax
GET /2020-05-31/streaming-distribution?Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Marker (p. 213)

The value that you provided for the Marker request parameter.
MaxItems (p. 213)

The value that you provided for the MaxItems request parameter.

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionList>
<IsTruncated>boolean</IsTruncated>
<Items>
<StreamingDistributionSummary>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<ARN>string</ARN>
<Comment>string</Comment>
<DomainName>string</DomainName>
<Enabled>boolean</Enabled>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<Status>string</Status>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>

API Version 2020-05-31


213
Amazon CloudFront API Reference
Response Elements

</StreamingDistributionSummary>
</Items>
<Marker>string</Marker>
<MaxItems>integer</MaxItems>
<NextMarker>string</NextMarker>
<Quantity>integer</Quantity>
</StreamingDistributionList>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

StreamingDistributionList (p. 213)

Root level tag for the StreamingDistributionList parameters.

Required: Yes
IsTruncated (p. 213)

A flag that indicates whether more streaming distributions remain to be listed. If your results were
truncated, you can make a follow-up pagination request using the Marker request parameter to
retrieve more distributions in the list.

Type: Boolean
Items (p. 213)

A complex type that contains one StreamingDistributionSummary element for each


distribution that was created by the current AWS account.

Type: Array of StreamingDistributionSummary (p. 412) objects


Marker (p. 213)

The value you provided for the Marker request parameter.

Type: String
MaxItems (p. 213)

The value you provided for the MaxItems request parameter.

Type: Integer
NextMarker (p. 213)

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your RTMP distributions where they left off.

Type: String
Quantity (p. 213)

The number of streaming distributions that were created by the current AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

API Version 2020-05-31


214
Amazon CloudFront API Reference
See Also

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


215
Amazon CloudFront API Reference
ListTagsForResource

ListTagsForResource
List tags for a CloudFront resource.

Request Syntax
GET /2020-05-31/tagging?Resource=Resource HTTP/1.1

URI Request Parameters


The request uses the following URI parameters.

Resource (p. 216)

An ARN of a CloudFront resource.

Pattern: arn:aws(-cn)?:cloudfront::[0-9]+:.*

Required: Yes

Request Body
The request does not have a request body.

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<Tags>
<Items>
<Tag>
<Key>string</Key>
<Value>string</Value>
</Tag>
</Items>
</Tags>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

Tags (p. 216)

Root level tag for the Tags parameters.

Required: Yes
Items (p. 216)

A complex type that contains Tag elements.

Type: Array of Tag (p. 415) objects

API Version 2020-05-31


216
Amazon CloudFront API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidTagging

The tagging specified is not valid.

HTTP Status Code: 400


NoSuchResource

A resource that was specified is not valid.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


217
Amazon CloudFront API Reference
TagResource

TagResource
Add tags to a CloudFront resource.

Request Syntax
POST /2020-05-31/tagging?Operation=Tag HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<Tags xmlns="[Link]
<Items>
<Tag>
<Key>string</Key>
<Value>string</Value>
</Tag>
</Items>
</Tags>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

Tags (p. 218)

Root level tag for the Tags parameters.

Required: Yes
Items (p. 218)

A complex type that contains Tag elements.

Type: Array of Tag (p. 415) objects

Required: No

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

API Version 2020-05-31


218
Amazon CloudFront API Reference
See Also

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidTagging

The tagging specified is not valid.

HTTP Status Code: 400


NoSuchResource

A resource that was specified is not valid.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


219
Amazon CloudFront API Reference
UntagResource

UntagResource
Remove tags from a CloudFront resource.

Request Syntax
POST /2020-05-31/tagging?Operation=Untag HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<TagKeys xmlns="[Link]
<Items>
<Key>string</Key>
</Items>
</TagKeys>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

TagKeys (p. 220)

Root level tag for the TagKeys parameters.

Required: Yes
Items (p. 220)

A complex type that contains Tag key elements.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: No

Response Syntax
HTTP/1.1 204

Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

API Version 2020-05-31


220
Amazon CloudFront API Reference
See Also

AccessDenied

Access denied.

HTTP Status Code: 403


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidTagging

The tagging specified is not valid.

HTTP Status Code: 400


NoSuchResource

A resource that was specified is not valid.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


221
Amazon CloudFront API Reference
UpdateCachePolicy

UpdateCachePolicy
Updates a cache policy configuration.

When you update a cache policy configuration, all the fields are updated with the values provided in the
request. You cannot update some fields independent of others. To update a cache policy configuration:

1. Use GetCachePolicyConfig to get the current configuration.


2. Locally modify the fields in the cache policy configuration that you want to update.
3. Call UpdateCachePolicy by providing the entire cache policy configuration, including the fields that
you modified and those that you didn’t.

Request Syntax
PUT /2020-05-31/cache-policy/Id HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicyConfig xmlns="[Link]
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>

URI Request Parameters


The request does not use any URI parameters.

API Version 2020-05-31


222
Amazon CloudFront API Reference
Request Body

Request Body
The request accepts the following data in XML format.

CachePolicyConfig (p. 222)

Root level tag for the CachePolicyConfig parameters.

Required: Yes
Comment (p. 222)

A comment to describe the cache policy.

Type: String

Required: No
DefaultTTL (p. 222)

The default amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated.
CloudFront uses this value as the object’s time to live (TTL) only when the origin does not send
Cache-Control or Expires headers with the object. For more information, see Managing How
Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than
86400 seconds, then the default value for this field is the same as the value of MinTTL.

Type: Long

Required: No
MaxTTL (p. 222)

The maximum amount of time, in seconds, that objects stay in the CloudFront cache before
CloudFront sends another request to the origin to see if the object has been updated. CloudFront
uses this value only when the origin sends Cache-Control or Expires headers with the object.
For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

The default value for this field is 31536000 seconds (one year). If the value of MinTTL or
DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the
value of DefaultTTL.

Type: Long

Required: No
MinTTL (p. 222)

The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated. For
more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

Type: Long

Required: Yes
Name (p. 222)

A unique name to identify the cache policy.

API Version 2020-05-31


223
Amazon CloudFront API Reference
Response Syntax

Type: String

Required: Yes
ParametersInCacheKeyAndForwardedToOrigin (p. 222)

The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in
the cache key are automatically included in requests that CloudFront sends to the origin.

Type: ParametersInCacheKeyAndForwardedToOrigin (p. 384) object

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CachePolicy>
<CachePolicyConfig>
<Comment>string</Comment>
<DefaultTTL>long</DefaultTTL>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<Name>string</Name>
<ParametersInCacheKeyAndForwardedToOrigin>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<EnableAcceptEncodingGzip>boolean</EnableAcceptEncodingGzip>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</ParametersInCacheKeyAndForwardedToOrigin>
</CachePolicyConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</CachePolicy>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

API Version 2020-05-31


224
Amazon CloudFront API Reference
Errors

The following data is returned in XML format by the service.

CachePolicy (p. 224)

Root level tag for the CachePolicy parameters.

Required: Yes
CachePolicyConfig (p. 224)

The cache policy configuration.

Type: CachePolicyConfig (p. 291) object


Id (p. 224)

The unique identifier for the cache policy.

Type: String
LastModifiedTime (p. 224)

The date and time when the cache policy was last modified.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CachePolicyAlreadyExists

A cache policy with this name already exists. You must provide a unique name. To modify an existing
cache policy, use UpdateCachePolicy.

HTTP Status Code: 409


IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400

API Version 2020-05-31


225
Amazon CloudFront API Reference
See Also

NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


TooManyCookiesInCachePolicy

The number of cookies in the cache policy exceeds the maximum. For more information, see Quotas
(formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyHeadersInCachePolicy

The number of headers in the cache policy exceeds the maximum. For more information, see Quotas
(formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyQueryStringsInCachePolicy

The number of query strings in the cache policy exceeds the maximum. For more information, see
Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


226
Amazon CloudFront API Reference
UpdateCloudFrontOriginAccessIdentity

UpdateCloudFrontOriginAccessIdentity
Update an origin access identity.

Request Syntax
PUT /2020-05-31/origin-access-identity/cloudfront/Id/config HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<CloudFrontOriginAccessIdentityConfig xmlns="[Link]
doc/2020-05-31/">
<CallerReference>string</CallerReference>
<Comment>string</Comment>
</CloudFrontOriginAccessIdentityConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

CloudFrontOriginAccessIdentityConfig (p. 227)

Root level tag for the CloudFrontOriginAccessIdentityConfig parameters.

Required: Yes
CallerReference (p. 227)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


CloudFrontOriginAccessIdentityConfig object), a new origin access identity is created.

If the CallerReference is a value already sent in a previous identity request, and the content of
the CloudFrontOriginAccessIdentityConfig is identical to the original request (ignoring
white space), the response includes the same information returned to the original request.

If the CallerReference is a value you already sent in a previous request to create an identity, but
the content of the CloudFrontOriginAccessIdentityConfig is different from the original
request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists error.

Type: String

Required: Yes
Comment (p. 227)

Any comments you want to include about the origin access identity.

Type: String

Required: Yes

Response Syntax
HTTP/1.1 200

API Version 2020-05-31


227
Amazon CloudFront API Reference
Response Elements

<?xml version="1.0" encoding="UTF-8"?>


<CloudFrontOriginAccessIdentity>
<CloudFrontOriginAccessIdentityConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
</CloudFrontOriginAccessIdentityConfig>
<Id>string</Id>
<S3CanonicalUserId>string</S3CanonicalUserId>
</CloudFrontOriginAccessIdentity>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

CloudFrontOriginAccessIdentity (p. 227)

Root level tag for the CloudFrontOriginAccessIdentity parameters.

Required: Yes
CloudFrontOriginAccessIdentityConfig (p. 227)

The current configuration information for the identity.

Type: CloudFrontOriginAccessIdentityConfig (p. 299) object


Id (p. 227)

The ID for the origin access identity, for example, E74FTE3AJFJ256A.

Type: String
S3CanonicalUserId (p. 227)

The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access
identity read permission to an object in Amazon S3.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400

API Version 2020-05-31


228
Amazon CloudFront API Reference
See Also

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


NoSuchCloudFrontOriginAccessIdentity

The specified origin access identity does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


229
Amazon CloudFront API Reference
UpdateDistribution

UpdateDistribution
Updates the configuration for a web distribution.
Important
When you update a distribution, there are more required fields than when you create a
distribution. When you update your distribution by using this API action, follow the steps here to
get the current configuration and then make your updates, to make sure that you include all of
the required fields. To view a summary, see Required Fields for Create Distribution and Update
Distribution in the Amazon CloudFront Developer Guide.

The update process includes getting the current distribution configuration, updating the XML document
that is returned to make your changes, and then submitting an UpdateDistribution request to make
the updates.

For information about updating a distribution using the CloudFront console instead, see Creating a
Distribution in the Amazon CloudFront Developer Guide.

To update a web distribution using the CloudFront API

1. Submit a GetDistributionConfig request to get the current configuration and an Etag header for the
distribution.
Note
If you update the distribution again, you must get a new Etag header.
2. Update the XML document that was returned in the response to your GetDistributionConfig
request to include your changes.
Important
When you edit the XML file, be aware of the following:
• You must strip out the ETag parameter that is returned.
• Additional fields are required when you update a distribution. There may be fields included
in the XML file for features that you haven't configured for your distribution. This is
expected and required to successfully update the distribution.
• You can't change the value of CallerReference. If you try to change this value,
CloudFront returns an IllegalUpdate error.
• The new configuration replaces the existing configuration; the values that you specify
in an UpdateDistribution request are not merged into your existing configuration.
When you add, delete, or replace values in an element that allows multiple values (for
example, CNAME), you must specify all of the values that you want to appear in the updated
distribution. In addition, you must update the corresponding Quantity element.
3. Submit an UpdateDistribution request to update the configuration for your distribution:
• In the request body, include the XML document that you updated in Step 2. The request body must
include an XML document with a DistributionConfig element.
• Set the value of the HTTP If-Match header to the value of the ETag header that CloudFront
returned when you submitted the GetDistributionConfig request in Step 1.
4. Review the response to the UpdateDistribution request to confirm that the configuration was
successfully updated.
5. Optional: Submit a GetDistribution request to confirm that your changes have propagated. When
propagation is complete, the value of Status is Deployed.

Request Syntax
PUT /2020-05-31/distribution/Id/config HTTP/1.1

API Version 2020-05-31


230
Amazon CloudFront API Reference
Request Syntax

<?xml version="1.0" encoding="UTF-8"?>


<DistributionConfig xmlns="[Link]
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>

API Version 2020-05-31


231
Amazon CloudFront API Reference
Request Syntax

<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>

API Version 2020-05-31


232
Amazon CloudFront API Reference
Request Syntax

</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>
<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>

API Version 2020-05-31


233
Amazon CloudFront API Reference
URI Request Parameters

<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>
<WebACLId>string</WebACLId>
</DistributionConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

API Version 2020-05-31


234
Amazon CloudFront API Reference
Request Body

DistributionConfig (p. 230)

Root level tag for the DistributionConfig parameters.

Required: Yes
Aliases (p. 230)

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

Type: Aliases (p. 279) object

Required: No
CacheBehaviors (p. 230)

A complex type that contains zero or more CacheBehavior elements.

Type: CacheBehaviors (p. 288) object

Required: No
CallerReference (p. 230)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the DistributionConfig


object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String

Required: Yes
Comment (p. 230)

Any comments you want to include about the distribution.

If you don't want to specify a comment, include an empty Comment element.

To delete an existing comment, update the distribution configuration and include an empty
Comment element.

To add or change a comment, update the distribution configuration and specify the new comment.

Type: String

Required: Yes
CustomErrorResponses (p. 230)

A complex type that controls the following:


• 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.

Type: CustomErrorResponses (p. 311) object

Required: No

API Version 2020-05-31


235
Amazon CloudFront API Reference
Request Body

DefaultCacheBehavior (p. 230)

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: DefaultCacheBehavior (p. 315) object

Required: Yes
DefaultRootObject (p. 230)

The object that you want CloudFront to request from your origin (for example, [Link])
when a viewer requests the root URL for your distribution ([Link] instead
of an object in your distribution ([Link]
Specifying a default root object avoids exposing the contents of your distribution.

Specify only the object name, for example, [Link]. Don't add a / before the object name.

If you don't want to specify a default root object when you create a distribution, include an empty
DefaultRootObject element.

To delete the default root object from an existing distribution, update the distribution configuration
and include an empty DefaultRootObject element.

To replace the default root object, update the distribution configuration and specify the new object.

For more information about the default root object, see Creating a Default Root Object in the
Amazon CloudFront Developer Guide.

Type: String

Required: No
Enabled (p. 230)

From this field, you can enable or disable the selected distribution.

Type: Boolean

Required: Yes
HttpVersion (p. 230)

(Optional) 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
automatically use an earlier HTTP version.

For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support
Server Name Identification (SNI).

In general, configuring CloudFront to communicate with viewers using HTTP/2 reduces latency. You
can improve performance by optimizing for HTTP/2. For more information, do an Internet search for
"http/2 optimization."

Type: String

Valid Values: http1.1 | http2

Required: No
IsIPV6Enabled (p. 230)

If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution,
specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS

API Version 2020-05-31


236
Amazon CloudFront API Reference
Request Body

response code NOERROR and with no IP addresses. This allows viewers to submit a second request,
for an IPv4 address for your distribution.

In general, you should enable IPv6 if you have users on IPv6 networks who want to access your
content. However, if you're using signed URLs or signed cookies to restrict access to your content,
and if you're using a custom policy that includes the IpAddress parameter to restrict the IP
addresses that can access your content, don't enable IPv6. If you want to restrict access to some
content by IP address and not restrict access to other content (or restrict access but not by IP
address), you can create two distributions. For more information, see Creating a Signed URL Using a
Custom Policy in the Amazon CloudFront Developer Guide.

If you're using an Amazon Route 53 alias resource record set to route traffic to your CloudFront
distribution, you need to create a second alias resource record set when both of the following are
true:
• You enable IPv6 for the distribution
• You're using alternate domain names in the URLs for your objects

For more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your
Domain Name in the Amazon Route 53 Developer Guide.

If you created a CNAME resource record set, either with Amazon Route 53 or with another DNS
service, you don't need to make any changes. A CNAME record will route traffic to your distribution
regardless of the IP address format of the viewer request.

Type: Boolean

Required: No
Logging (p. 230)

A complex type that controls whether access logs are written for the distribution.

For more information about logging, see Access Logs in the Amazon CloudFront Developer Guide.

Type: LoggingConfig (p. 363) object

Required: No
OriginGroups (p. 230)

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

Type: OriginGroups (p. 373) object

Required: No
Origins (p. 230)

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

Type: Origins (p. 382) object

Required: Yes
PriceClass (p. 230)

The price class that corresponds with the maximum price that you want to pay for CloudFront
service. If you specify PriceClass_All, CloudFront responds to requests for your objects from all
CloudFront edge locations.

If you specify a price class other than PriceClass_All, CloudFront serves your objects from the
CloudFront edge location that has the lowest latency among the edge locations in your price class.

API Version 2020-05-31


237
Amazon CloudFront API Reference
Response Syntax

Viewers who are in or near regions that are excluded from your specified price class may encounter
slower performance.

For more information about price classes, see Choosing the Price Class for a CloudFront Distribution
in the Amazon CloudFront Developer Guide. For information about CloudFront pricing, including how
price classes (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing.
For price class information, scroll down to see the table at the bottom of the page.

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: No
Restrictions (p. 230)

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

Type: Restrictions (p. 400) object

Required: No
ViewerCertificate (p. 230)

A complex type that determines the distribution’s SSL/TLS configuration for communicating with
viewers.

Type: ViewerCertificate (p. 419) object

Required: No
WebACLId (p. 230)

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.
To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for example
arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-
f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using AWS WAF Classic, use the
ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that
are forwarded to CloudFront, and lets you control access to your content. Based on conditions that
you specify, such as the IP addresses that requests originate from or the values of query strings,
CloudFront responds to requests either with the requested content or with an HTTP 403 status code
(Forbidden). You can also configure CloudFront to return a custom error page when a request is
blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.

Type: String

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<Distribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>

API Version 2020-05-31


238
Amazon CloudFront API Reference
Response Syntax

<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<AliasICPRecordals>
<AliasICPRecordal>
<CNAME>string</CNAME>
<ICPRecordalStatus>string</ICPRecordalStatus>
</AliasICPRecordal>
</AliasICPRecordals>
<ARN>string</ARN>
<DistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CacheBehaviors>
<Items>
<CacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>

API Version 2020-05-31


239
Amazon CloudFront API Reference
Response Syntax

<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<PathPattern>string</PathPattern>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</CacheBehavior>
</Items>
<Quantity>integer</Quantity>
</CacheBehaviors>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<CustomErrorResponses>
<Items>
<CustomErrorResponse>
<ErrorCachingMinTTL>long</ErrorCachingMinTTL>
<ErrorCode>integer</ErrorCode>
<ResponseCode>string</ResponseCode>
<ResponsePagePath>string</ResponsePagePath>
</CustomErrorResponse>
</Items>
<Quantity>integer</Quantity>
</CustomErrorResponses>
<DefaultCacheBehavior>
<AllowedMethods>
<CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</CachedMethods>
<Items>
<Method>string</Method>
</Items>
<Quantity>integer</Quantity>
</AllowedMethods>
<CachePolicyId>string</CachePolicyId>
<Compress>boolean</Compress>
<DefaultTTL>long</DefaultTTL>
<FieldLevelEncryptionId>string</FieldLevelEncryptionId>
<ForwardedValues>
<Cookies>
<Forward>string</Forward>
<WhitelistedNames>
<Items>
<Name>string</Name>
</Items>

API Version 2020-05-31


240
Amazon CloudFront API Reference
Response Syntax

<Quantity>integer</Quantity>
</WhitelistedNames>
</Cookies>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
<QueryString>boolean</QueryString>
<QueryStringCacheKeys>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStringCacheKeys>
</ForwardedValues>
<LambdaFunctionAssociations>
<Items>
<LambdaFunctionAssociation>
<EventType>string</EventType>
<IncludeBody>boolean</IncludeBody>
<LambdaFunctionARN>string</LambdaFunctionARN>
</LambdaFunctionAssociation>
</Items>
<Quantity>integer</Quantity>
</LambdaFunctionAssociations>
<MaxTTL>long</MaxTTL>
<MinTTL>long</MinTTL>
<OriginRequestPolicyId>string</OriginRequestPolicyId>
<RealtimeLogConfigArn>string</RealtimeLogConfigArn>
<SmoothStreaming>boolean</SmoothStreaming>
<TargetOriginId>string</TargetOriginId>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
<ViewerProtocolPolicy>string</ViewerProtocolPolicy>
</DefaultCacheBehavior>
<DefaultRootObject>string</DefaultRootObject>
<Enabled>boolean</Enabled>
<HttpVersion>string</HttpVersion>
<IsIPV6Enabled>boolean</IsIPV6Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<IncludeCookies>boolean</IncludeCookies>
<Prefix>string</Prefix>
</Logging>
<OriginGroups>
<Items>
<OriginGroup>
<FailoverCriteria>
<StatusCodes>
<Items>
<StatusCode>integer</StatusCode>
</Items>
<Quantity>integer</Quantity>
</StatusCodes>
</FailoverCriteria>
<Id>string</Id>
<Members>
<Items>

API Version 2020-05-31


241
Amazon CloudFront API Reference
Response Syntax

<OriginGroupMember>
<OriginId>string</OriginId>
</OriginGroupMember>
</Items>
<Quantity>integer</Quantity>
</Members>
</OriginGroup>
</Items>
<Quantity>integer</Quantity>
</OriginGroups>
<Origins>
<Items>
<Origin>
<ConnectionAttempts>integer</ConnectionAttempts>
<ConnectionTimeout>integer</ConnectionTimeout>
<CustomHeaders>
<Items>
<OriginCustomHeader>
<HeaderName>string</HeaderName>
<HeaderValue>string</HeaderValue>
</OriginCustomHeader>
</Items>
<Quantity>integer</Quantity>
</CustomHeaders>
<CustomOriginConfig>
<HTTPPort>integer</HTTPPort>
<HTTPSPort>integer</HTTPSPort>
<OriginKeepaliveTimeout>integer</OriginKeepaliveTimeout>
<OriginProtocolPolicy>string</OriginProtocolPolicy>
<OriginReadTimeout>integer</OriginReadTimeout>
<OriginSslProtocols>
<Items>
<SslProtocol>string</SslProtocol>
</Items>
<Quantity>integer</Quantity>
</OriginSslProtocols>
</CustomOriginConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<OriginPath>string</OriginPath>
<S3OriginConfig>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3OriginConfig>
</Origin>
</Items>
<Quantity>integer</Quantity>
</Origins>
<PriceClass>string</PriceClass>
<Restrictions>
<GeoRestriction>
<Items>
<Location>string</Location>
</Items>
<Quantity>integer</Quantity>
<RestrictionType>string</RestrictionType>
</GeoRestriction>
</Restrictions>
<ViewerCertificate>
<ACMCertificateArn>string</ACMCertificateArn>
<Certificate>string</Certificate>
<CertificateSource>string</CertificateSource>
<CloudFrontDefaultCertificate>boolean</CloudFrontDefaultCertificate>
<IAMCertificateId>string</IAMCertificateId>
<MinimumProtocolVersion>string</MinimumProtocolVersion>
<SSLSupportMethod>string</SSLSupportMethod>
</ViewerCertificate>

API Version 2020-05-31


242
Amazon CloudFront API Reference
Response Elements

<WebACLId>string</WebACLId>
</DistributionConfig>
<DomainName>string</DomainName>
<Id>string</Id>
<InProgressInvalidationBatches>integer</InProgressInvalidationBatches>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
</Distribution>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

Distribution (p. 238)

Root level tag for the Distribution parameters.

Required: Yes
ActiveTrustedSigners (p. 238)

CloudFront automatically adds this element to the response only if you've set up the distribution to
serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware
of for each trusted signer. The Signer child element lists the AWS account number of the trusted
signer (or an empty Self element if the signer is you). The Signer element also includes the IDs
of any active key pairs associated with the trusted signer's AWS account. If no KeyPairId element
appears for a Signer, that signer can't create working signed URLs.

Type: ActiveTrustedSigners (p. 278) object


AliasICPRecordals (p. 238)

AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they
want to serve content publicly on an alternate domain name, also known as a CNAME, that they've
added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
distributions.

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started
with AWS services in China.

Type: Array of AliasICPRecordal (p. 280) objects


ARN (p. 238)

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

Type: String
DistributionConfig (p. 238)

The current configuration information for the distribution. Send a GET request to the /CloudFront
API version/distribution ID/config resource.

Type: DistributionConfig (p. 321) object


DomainName (p. 238)

The domain name corresponding to the distribution, for example,


[Link].

API Version 2020-05-31


243
Amazon CloudFront API Reference
Errors

Type: String
Id (p. 238)

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String
InProgressInvalidationBatches (p. 238)

The number of invalidation batches currently in progress.

Type: Integer
LastModifiedTime (p. 238)

The date and time the distribution was last modified.

Type: Timestamp
Status (p. 238)

This response element indicates the current status of the distribution. When the status is Deployed,
the distribution's information is fully propagated to all CloudFront edge locations.

Type: String

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CNAMEAlreadyExists

The CNAME specified is already defined for CloudFront.

HTTP Status Code: 409


IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior

The specified configuration for field-level encryption can't be associated with the specified cache
behavior.

HTTP Status Code: 400


IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

API Version 2020-05-31


244
Amazon CloudFront API Reference
Errors

HTTP Status Code: 400


InvalidDefaultRootObject

The default root object file name is too big or contains an invalid character.

HTTP Status Code: 400


InvalidErrorCode

An invalid error code was specified.

HTTP Status Code: 400


InvalidForwardCookies

Your request contains forward cookies option which doesn't match with the expectation for the
whitelisted list of cookie names. Either list of cookie names has been specified when not allowed
or list of cookie names is missing when expected.

HTTP Status Code: 400


InvalidGeoRestrictionParameter

The specified geo restriction parameter is not valid.

HTTP Status Code: 400


InvalidHeadersForS3Origin

The headers specified are not valid for an Amazon S3 origin.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


InvalidLambdaFunctionAssociation

The specified Lambda function association is invalid.

HTTP Status Code: 400


InvalidLocationCode

The location code specified is not valid.

HTTP Status Code: 400


InvalidMinimumProtocolVersion

The minimum protocol version specified is not valid.

HTTP Status Code: 400


InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400


InvalidOriginKeepaliveTimeout

The keep alive timeout specified for the origin is not valid.

HTTP Status Code: 400

API Version 2020-05-31


245
Amazon CloudFront API Reference
Errors

InvalidOriginReadTimeout

The read timeout specified for the origin is not valid.

HTTP Status Code: 400


InvalidQueryStringParameters

The query string parameters specified are not valid.

HTTP Status Code: 400


InvalidRelativePath

The relative path is too big, is not URL-encoded, or does not begin with a slash (/).

HTTP Status Code: 400


InvalidRequiredProtocol

This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your
request, or omit the RequiredProtocols element from your distribution configuration.

HTTP Status Code: 400


InvalidResponseCode

A response code is not valid.

HTTP Status Code: 400


InvalidTTLOrder

The TTL order specified is not valid.

HTTP Status Code: 400


InvalidViewerCertificate

A viewer certificate specified is not valid.

HTTP Status Code: 400


InvalidWebACLId

A web ACL ID specified is not valid. To specify a web ACL created using the latest version of AWS
WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/
webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify
a web ACL created using AWS WAF Classic, use the ACL ID, for example 473e64fd-
f30b-4765-81a0-62ad96dd167a.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


NoSuchCachePolicy

The cache policy does not exist.

HTTP Status Code: 404


NoSuchDistribution

The specified distribution does not exist.

API Version 2020-05-31


246
Amazon CloudFront API Reference
Errors

HTTP Status Code: 404


NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

HTTP Status Code: 404


NoSuchOrigin

No origin exists with the specified Origin Id.

HTTP Status Code: 404


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


TooManyCacheBehaviors

You cannot create more cache behaviors for the distribution.

HTTP Status Code: 400


TooManyCertificates

You cannot create anymore custom SSL/TLS certificates.

HTTP Status Code: 400


TooManyCookieNamesInWhiteList

Your request contains more cookie names in the whitelist than are allowed per cache behavior.

HTTP Status Code: 400


TooManyDistributionCNAMEs

Your request contains more CNAMEs than are allowed per distribution.

HTTP Status Code: 400


TooManyDistributionsAssociatedToCachePolicy

The maximum number of distributions have been associated with the specified cache policy. For
more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyDistributionsAssociatedToFieldLevelEncryptionConfig

The maximum number of distributions have been associated with the specified configuration for
field-level encryption.

HTTP Status Code: 400


TooManyDistributionsAssociatedToOriginRequestPolicy

The maximum number of distributions have been associated with the specified origin request policy.
For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer
Guide.

API Version 2020-05-31


247
Amazon CloudFront API Reference
See Also

HTTP Status Code: 400


TooManyDistributionsWithLambdaAssociations

Processing your request would cause the maximum number of distributions with Lambda function
associations per owner to be exceeded.

HTTP Status Code: 400


TooManyDistributionsWithSingleFunctionARN

The maximum number of distributions have been associated with the specified Lambda function.

HTTP Status Code: 400


TooManyHeadersInForwardedValues

Your request contains too many headers in forwarded values.

HTTP Status Code: 400


TooManyLambdaFunctionAssociations

Your request contains more Lambda function associations than are allowed per distribution.

HTTP Status Code: 400


TooManyOriginCustomHeaders

Your request contains too many origin custom headers.

HTTP Status Code: 400


TooManyOriginGroupsPerDistribution

Processing your request would cause you to exceed the maximum number of origin groups allowed.

HTTP Status Code: 400


TooManyOrigins

You cannot create more origins for the distribution.

HTTP Status Code: 400


TooManyQueryStringParameters

Your request contains too many query string parameters.

HTTP Status Code: 400


TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400


TrustedSignerDoesNotExist

One or more of your trusted signers don't exist.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2020-05-31


248
Amazon CloudFront API Reference
See Also

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


249
Amazon CloudFront API Reference
UpdateFieldLevelEncryptionConfig

UpdateFieldLevelEncryptionConfig
Update a field-level encryption configuration.

Request Syntax
PUT /2020-05-31/field-level-encryption/Id/config HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionConfig xmlns="[Link]
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<QueryArgProfileConfig>
<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>
<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

FieldLevelEncryptionConfig (p. 250)

Root level tag for the FieldLevelEncryptionConfig parameters.

Required: Yes
CallerReference (p. 250)

A unique number that ensures the request can't be replayed.

Type: String

Required: Yes

API Version 2020-05-31


250
Amazon CloudFront API Reference
Response Syntax

Comment (p. 250)

An optional comment about the configuration.

Type: String

Required: No
ContentTypeProfileConfig (p. 250)

A complex data type that specifies when to forward content if a content type isn't recognized and
profiles to use as by default in a request if a query argument doesn't specify a profile to use.

Type: ContentTypeProfileConfig (p. 304) object

Required: No
QueryArgProfileConfig (p. 250)

A complex data type that specifies when to forward content if a profile isn't found and the profile
that can be provided as a query argument in a request.

Type: QueryArgProfileConfig (p. 392) object

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryption>
<FieldLevelEncryptionConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<ContentTypeProfileConfig>
<ContentTypeProfiles>
<Items>
<ContentTypeProfile>
<ContentType>string</ContentType>
<Format>string</Format>
<ProfileId>string</ProfileId>
</ContentTypeProfile>
</Items>
<Quantity>integer</Quantity>
</ContentTypeProfiles>
<ForwardWhenContentTypeIsUnknown>boolean</ForwardWhenContentTypeIsUnknown>
</ContentTypeProfileConfig>
<QueryArgProfileConfig>
<ForwardWhenQueryArgProfileIsUnknown>boolean</ForwardWhenQueryArgProfileIsUnknown>
<QueryArgProfiles>
<Items>
<QueryArgProfile>
<ProfileId>string</ProfileId>
<QueryArg>string</QueryArg>
</QueryArgProfile>
</Items>
<Quantity>integer</Quantity>
</QueryArgProfiles>
</QueryArgProfileConfig>
</FieldLevelEncryptionConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</FieldLevelEncryption>

API Version 2020-05-31


251
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryption (p. 251)

Root level tag for the FieldLevelEncryption parameters.

Required: Yes
FieldLevelEncryptionConfig (p. 251)

A complex data type that includes the profile configurations specified for field-level encryption.

Type: FieldLevelEncryptionConfig (p. 339) object


Id (p. 251)

The configuration ID for a field-level encryption configuration which includes a set of profiles that
specify certain selected data fields to be encrypted by specific public keys.

Type: String
LastModifiedTime (p. 251)

The last time the field-level encryption configuration was changed.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400

API Version 2020-05-31


252
Amazon CloudFront API Reference
See Also

NoSuchFieldLevelEncryptionConfig

The specified configuration for field-level encryption doesn't exist.

HTTP Status Code: 404


NoSuchFieldLevelEncryptionProfile

The specified profile for field-level encryption doesn't exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


QueryArgProfileEmpty

No profile specified for the field-level encryption query argument.

HTTP Status Code: 400


TooManyFieldLevelEncryptionContentTypeProfiles

The maximum number of content type profiles for field-level encryption have been created.

HTTP Status Code: 400


TooManyFieldLevelEncryptionQueryArgProfiles

The maximum number of query arg profiles for field-level encryption have been created.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


253
Amazon CloudFront API Reference
UpdateFieldLevelEncryptionProfile

UpdateFieldLevelEncryptionProfile
Update a field-level encryption profile.

Request Syntax
PUT /2020-05-31/field-level-encryption-profile/Id/config HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfileConfig xmlns="[Link]
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Name>string</Name>
</FieldLevelEncryptionProfileConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

FieldLevelEncryptionProfileConfig (p. 254)

Root level tag for the FieldLevelEncryptionProfileConfig parameters.

Required: Yes
CallerReference (p. 254)

A unique number that ensures that the request can't be replayed.

Type: String

Required: Yes
Comment (p. 254)

An optional comment for the field-level encryption profile.

Type: String

Required: No

API Version 2020-05-31


254
Amazon CloudFront API Reference
Response Syntax

EncryptionEntities (p. 254)

A complex data type of encryption entities for the field-level encryption profile that include the
public key ID, provider, and field patterns for specifying which fields to encrypt with this key.

Type: EncryptionEntities (p. 335) object

Required: Yes
Name (p. 254)

Profile name for the field-level encryption profile.

Type: String

Required: Yes

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<FieldLevelEncryptionProfile>
<FieldLevelEncryptionProfileConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncryptionEntities>
<Items>
<EncryptionEntity>
<FieldPatterns>
<Items>
<FieldPattern>string</FieldPattern>
</Items>
<Quantity>integer</Quantity>
</FieldPatterns>
<ProviderId>string</ProviderId>
<PublicKeyId>string</PublicKeyId>
</EncryptionEntity>
</Items>
<Quantity>integer</Quantity>
</EncryptionEntities>
<Name>string</Name>
</FieldLevelEncryptionProfileConfig>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
</FieldLevelEncryptionProfile>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

FieldLevelEncryptionProfile (p. 255)

Root level tag for the FieldLevelEncryptionProfile parameters.

Required: Yes
FieldLevelEncryptionProfileConfig (p. 255)

A complex data type that includes the profile name and the encryption entities for the field-level
encryption profile.

API Version 2020-05-31


255
Amazon CloudFront API Reference
Errors

Type: FieldLevelEncryptionProfileConfig (p. 342) object


Id (p. 255)

The ID for a field-level encryption profile configuration which includes a set of profiles that specify
certain selected data fields to be encrypted by specific public keys.

Type: String
LastModifiedTime (p. 255)

The last time the field-level encryption profile was updated.

Type: Timestamp

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


FieldLevelEncryptionProfileAlreadyExists

The specified profile for field-level encryption already exists.

HTTP Status Code: 409


FieldLevelEncryptionProfileSizeExceeded

The maximum size of a profile for field-level encryption was exceeded.

HTTP Status Code: 400


IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchFieldLevelEncryptionProfile

The specified profile for field-level encryption doesn't exist.

HTTP Status Code: 404

API Version 2020-05-31


256
Amazon CloudFront API Reference
See Also

NoSuchPublicKey

The specified public key doesn't exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


TooManyFieldLevelEncryptionEncryptionEntities

The maximum number of encryption entities for field-level encryption have been created.

HTTP Status Code: 400


TooManyFieldLevelEncryptionFieldPatterns

The maximum number of field patterns for field-level encryption have been created.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


257
Amazon CloudFront API Reference
UpdateOriginRequestPolicy

UpdateOriginRequestPolicy
Updates an origin request policy configuration.

When you update an origin request policy configuration, all the fields are updated with the values
provided in the request. You cannot update some fields independent of others. To update an origin
request policy configuration:

1. Use GetOriginRequestPolicyConfig to get the current configuration.


2. Locally modify the fields in the origin request policy configuration that you want to update.
3. Call UpdateOriginRequestPolicy by providing the entire origin request policy configuration,
including the fields that you modified and those that you didn’t.

Request Syntax
PUT /2020-05-31/origin-request-policy/Id HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicyConfig xmlns="[Link]
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>
</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

API Version 2020-05-31


258
Amazon CloudFront API Reference
Response Syntax

OriginRequestPolicyConfig (p. 258)

Root level tag for the OriginRequestPolicyConfig parameters.

Required: Yes
Comment (p. 258)

A comment to describe the origin request policy.

Type: String

Required: No
CookiesConfig (p. 258)

The cookies from viewer requests to include in origin requests.

Type: OriginRequestPolicyCookiesConfig (p. 377) object

Required: Yes
HeadersConfig (p. 258)

The HTTP headers to include in origin requests. These can include headers from viewer requests and
additional headers added by CloudFront.

Type: OriginRequestPolicyHeadersConfig (p. 378) object

Required: Yes
Name (p. 258)

A unique name to identify the origin request policy.

Type: String

Required: Yes
QueryStringsConfig (p. 258)

The URL query strings from viewer requests to include in origin requests.

Type: OriginRequestPolicyQueryStringsConfig (p. 380) object

Required: Yes

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<OriginRequestPolicy>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<OriginRequestPolicyConfig>
<Comment>string</Comment>
<CookiesConfig>
<CookieBehavior>string</CookieBehavior>
<Cookies>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Cookies>

API Version 2020-05-31


259
Amazon CloudFront API Reference
Response Elements

</CookiesConfig>
<HeadersConfig>
<HeaderBehavior>string</HeaderBehavior>
<Headers>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</Headers>
</HeadersConfig>
<Name>string</Name>
<QueryStringsConfig>
<QueryStringBehavior>string</QueryStringBehavior>
<QueryStrings>
<Items>
<Name>string</Name>
</Items>
<Quantity>integer</Quantity>
</QueryStrings>
</QueryStringsConfig>
</OriginRequestPolicyConfig>
</OriginRequestPolicy>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

OriginRequestPolicy (p. 259)

Root level tag for the OriginRequestPolicy parameters.

Required: Yes
Id (p. 259)

The unique identifier for the origin request policy.

Type: String
LastModifiedTime (p. 259)

The date and time when the origin request policy was last modified.

Type: Timestamp
OriginRequestPolicyConfig (p. 259)

The origin request policy configuration.

Type: OriginRequestPolicyConfig (p. 375) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403

API Version 2020-05-31


260
Amazon CloudFront API Reference
See Also

IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchOriginRequestPolicy

The origin request policy does not exist.

HTTP Status Code: 404


OriginRequestPolicyAlreadyExists

An origin request policy with this name already exists. You must provide a unique name. To modify
an existing origin request policy, use UpdateOriginRequestPolicy.

HTTP Status Code: 409


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412


TooManyCookiesInOriginRequestPolicy

The number of cookies in the origin request policy exceeds the maximum. For more information, see
Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyHeadersInOriginRequestPolicy

The number of headers in the origin request policy exceeds the maximum. For more information, see
Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400


TooManyQueryStringsInOriginRequestPolicy

The number of query strings in the origin request policy exceeds the maximum. For more
information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2020-05-31


261
Amazon CloudFront API Reference
See Also

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


262
Amazon CloudFront API Reference
UpdatePublicKey

UpdatePublicKey
Update public key information. Note that the only value you can change is the comment.

Request Syntax
PUT /2020-05-31/public-key/Id/config HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<PublicKeyConfig xmlns="[Link]
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncodedKey>string</EncodedKey>
<Name>string</Name>
</PublicKeyConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

PublicKeyConfig (p. 263)

Root level tag for the PublicKeyConfig parameters.

Required: Yes
CallerReference (p. 263)

A unique number that ensures that the request can't be replayed.

Type: String

Required: Yes
Comment (p. 263)

An optional comment about a public key.

Type: String

Required: No
EncodedKey (p. 263)

The encoded public key that you want to add to CloudFront to use with features like field-level
encryption.

Type: String

Required: Yes
Name (p. 263)

The name for a public key you add to CloudFront to use with features like field-level encryption.

Type: String

Required: Yes

API Version 2020-05-31


263
Amazon CloudFront API Reference
Response Syntax

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<PublicKey>
<CreatedTime>timestamp</CreatedTime>
<Id>string</Id>
<PublicKeyConfig>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<EncodedKey>string</EncodedKey>
<Name>string</Name>
</PublicKeyConfig>
</PublicKey>

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

PublicKey (p. 264)

Root level tag for the PublicKey parameters.

Required: Yes
CreatedTime (p. 264)

A time you added a public key to CloudFront.

Type: Timestamp
Id (p. 264)

A unique ID assigned to a public key you've added to CloudFront.

Type: String
PublicKeyConfig (p. 264)

A complex data type for a public key you add to CloudFront to use with features like field-level
encryption.

Type: PublicKeyConfig (p. 388) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CannotChangeImmutablePublicKeyFields

You can't change the value of a public key.

HTTP Status Code: 400

API Version 2020-05-31


264
Amazon CloudFront API Reference
See Also

IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


NoSuchPublicKey

The specified public key doesn't exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


265
Amazon CloudFront API Reference
UpdateRealtimeLogConfig

UpdateRealtimeLogConfig
Updates a real-time log configuration.

When you update a real-time log configuration, all the parameters are updated with the values provided
in the request. You cannot update some parameters independent of others. To update a real-time log
configuration:

1. Call GetRealtimeLogConfig to get the current real-time log configuration.


2. Locally modify the parameters in the real-time log configuration that you want to update.
3. Call this API (UpdateRealtimeLogConfig) by providing the entire real-time log configuration,
including the parameters that you modified and those that you didn’t.

You cannot update a real-time log configuration’s Name or ARN.

Request Syntax
PUT /2020-05-31/realtime-log-config/ HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<UpdateRealtimeLogConfigRequest xmlns="[Link]
<ARN>string</ARN>
<EndPoints>
<EndPoint>
<KinesisStreamConfig>
<RoleARN>string</RoleARN>
<StreamARN>string</StreamARN>
</KinesisStreamConfig>
<StreamType>string</StreamType>
</EndPoint>
</EndPoints>
<Fields>
<Field>string</Field>
</Fields>
<Name>string</Name>
<SamplingRate>long</SamplingRate>
</UpdateRealtimeLogConfigRequest>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

UpdateRealtimeLogConfigRequest (p. 266)

Root level tag for the UpdateRealtimeLogConfigRequest parameters.

Required: Yes
ARN (p. 266)

The Amazon Resource Name (ARN) for this real-time log configuration.

Type: String

API Version 2020-05-31


266
Amazon CloudFront API Reference
Response Syntax

Required: No
EndPoints (p. 266)

Contains information about the Amazon Kinesis data stream where you are sending real-time log
data.

Type: Array of EndPoint (p. 337) objects

Required: No
Fields (p. 266)

A list of fields to include in each real-time log record.

For more information about fields, see Real-time log configuration fields in the Amazon CloudFront
Developer Guide.

Type: Array of strings

Required: No
Name (p. 266)

The name for this real-time log configuration.

Type: String

Required: No
SamplingRate (p. 266)

The sampling rate for this real-time log configuration. The sampling rate determines the percentage
of viewer requests that are represented in the real-time log data. You must provide an integer
between 1 and 100, inclusive.

Type: Long

Required: No

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<UpdateRealtimeLogConfigResult>
<RealtimeLogConfig>
<ARN>string</ARN>
<EndPoints>
<EndPoint>
<KinesisStreamConfig>
<RoleARN>string</RoleARN>
<StreamARN>string</StreamARN>
</KinesisStreamConfig>
<StreamType>string</StreamType>
</EndPoint>
</EndPoints>
<Fields>
<Field>string</Field>
</Fields>
<Name>string</Name>
<SamplingRate>long</SamplingRate>
</RealtimeLogConfig>
</UpdateRealtimeLogConfigResult>

API Version 2020-05-31


267
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

UpdateRealtimeLogConfigResult (p. 267)

Root level tag for the UpdateRealtimeLogConfigResult parameters.

Required: Yes
RealtimeLogConfig (p. 267)

A real-time log configuration.

Type: RealtimeLogConfig (p. 396) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

InvalidArgument

An argument is invalid.

HTTP Status Code: 400


NoSuchRealtimeLogConfig

The real-time log configuration does not exist.

HTTP Status Code: 404

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


268
Amazon CloudFront API Reference
UpdateStreamingDistribution

UpdateStreamingDistribution
Update a streaming distribution.

Request Syntax
PUT /2020-05-31/streaming-distribution/Id/config HTTP/1.1
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfig xmlns="[Link]
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>

URI Request Parameters


The request does not use any URI parameters.

Request Body
The request accepts the following data in XML format.

StreamingDistributionConfig (p. 269)

Root level tag for the StreamingDistributionConfig parameters.

Required: Yes
Aliases (p. 269)

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

Type: Aliases (p. 279) object

API Version 2020-05-31


269
Amazon CloudFront API Reference
Request Body

Required: No
CallerReference (p. 269)

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


StreamingDistributionConfig object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String

Required: Yes
Comment (p. 269)

Any comments you want to include about the streaming distribution.

Type: String

Required: Yes
Enabled (p. 269)

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

Type: Boolean

Required: Yes
Logging (p. 269)

A complex type that controls whether access logs are written for the streaming distribution.

Type: StreamingLoggingConfig (p. 414) object

Required: No
PriceClass (p. 269)

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

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: No
S3Origin (p. 269)

A complex type that contains information about the Amazon S3 bucket from which you want
CloudFront to get your media files for distribution.

Type: S3Origin (p. 401) object

Required: Yes
TrustedSigners (p. 269)

A complex type that specifies any AWS accounts that you want to permit to create signed URLs for
private content. If you want the distribution to use signed URLs, include this element; if you want

API Version 2020-05-31


270
Amazon CloudFront API Reference
Response Syntax

the distribution to use public URLs, remove this element. For more information, see Serving Private
Content through CloudFront in the Amazon CloudFront Developer Guide.

Type: TrustedSigners (p. 418) object

Required: Yes

Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistribution>
<ActiveTrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<Signer>
<AwsAccountNumber>string</AwsAccountNumber>
<KeyPairIds>
<Items>
<KeyPairId>string</KeyPairId>
</Items>
<Quantity>integer</Quantity>
</KeyPairIds>
</Signer>
</Items>
<Quantity>integer</Quantity>
</ActiveTrustedSigners>
<ARN>string</ARN>
<DomainName>string</DomainName>
<Id>string</Id>
<LastModifiedTime>timestamp</LastModifiedTime>
<Status>string</Status>
<StreamingDistributionConfig>
<Aliases>
<Items>
<CNAME>string</CNAME>
</Items>
<Quantity>integer</Quantity>
</Aliases>
<CallerReference>string</CallerReference>
<Comment>string</Comment>
<Enabled>boolean</Enabled>
<Logging>
<Bucket>string</Bucket>
<Enabled>boolean</Enabled>
<Prefix>string</Prefix>
</Logging>
<PriceClass>string</PriceClass>
<S3Origin>
<DomainName>string</DomainName>
<OriginAccessIdentity>string</OriginAccessIdentity>
</S3Origin>
<TrustedSigners>
<Enabled>boolean</Enabled>
<Items>
<AwsAccountNumber>string</AwsAccountNumber>
</Items>
<Quantity>integer</Quantity>
</TrustedSigners>
</StreamingDistributionConfig>
</StreamingDistribution>

API Version 2020-05-31


271
Amazon CloudFront API Reference
Response Elements

Response Elements
If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

StreamingDistribution (p. 271)

Root level tag for the StreamingDistribution parameters.

Required: Yes
ActiveTrustedSigners (p. 271)

A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed
URLs for private content.

The Signer complex type lists the AWS account number of the trusted signer or self if the signer
is the AWS account that created the distribution. The Signer element also includes the IDs of
any active CloudFront key pairs that are associated with the trusted signer's AWS account. If no
KeyPairId element appears for a Signer, that signer can't create signed URLs.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Type: ActiveTrustedSigners (p. 278) object


ARN (p. 271)

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

Type: String
DomainName (p. 271)

The domain name that corresponds to the streaming distribution, for example,
[Link].

Type: String
Id (p. 271)

The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.

Type: String
LastModifiedTime (p. 271)

The date and time that the distribution was last modified.

Type: Timestamp
Status (p. 271)

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

Type: String
StreamingDistributionConfig (p. 271)

The current configuration information for the RTMP distribution.

API Version 2020-05-31


272
Amazon CloudFront API Reference
Errors

Type: StreamingDistributionConfig (p. 407) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 425).

AccessDenied

Access denied.

HTTP Status Code: 403


CNAMEAlreadyExists

The CNAME specified is already defined for CloudFront.

HTTP Status Code: 409


IllegalUpdate

The update contains modifications that are not allowed.

HTTP Status Code: 400


InconsistentQuantities

The value of Quantity and the size of Items don't match.

HTTP Status Code: 400


InvalidArgument

An argument is invalid.

HTTP Status Code: 400


InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400


InvalidOriginAccessIdentity

The origin access identity is not valid or doesn't exist.

HTTP Status Code: 400


MissingBody

This operation requires a body. Ensure that the body is present and the Content-Type header is
set.

HTTP Status Code: 400


NoSuchStreamingDistribution

The specified streaming distribution does not exist.

HTTP Status Code: 404


PreconditionFailed

The precondition given in one or more of the request header fields evaluated to false.

HTTP Status Code: 412

API Version 2020-05-31


273
Amazon CloudFront API Reference
See Also

TooManyStreamingDistributionCNAMEs

Your request contains more CNAMEs than are allowed per distribution.

HTTP Status Code: 400


TooManyTrustedSigners

Your request contains more trusted signers than are allowed per distribution.

HTTP Status Code: 400


TrustedSignerDoesNotExist

One or more of your trusted signers don't exist.

HTTP Status Code: 400

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3

API Version 2020-05-31


274
Amazon CloudFront API Reference

Data Types
The Amazon CloudFront API contains several data types that various actions use. This section describes
each data type in detail.
Note
The order of each element in a data type structure is not guaranteed. Applications should not
assume a particular order.

The following data types are supported:

• ActiveTrustedSigners (p. 278)


• Aliases (p. 279)
• AliasICPRecordal (p. 280)
• AllowedMethods (p. 281)
• CacheBehavior (p. 283)
• CacheBehaviors (p. 288)
• CachedMethods (p. 289)
• CachePolicy (p. 290)
• CachePolicyConfig (p. 291)
• CachePolicyCookiesConfig (p. 293)
• CachePolicyHeadersConfig (p. 294)
• CachePolicyList (p. 295)
• CachePolicyQueryStringsConfig (p. 296)
• CachePolicySummary (p. 297)
• CloudFrontOriginAccessIdentity (p. 298)
• CloudFrontOriginAccessIdentityConfig (p. 299)
• CloudFrontOriginAccessIdentityList (p. 300)
• CloudFrontOriginAccessIdentitySummary (p. 302)
• ContentTypeProfile (p. 303)
• ContentTypeProfileConfig (p. 304)
• ContentTypeProfiles (p. 305)
• CookieNames (p. 306)
• CookiePreference (p. 307)
• CustomErrorResponse (p. 309)
• CustomErrorResponses (p. 311)
• CustomHeaders (p. 312)
• CustomOriginConfig (p. 313)
• DefaultCacheBehavior (p. 315)
• Distribution (p. 319)
• DistributionConfig (p. 321)
• DistributionConfigWithTags (p. 326)
• DistributionIdList (p. 327)
• DistributionList (p. 329)
• DistributionSummary (p. 331)
• EncryptionEntities (p. 335)

API Version 2020-05-31


275
Amazon CloudFront API Reference

• EncryptionEntity (p. 336)


• EndPoint (p. 337)
• FieldLevelEncryption (p. 338)
• FieldLevelEncryptionConfig (p. 339)
• FieldLevelEncryptionList (p. 340)
• FieldLevelEncryptionProfile (p. 341)
• FieldLevelEncryptionProfileConfig (p. 342)
• FieldLevelEncryptionProfileList (p. 343)
• FieldLevelEncryptionProfileSummary (p. 344)
• FieldLevelEncryptionSummary (p. 345)
• FieldPatterns (p. 346)
• ForwardedValues (p. 347)
• GeoRestriction (p. 350)
• Headers (p. 352)
• Invalidation (p. 353)
• InvalidationBatch (p. 354)
• InvalidationList (p. 355)
• InvalidationSummary (p. 357)
• KeyPairIds (p. 358)
• KinesisStreamConfig (p. 359)
• LambdaFunctionAssociation (p. 360)
• LambdaFunctionAssociations (p. 362)
• LoggingConfig (p. 363)
• MonitoringSubscription (p. 365)
• Origin (p. 366)
• OriginCustomHeader (p. 368)
• OriginGroup (p. 369)
• OriginGroupFailoverCriteria (p. 370)
• OriginGroupMember (p. 371)
• OriginGroupMembers (p. 372)
• OriginGroups (p. 373)
• OriginRequestPolicy (p. 374)
• OriginRequestPolicyConfig (p. 375)
• OriginRequestPolicyCookiesConfig (p. 377)
• OriginRequestPolicyHeadersConfig (p. 378)
• OriginRequestPolicyList (p. 379)
• OriginRequestPolicyQueryStringsConfig (p. 380)
• OriginRequestPolicySummary (p. 381)
• Origins (p. 382)
• OriginSslProtocols (p. 383)
• ParametersInCacheKeyAndForwardedToOrigin (p. 384)
• Paths (p. 386)
• PublicKey (p. 387)
• PublicKeyConfig (p. 388)
• PublicKeyList (p. 389)
• PublicKeySummary (p. 390)

API Version 2020-05-31


276
Amazon CloudFront API Reference

• QueryArgProfile (p. 391)


• QueryArgProfileConfig (p. 392)
• QueryArgProfiles (p. 393)
• QueryStringCacheKeys (p. 394)
• QueryStringNames (p. 395)
• RealtimeLogConfig (p. 396)
• RealtimeLogConfigs (p. 398)
• RealtimeMetricsSubscriptionConfig (p. 399)
• Restrictions (p. 400)
• S3Origin (p. 401)
• S3OriginConfig (p. 402)
• Signer (p. 403)
• StatusCodes (p. 404)
• StreamingDistribution (p. 405)
• StreamingDistributionConfig (p. 407)
• StreamingDistributionConfigWithTags (p. 409)
• StreamingDistributionList (p. 410)
• StreamingDistributionSummary (p. 412)
• StreamingLoggingConfig (p. 414)
• Tag (p. 415)
• TagKeys (p. 416)
• Tags (p. 417)
• TrustedSigners (p. 418)
• ViewerCertificate (p. 419)

API Version 2020-05-31


277
Amazon CloudFront API Reference
ActiveTrustedSigners

ActiveTrustedSigners
A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners complex
type for this distribution. These are the accounts that you want to allow to create signed URLs for private
content.

The Signer complex type lists the AWS account number of the trusted signer or self if the signer
is the AWS account that created the distribution. The Signer element also includes the IDs of any
active CloudFront key pairs that are associated with the trusted signer's AWS account. If no KeyPairId
element appears for a Signer, that signer can't create signed URLs.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Contents
Enabled

Enabled is true if any of the AWS accounts listed in the TrustedSigners complex type for this
distribution have active CloudFront key pairs. If not, Enabled is false.

Type: Boolean

Required: Yes
Items

A complex type that contains one Signer complex type for each trusted signer that is specified in
the TrustedSigners complex type.

Type: Array of Signer (p. 403) objects

Required: No
Quantity

The number of trusted signers specified in the TrustedSigners complex type.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


278
Amazon CloudFront API Reference
Aliases

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

Contents
Items

A complex type that contains the CNAME aliases, if any, that you want to associate with this
distribution.

Type: Array of strings

Required: No
Quantity

The number of CNAME aliases, if any, that you want to associate with this distribution.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


279
Amazon CloudFront API Reference
AliasICPRecordal

AliasICPRecordal
AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they want
to serve content publicly on an alternate domain name, also known as a CNAME, that they've added to
CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with distributions.
The status is returned in the CloudFront response; you can't configure it yourself.

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started with
AWS services in China.

Contents
CNAME

A domain name associated with a distribution.

Type: String

Required: No
ICPRecordalStatus

The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to
APPROVED for all CNAMEs (aliases) in regions outside of China.

The status values returned are the following:


• APPROVED indicates that the associated CNAME has a valid ICP recordal number. Multiple
CNAMEs can be associated with a distribution, and CNAMEs can correspond to different ICP
recordals. To be marked as APPROVED, that is, valid to use with China region, a CNAME must have
one ICP recordal number associated with it.
• SUSPENDED indicates that the associated CNAME does not have a valid ICP recordal number.
• PENDING indicates that CloudFront can't determine the ICP recordal status of the CNAME
associated with the distribution because there was an error in trying to determine the status. You
can try again to see if the error is resolved in which case CloudFront returns an APPROVED or
SUSPENDED status.

Type: String

Valid Values: APPROVED | SUSPENDED | PENDING

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


280
Amazon CloudFront API Reference
AllowedMethods

AllowedMethods
A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon
S3 bucket or your custom origin. There are three choices:

• CloudFront forwards only GET and HEAD requests.


• CloudFront forwards only GET, HEAD, and OPTIONS requests.
• CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests.

If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom
origin so users can't perform operations that you don't want them to. For example, you might not want
users to have permissions to delete objects from your origin.

Contents
CachedMethods

A complex type that controls whether CloudFront caches the response to requests using the
specified HTTP methods. There are two choices:
• CloudFront caches responses to GET and HEAD requests.
• CloudFront caches responses to GET, HEAD, and OPTIONS requests.

If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-
Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be
cached correctly.

Type: CachedMethods (p. 289) object

Required: No
Items

A complex type that contains the HTTP methods that you want CloudFront to process and forward
to your origin.

Type: Array of strings

Valid Values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE

Required: Yes
Quantity

The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are
2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD,
OPTIONS, PUT, PATCH, POST, and DELETE requests).

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++

API Version 2020-05-31


281
Amazon CloudFront API Reference
See Also

• AWS SDK for Go


• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


282
Amazon CloudFront API Reference
CacheBehavior

CacheBehavior
A complex type that describes how CloudFront processes requests.

You must create at least as many cache behaviors (including the default cache behavior) as you have
origins if you want CloudFront to serve objects from all of the origins. Each cache behavior specifies the
one origin from which you want CloudFront to get objects. If you have two origins and only the default
cache behavior, the default cache behavior will cause CloudFront to get objects from one of the origins,
but the other origin is never used.

For the current quota (formerly known as limit) on the number of cache behaviors that you can add to a
distribution, see Quotas in the Amazon CloudFront Developer Guide.

If you don’t want to specify any cache behaviors, include only an empty CacheBehaviors element.
Don’t include an empty CacheBehavior element because this is invalid.

To delete all cache behaviors in an existing distribution, update the distribution configuration and
include only an empty CacheBehaviors element.

To add, change, or remove one or more cache behaviors, update the distribution configuration and
specify all of the cache behaviors that you want to include in the updated distribution.

For more information about cache behaviors, see Cache Behavior Settings in the Amazon CloudFront
Developer Guide.

Contents
AllowedMethods

A complex type that controls which HTTP methods CloudFront processes and forwards to your
Amazon S3 bucket or your custom origin. There are three choices:
• CloudFront forwards only GET and HEAD requests.
• CloudFront forwards only GET, HEAD, and OPTIONS requests.
• CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests.

If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your
custom origin so users can't perform operations that you don't want them to. For example, you
might not want users to have permissions to delete objects from your origin.

Type: AllowedMethods (p. 281) object

Required: No
CachePolicyId

The unique identifier of the cache policy that is attached to this cache behavior. For more
information, see Creating cache policies or Using the managed cache policies in the Amazon
CloudFront Developer Guide.

Type: String

Required: No
Compress

Whether you want CloudFront to automatically compress certain files for this cache behavior. If so,
specify true; if not, specify false. For more information, see Serving Compressed Files in the Amazon
CloudFront Developer Guide.

API Version 2020-05-31


283
Amazon CloudFront API Reference
Contents

Type: Boolean

Required: No
DefaultTTL

This field is deprecated. We recommend that you use the DefaultTTL field in a cache policy instead
of this field. For more information, see Creating cache policies or Using the managed cache policies
in the Amazon CloudFront Developer Guide.

The default amount of time that you want objects to stay in CloudFront caches before CloudFront
forwards another request to your origin to determine whether the object has been updated. The
value that you specify applies only when your origin does not add HTTP headers such as Cache-
Control max-age, Cache-Control s-maxage, and Expires to objects. For more information,
see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront
Developer Guide.

Type: Long

Required: No
FieldLevelEncryptionId

The value of ID for the field-level encryption configuration that you want CloudFront to use for
encrypting specific fields of data for this cache behavior.

Type: String

Required: No
ForwardedValues

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field. For more information, see Working with policies in the Amazon CloudFront
Developer Guide.

If you want to include values in the cache key, use a cache policy. For more information, see Creating
cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

If you want to send values to the origin but not include them in the cache key, use an origin request
policy. For more information, see Creating origin request policies or Using the managed origin
request policies in the Amazon CloudFront Developer Guide.

A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

Type: ForwardedValues (p. 347) object

Required: No
LambdaFunctionAssociations

A complex type that contains zero or more Lambda function associations for a cache behavior.

Type: LambdaFunctionAssociations (p. 362) object

Required: No
MaxTTL

This field is deprecated. We recommend that you use the MaxTTL field in a cache policy instead of
this field. For more information, see Creating cache policies or Using the managed cache policies in
the Amazon CloudFront Developer Guide.

The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront
forwards another request to your origin to determine whether the object has been updated.

API Version 2020-05-31


284
Amazon CloudFront API Reference
Contents

The value that you specify applies only when your origin adds HTTP headers such as Cache-
Control max-age, Cache-Control s-maxage, and Expires to objects. For more information,
see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront
Developer Guide.

Type: Long

Required: No
MinTTL

This field is deprecated. We recommend that you use the MinTTL field in a cache policy instead of
this field. For more information, see Creating cache policies or Using the managed cache policies in
the Amazon CloudFront Developer Guide.

The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront
forwards another request to your origin to determine whether the object has been updated. For
more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

You must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin
(under Headers, if you specify 1 for Quantity and * for Name).

Type: Long

Required: No
OriginRequestPolicyId

The unique identifier of the origin request policy that is attached to this cache behavior. For more
information, see Creating origin request policies or Using the managed origin request policies in the
Amazon CloudFront Developer Guide.

Type: String

Required: No
PathPattern

The pattern (for example, images/*.jpg) that specifies which requests to apply the behavior to.
When CloudFront receives a viewer request, the requested path is compared with path patterns in
the order in which cache behaviors are listed in the distribution.
Note
You can optionally include a slash (/) at the beginning of the path pattern. For example, /
images/*.jpg. CloudFront behavior is the same with or without the leading /.

The path pattern for the default cache behavior is * and cannot be changed. If the request for an
object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in
the default cache behavior.

For more information, see Path Pattern in the Amazon CloudFront Developer Guide.

Type: String

Required: Yes
RealtimeLogConfigArn

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache
behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Type: String

API Version 2020-05-31


285
Amazon CloudFront API Reference
Contents

Required: No
SmoothStreaming

Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format
using the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
If you specify true for SmoothStreaming, you can still distribute other content using this cache
behavior if the content matches the value of PathPattern.

Type: Boolean

Required: No
TargetOriginId

The value of ID for the origin that you want CloudFront to route requests to when they match this
cache behavior.

Type: String

Required: Yes
TrustedSigners

A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs
for private content.

If you want to require signed URLs in requests for objects in the target origin that match the
PathPattern for this cache behavior, specify true for Enabled, and specify the applicable values
for Quantity and Items. For more information, see Serving Private Content with Signed URLs and
Signed Cookies in the Amazon CloudFront Developer Guide.

If you don’t want to require signed URLs in requests for objects that match PathPattern, specify
false for Enabled and 0 for Quantity. Omit Items.

To add, change, or remove one or more trusted signers, change Enabled to true (if it’s currently
false), change Quantity as applicable, and specify all of the trusted signers that you want to
include in the updated distribution.

Type: TrustedSigners (p. 418) object

Required: Yes
ViewerProtocolPolicy

The protocol that viewers can use to access the files in the origin specified by TargetOriginId
when a request matches the path pattern in PathPattern. You can specify the following options:
• allow-all: Viewers can use HTTP or HTTPS.
• redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status
code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then
resubmits the request using the new URL.
• https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403
(Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers
and CloudFront in the Amazon CloudFront Developer Guide.
Note
The only way to guarantee that viewers retrieve an object that was fetched from the origin
using HTTPS is never to use any other protocol to fetch the object. If you have recently
changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because
cached objects are protocol agnostic. That means that an edge location will return an object

API Version 2020-05-31


286
Amazon CloudFront API Reference
See Also

from the cache regardless of whether the current request protocol matches the protocol
used previously. For more information, see Managing Cache Expiration in the Amazon
CloudFront Developer Guide.

Type: String

Valid Values: allow-all | https-only | redirect-to-https

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


287
Amazon CloudFront API Reference
CacheBehaviors

CacheBehaviors
A complex type that contains zero or more CacheBehavior elements.

Contents
Items

Optional: A complex type that contains cache behaviors for this distribution. If Quantity is 0, you
can omit Items.

Type: Array of CacheBehavior (p. 283) objects

Required: No
Quantity

The number of cache behaviors for this distribution.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


288
Amazon CloudFront API Reference
CachedMethods

CachedMethods
A complex type that controls whether CloudFront caches the response to requests using the specified
HTTP methods. There are two choices:

• CloudFront caches responses to GET and HEAD requests.


• CloudFront caches responses to GET, HEAD, and OPTIONS requests.

If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-
Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached
correctly.

Contents
Items

A complex type that contains the HTTP methods that you want CloudFront to cache responses to.

Type: Array of strings

Valid Values: GET | HEAD | POST | PUT | PATCH | OPTIONS | DELETE

Required: Yes
Quantity

The number of HTTP methods for which you want CloudFront to cache responses. Valid values are
2 (for caching responses to GET and HEAD requests) and 3 (for caching responses to GET, HEAD, and
OPTIONS requests).

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


289
Amazon CloudFront API Reference
CachePolicy

CachePolicy
A cache policy.

When it’s attached to a cache behavior, the cache policy determines the following:

• The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies,
and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to
the viewer.
• The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the
CloudFront cache.

The headers, cookies, and query strings that are included in the cache key are automatically included in
requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find a valid object
in its cache that matches the request’s cache key. If you want to send values to the origin but not include
them in the cache key, use OriginRequestPolicy.

Contents
CachePolicyConfig

The cache policy configuration.

Type: CachePolicyConfig (p. 291) object

Required: Yes
Id

The unique identifier for the cache policy.

Type: String

Required: Yes
LastModifiedTime

The date and time when the cache policy was last modified.

Type: Timestamp

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


290
Amazon CloudFront API Reference
CachePolicyConfig

CachePolicyConfig
A cache policy configuration.

This configuration determines the following:

• The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies,
and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to
the viewer.
• The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the
CloudFront cache.

The headers, cookies, and query strings that are included in the cache key are automatically included in
requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find a valid object
in its cache that matches the request’s cache key. If you want to send values to the origin but not include
them in the cache key, use OriginRequestPolicy.

Contents
Comment

A comment to describe the cache policy.

Type: String

Required: No
DefaultTTL

The default amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated.
CloudFront uses this value as the object’s time to live (TTL) only when the origin does not send
Cache-Control or Expires headers with the object. For more information, see Managing How
Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

The default value for this field is 86400 seconds (one day). If the value of MinTTL is more than
86400 seconds, then the default value for this field is the same as the value of MinTTL.

Type: Long

Required: No
MaxTTL

The maximum amount of time, in seconds, that objects stay in the CloudFront cache before
CloudFront sends another request to the origin to see if the object has been updated. CloudFront
uses this value only when the origin sends Cache-Control or Expires headers with the object.
For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

The default value for this field is 31536000 seconds (one year). If the value of MinTTL or
DefaultTTL is more than 31536000 seconds, then the default value for this field is the same as the
value of DefaultTTL.

Type: Long

Required: No

API Version 2020-05-31


291
Amazon CloudFront API Reference
See Also

MinTTL

The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache
before CloudFront sends another request to the origin to see if the object has been updated. For
more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

Type: Long

Required: Yes
Name

A unique name to identify the cache policy.

Type: String

Required: Yes
ParametersInCacheKeyAndForwardedToOrigin

The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in
the cache key are automatically included in requests that CloudFront sends to the origin.

Type: ParametersInCacheKeyAndForwardedToOrigin (p. 384) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


292
Amazon CloudFront API Reference
CachePolicyCookiesConfig

CachePolicyCookiesConfig
An object that determines whether any cookies in viewer requests (and if so, which cookies) are included
in the cache key and automatically included in requests that CloudFront sends to the origin.

Contents
CookieBehavior

Determines whether any cookies in viewer requests are included in the cache key and automatically
included in requests that CloudFront sends to the origin. Valid values are:
• none – Cookies in viewer requests are not included in the cache key and are not automatically
included in requests that CloudFront sends to the origin. Even when this field is set to none, any
cookies that are listed in an OriginRequestPolicy are included in origin requests.
• whitelist – The cookies in viewer requests that are listed in the CookieNames type are included
in the cache key and automatically included in requests that CloudFront sends to the origin.
• allExcept – All cookies in viewer requests that are not listed in the CookieNames type are
included in the cache key and automatically included in requests that CloudFront sends to the
origin.
• all – All cookies in viewer requests are included in the cache key and are automatically included
in requests that CloudFront sends to the origin.

Type: String

Valid Values: none | whitelist | allExcept | all

Required: Yes
Cookies

Contains a list of cookie names.

Type: CookieNames (p. 306) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


293
Amazon CloudFront API Reference
CachePolicyHeadersConfig

CachePolicyHeadersConfig
An object that determines whether any HTTP headers (and if so, which headers) are included in the cache
key and automatically included in requests that CloudFront sends to the origin.

Contents
HeaderBehavior

Determines whether any HTTP headers are included in the cache key and automatically included in
requests that CloudFront sends to the origin. Valid values are:
• none – HTTP headers are not included in the cache key and are not automatically included in
requests that CloudFront sends to the origin. Even when this field is set to none, any headers that
are listed in an OriginRequestPolicy are included in origin requests.
• whitelist – The HTTP headers that are listed in the Headers type are included in the cache key
and are automatically included in requests that CloudFront sends to the origin.

Type: String

Valid Values: none | whitelist

Required: Yes
Headers

Contains a list of HTTP header names.

Type: Headers (p. 352) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


294
Amazon CloudFront API Reference
CachePolicyList

CachePolicyList
A list of cache policies.

Contents
Items

Contains the cache policies in the list.

Type: Array of CachePolicySummary (p. 297) objects

Required: No
MaxItems

The maximum number of cache policies requested.

Type: Integer

Required: Yes
NextMarker

If there are more items in the list than are in this response, this element is present. It contains the
value that you should use in the Marker field of a subsequent request to continue listing cache
policies where you left off.

Type: String

Required: No
Quantity

The total number of cache policies returned in the response.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


295
Amazon CloudFront API Reference
CachePolicyQueryStringsConfig

CachePolicyQueryStringsConfig
An object that determines whether any URL query strings in viewer requests (and if so, which query
strings) are included in the cache key and automatically included in requests that CloudFront sends to
the origin.

Contents
QueryStringBehavior

Determines whether any URL query strings in viewer requests are included in the cache key and
automatically included in requests that CloudFront sends to the origin. Valid values are:
• none – Query strings in viewer requests are not included in the cache key and are not
automatically included in requests that CloudFront sends to the origin. Even when this field is set
to none, any query strings that are listed in an OriginRequestPolicy are included in origin
requests.
• whitelist – The query strings in viewer requests that are listed in the QueryStringNames type
are included in the cache key and automatically included in requests that CloudFront sends to the
origin.
• allExcept – All query strings in viewer requests that are not listed in the QueryStringNames
type are included in the cache key and automatically included in requests that CloudFront sends to
the origin.
• all – All query strings in viewer requests are included in the cache key and are automatically
included in requests that CloudFront sends to the origin.

Type: String

Valid Values: none | whitelist | allExcept | all

Required: Yes
QueryStrings

Contains the specific query strings in viewer requests that either are or are not included in the
cache key and automatically included in requests that CloudFront sends to the origin. The behavior
depends on whether the QueryStringBehavior field in the CachePolicyQueryStringsConfig
type is set to whitelist (the listed query strings are included) or allExcept (the listed query
strings are not included, but all other query strings are).

Type: QueryStringNames (p. 395) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


296
Amazon CloudFront API Reference
CachePolicySummary

CachePolicySummary
Contains a cache policy.

Contents
CachePolicy

The cache policy.

Type: CachePolicy (p. 290) object

Required: Yes
Type

The type of cache policy, either managed (created by AWS) or custom (created in this AWS account).

Type: String

Valid Values: managed | custom

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


297
Amazon CloudFront API Reference
CloudFrontOriginAccessIdentity

CloudFrontOriginAccessIdentity
CloudFront origin access identity.

Contents
CloudFrontOriginAccessIdentityConfig

The current configuration information for the identity.

Type: CloudFrontOriginAccessIdentityConfig (p. 299) object

Required: No
Id

The ID for the origin access identity, for example, E74FTE3AJFJ256A.

Type: String

Required: Yes
S3CanonicalUserId

The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access
identity read permission to an object in Amazon S3.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


298
Amazon CloudFront API Reference
CloudFrontOriginAccessIdentityConfig

CloudFrontOriginAccessIdentityConfig
Origin access identity configuration. Send a GET request to the /CloudFront API version/
CloudFront/identity ID/config resource.

Contents
CallerReference

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


CloudFrontOriginAccessIdentityConfig object), a new origin access identity is created.

If the CallerReference is a value already sent in a previous identity request, and the content of
the CloudFrontOriginAccessIdentityConfig is identical to the original request (ignoring
white space), the response includes the same information returned to the original request.

If the CallerReference is a value you already sent in a previous request to create an identity, but
the content of the CloudFrontOriginAccessIdentityConfig is different from the original
request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists error.

Type: String

Required: Yes
Comment

Any comments you want to include about the origin access identity.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


299
Amazon CloudFront API Reference
CloudFrontOriginAccessIdentityList

CloudFrontOriginAccessIdentityList
Lists the origin access identities for [Link] a GET request to the /CloudFront
API version/origin-access-identity/cloudfront resource. The response
includes a CloudFrontOriginAccessIdentityList element with zero or more
CloudFrontOriginAccessIdentitySummary child elements. By default, your entire list of origin
access identities is returned in one single page. If the list is long, you can paginate it using the MaxItems
and Marker parameters.

Contents
IsTruncated

A flag that indicates whether more origin access identities remain to be listed. If your results were
truncated, you can make a follow-up pagination request using the Marker request parameter to
retrieve more items in the list.

Type: Boolean

Required: Yes
Items

A complex type that contains one CloudFrontOriginAccessIdentitySummary element for each


origin access identity that was created by the current AWS account.

Type: Array of CloudFrontOriginAccessIdentitySummary (p. 302) objects

Required: No
Marker

Use this when paginating results to indicate where to begin in your list of origin access identities.
The results include identities in the list that occur after the marker. To get the next page of results,
set the Marker to the value of the NextMarker from the current page's response (which is also the
ID of the last identity on that page).

Type: String

Required: Yes
MaxItems

The maximum number of origin access identities you want in the response body.

Type: Integer

Required: Yes
NextMarker

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your origin access identities where they left off.

Type: String

Required: No
Quantity

The number of CloudFront origin access identities that were created by the current AWS account.

Type: Integer

API Version 2020-05-31


300
Amazon CloudFront API Reference
See Also

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


301
Amazon CloudFront API Reference
CloudFrontOriginAccessIdentitySummary

CloudFrontOriginAccessIdentitySummary
Summary of the information about a CloudFront origin access identity.

Contents
Comment

The comment for this origin access identity, as originally specified when created.

Type: String

Required: Yes
Id

The ID for the origin access identity. For example: E74FTE3AJFJ256A.

Type: String

Required: Yes
S3CanonicalUserId

The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin
access identity read permission to an object in Amazon S3.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


302
Amazon CloudFront API Reference
ContentTypeProfile

ContentTypeProfile
A field-level encryption content type profile.

Contents
ContentType

The content type for a field-level encryption content type-profile mapping.

Type: String

Required: Yes
Format

The format for a field-level encryption content type-profile mapping.

Type: String

Valid Values: URLEncoded

Required: Yes
ProfileId

The profile ID for a field-level encryption content type-profile mapping.

Type: String

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


303
Amazon CloudFront API Reference
ContentTypeProfileConfig

ContentTypeProfileConfig
The configuration for a field-level encryption content type-profile mapping.

Contents
ContentTypeProfiles

The configuration for a field-level encryption content type-profile.

Type: ContentTypeProfiles (p. 305) object

Required: No
ForwardWhenContentTypeIsUnknown

The setting in a field-level encryption content type-profile mapping that specifies what to do when
an unknown content type is provided for the profile. If true, content is forwarded without being
encrypted when the content type is unknown. If false (the default), an error is returned when the
content type is unknown.

Type: Boolean

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


304
Amazon CloudFront API Reference
ContentTypeProfiles

ContentTypeProfiles
Field-level encryption content type-profile.

Contents
Items

Items in a field-level encryption content type-profile mapping.

Type: Array of ContentTypeProfile (p. 303) objects

Required: No
Quantity

The number of field-level encryption content type-profile mappings.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


305
Amazon CloudFront API Reference
CookieNames

CookieNames
Contains a list of cookie names.

Contents
Items

A list of cookie names.

Type: Array of strings

Required: No
Quantity

The number of cookie names in the Items list.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


306
Amazon CloudFront API Reference
CookiePreference

CookiePreference
This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of
this field.

If you want to include cookies in the cache key, use CookiesConfig in a cache policy. See
CachePolicy.

If you want to send cookies to the origin but not include them in the cache key, use CookiesConfig in
an origin request policy. See OriginRequestPolicy.

A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so,
which ones. For more information about forwarding cookies to the origin, see Caching Content Based on
Cookies in the Amazon CloudFront Developer Guide.

Contents
Forward

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field.

If you want to include cookies in the cache key, use a cache policy. For more information, see
Creating cache policies in the Amazon CloudFront Developer Guide.

If you want to send cookies to the origin but not include them in the cache key, use origin request
policy. For more information, see Creating origin request policies in the Amazon CloudFront
Developer Guide.

Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of
cookies specified in the WhitelistedNames complex type.

Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon
S3 origin, specify none for the Forward element.

Type: String

Valid Values: none | whitelist | all

Required: Yes
WhitelistedNames

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field.

If you want to include cookies in the cache key, use a cache policy. For more information, see
Creating cache policies in the Amazon CloudFront Developer Guide.

If you want to send cookies to the origin but not include them in the cache key, use an origin
request policy. For more information, see Creating origin request policies in the Amazon CloudFront
Developer Guide.

Required if you specify whitelist for the value of Forward. A complex type that specifies how
many different cookies you want CloudFront to forward to the origin for this cache behavior and, if
you want to forward selected cookies, the names of those cookies.

If you specify all or none for the value of Forward, omit WhitelistedNames. If you change the
value of Forward from whitelist to all or none and you don't delete the WhitelistedNames
element and its child elements, CloudFront deletes them automatically.

API Version 2020-05-31


307
Amazon CloudFront API Reference
See Also

For the current limit on the number of cookie names that you can whitelist for each cache behavior,
see CloudFront Limits in the AWS General Reference.

Type: CookieNames (p. 306) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


308
Amazon CloudFront API Reference
CustomErrorResponse

CustomErrorResponse
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.

Contents
ErrorCachingMinTTL

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status
code specified in ErrorCode. When this time period has elapsed, CloudFront queries your origin to
see whether the problem that caused the error has been resolved and the requested object is now
available.

For more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.

Type: Long

Required: No
ErrorCode

The HTTP status code for which you want to specify a custom error page and/or a caching duration.

Type: Integer

Required: Yes
ResponseCode

The HTTP status code that you want CloudFront to return to the viewer along with the custom error
page. There are a variety of reasons that you might want CloudFront to return a status code different
from the status code that your origin returned to CloudFront, for example:
• Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx
and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the
response typically won't be intercepted.
• If you don't care about distinguishing among different client errors or server errors, you can
specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.
• You might want to return a 200 status code (OK) and static website so your customers don't know
that your website is down.

If you specify a value for ResponseCode, you must also specify a value for ResponsePagePath.

Type: String

Required: No
ResponsePagePath

The path to the custom error page that you want CloudFront to return to a viewer when your
origin returns the HTTP status code specified by ErrorCode, for example, /4xx-errors/403-
[Link]. If you want to store your objects and your custom error pages in different
locations, your distribution must include a cache behavior for which the following is true:

API Version 2020-05-31


309
Amazon CloudFront API Reference
See Also

• The value of PathPattern matches the path to your custom error messages. For example,
suppose you saved custom error pages for 4xx errors in an Amazon S3 bucket in a directory named
/4xx-errors. Your distribution must include a cache behavior for which the path pattern routes
requests for your custom error pages to that location, for example, /4xx-errors/*.
• The value of TargetOriginId specifies the value of the ID element for the origin that contains
your custom error pages.

If you specify a value for ResponsePagePath, you must also specify a value for ResponseCode.

We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error
pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files
that you want to return to viewers because the origin server is unavailable.

Type: String

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


310
Amazon CloudFront API Reference
CustomErrorResponses

CustomErrorResponses
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.

Contents
Items

A complex type that contains a CustomErrorResponse element for each HTTP status code for
which you want to specify a custom error page and/or a caching duration.

Type: Array of CustomErrorResponse (p. 309) objects

Required: No
Quantity

The number of HTTP status codes for which you want to specify a custom error page and/or a
caching duration. If Quantity is 0, you can omit Items.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


311
Amazon CloudFront API Reference
CustomHeaders

CustomHeaders
A complex type that contains the list of Custom Headers for each origin.

Contents
Items

Optional: A list that contains one OriginCustomHeader element for each custom header that you
want CloudFront to forward to the origin. If Quantity is 0, omit Items.

Type: Array of OriginCustomHeader (p. 368) objects

Required: No
Quantity

The number of custom headers, if any, for this distribution.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


312
Amazon CloudFront API Reference
CustomOriginConfig

CustomOriginConfig
A custom origin. A custom origin is any origin that is not an Amazon S3 bucket, with one exception. An
Amazon S3 bucket that is configured with static website hosting is a custom origin.

Contents
HTTPPort

The HTTP port that CloudFront uses to connect to the origin. Specify the HTTP port that the origin
listens on.

Type: Integer

Required: Yes
HTTPSPort

The HTTPS port that CloudFront uses to connect to the origin. Specify the HTTPS port that the
origin listens on.

Type: Integer

Required: Yes
OriginKeepaliveTimeout

Specifies how long, in seconds, CloudFront persists its connection to the origin. The minimum
timeout is 1 second, the maximum is 60 seconds, and the default (if you don’t specify otherwise) is 5
seconds.

For more information, see Origin Keep-alive Timeout in the Amazon CloudFront Developer Guide.

Type: Integer

Required: No
OriginProtocolPolicy

Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin. Valid values
are:
• http-only – CloudFront always uses HTTP to connect to the origin.
• match-viewer – CloudFront connects to the origin using the same protocol that the viewer used
to connect to CloudFront.
• https-only – CloudFront always uses HTTPS to connect to the origin.

Type: String

Valid Values: http-only | match-viewer | https-only

Required: Yes
OriginReadTimeout

Specifies how long, in seconds, CloudFront waits for a response from the origin. This is also known as
the origin response timeout. The minimum timeout is 1 second, the maximum is 60 seconds, and the
default (if you don’t specify otherwise) is 30 seconds.

For more information, see Origin Response Timeout in the Amazon CloudFront Developer Guide.

Type: Integer

API Version 2020-05-31


313
Amazon CloudFront API Reference
See Also

Required: No
OriginSslProtocols

Specifies the minimum SSL/TLS protocol that CloudFront uses when connecting to your origin over
HTTPS. Valid values include SSLv3, TLSv1, TLSv1.1, and TLSv1.2.

For more information, see Minimum Origin SSL Protocol in the Amazon CloudFront Developer Guide.

Type: OriginSslProtocols (p. 383) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


314
Amazon CloudFront API Reference
DefaultCacheBehavior

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

Contents
AllowedMethods

A complex type that controls which HTTP methods CloudFront processes and forwards to your
Amazon S3 bucket or your custom origin. There are three choices:
• CloudFront forwards only GET and HEAD requests.
• CloudFront forwards only GET, HEAD, and OPTIONS requests.
• CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests.

If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your
custom origin so users can't perform operations that you don't want them to. For example, you
might not want users to have permissions to delete objects from your origin.

Type: AllowedMethods (p. 281) object

Required: No
CachePolicyId

The unique identifier of the cache policy that is attached to the default cache behavior. For more
information, see Creating cache policies or Using the managed cache policies in the Amazon
CloudFront Developer Guide.

Type: String

Required: No
Compress

Whether you want CloudFront to automatically compress certain files for this cache behavior. If
so, specify true; if not, specify false. For more information, see Serving Compressed Files in the
Amazon CloudFront Developer Guide.

Type: Boolean

Required: No
DefaultTTL

This field is deprecated. We recommend that you use the DefaultTTL field in a cache policy instead
of this field. For more information, see Creating cache policies or Using the managed cache policies
in the Amazon CloudFront Developer Guide.

The default amount of time that you want objects to stay in CloudFront caches before CloudFront
forwards another request to your origin to determine whether the object has been updated. The
value that you specify applies only when your origin does not add HTTP headers such as Cache-
Control max-age, Cache-Control s-maxage, and Expires to objects. For more information,
see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront
Developer Guide.

Type: Long

Required: No

API Version 2020-05-31


315
Amazon CloudFront API Reference
Contents

FieldLevelEncryptionId

The value of ID for the field-level encryption configuration that you want CloudFront to use for
encrypting specific fields of data for the default cache behavior.

Type: String

Required: No
ForwardedValues

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field. For more information, see Working with policies in the Amazon CloudFront
Developer Guide.

If you want to include values in the cache key, use a cache policy. For more information, see Creating
cache policies or Using the managed cache policies in the Amazon CloudFront Developer Guide.

If you want to send values to the origin but not include them in the cache key, use an origin request
policy. For more information, see Creating origin request policies or Using the managed origin
request policies in the Amazon CloudFront Developer Guide.

A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

Type: ForwardedValues (p. 347) object

Required: No
LambdaFunctionAssociations

A complex type that contains zero or more Lambda function associations for a cache behavior.

Type: LambdaFunctionAssociations (p. 362) object

Required: No
MaxTTL

This field is deprecated. We recommend that you use the MaxTTL field in a cache policy instead of
this field. For more information, see Creating cache policies or Using the managed cache policies in
the Amazon CloudFront Developer Guide.

The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront
forwards another request to your origin to determine whether the object has been updated.
The value that you specify applies only when your origin adds HTTP headers such as Cache-
Control max-age, Cache-Control s-maxage, and Expires to objects. For more information,
see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront
Developer Guide.

Type: Long

Required: No
MinTTL

This field is deprecated. We recommend that you use the MinTTL field in a cache policy instead of
this field. For more information, see Creating cache policies or Using the managed cache policies in
the Amazon CloudFront Developer Guide.

The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront
forwards another request to your origin to determine whether the object has been updated. For
more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the
Amazon CloudFront Developer Guide.

API Version 2020-05-31


316
Amazon CloudFront API Reference
Contents

You must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin
(under Headers, if you specify 1 for Quantity and * for Name).

Type: Long

Required: No
OriginRequestPolicyId

The unique identifier of the origin request policy that is attached to the default cache behavior. For
more information, see Creating origin request policies or Using the managed origin request policies
in the Amazon CloudFront Developer Guide.

Type: String

Required: No
RealtimeLogConfigArn

The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache
behavior. For more information, see Real-time logs in the Amazon CloudFront Developer Guide.

Type: String

Required: No
SmoothStreaming

Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format
using the origin that is associated with this cache behavior. If so, specify true; if not, specify false.
If you specify true for SmoothStreaming, you can still distribute other content using this cache
behavior if the content matches the value of PathPattern.

Type: Boolean

Required: No
TargetOriginId

The value of ID for the origin that you want CloudFront to route requests to when they use the
default cache behavior.

Type: String

Required: Yes
TrustedSigners

A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs
for private content.

If you want to require signed URLs in requests for objects in the target origin that match the
PathPattern for this cache behavior, specify true for Enabled, and specify the applicable values
for Quantity and Items. For more information, see Serving Private Content with Signed URLs and
Signed Cookies in the Amazon CloudFront Developer Guide.

If you don’t want to require signed URLs in requests for objects that match PathPattern, specify
false for Enabled and 0 for Quantity. Omit Items.

To add, change, or remove one or more trusted signers, change Enabled to true (if it’s currently
false), change Quantity as applicable, and specify all of the trusted signers that you want to
include in the updated distribution.

Type: TrustedSigners (p. 418) object

API Version 2020-05-31


317
Amazon CloudFront API Reference
See Also

Required: Yes
ViewerProtocolPolicy

The protocol that viewers can use to access the files in the origin specified by TargetOriginId
when a request matches the path pattern in PathPattern. You can specify the following options:
• allow-all: Viewers can use HTTP or HTTPS.
• redirect-to-https: If a viewer submits an HTTP request, CloudFront returns an HTTP status
code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then
resubmits the request using the new URL.
• https-only: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403
(Forbidden).

For more information about requiring the HTTPS protocol, see Requiring HTTPS Between Viewers
and CloudFront in the Amazon CloudFront Developer Guide.
Note
The only way to guarantee that viewers retrieve an object that was fetched from the origin
using HTTPS is never to use any other protocol to fetch the object. If you have recently
changed from HTTP to HTTPS, we recommend that you clear your objects’ cache because
cached objects are protocol agnostic. That means that an edge location will return an object
from the cache regardless of whether the current request protocol matches the protocol
used previously. For more information, see Managing Cache Expiration in the Amazon
CloudFront Developer Guide.

Type: String

Valid Values: allow-all | https-only | redirect-to-https

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


318
Amazon CloudFront API Reference
Distribution

Distribution
A distribution tells CloudFront where you want content to be delivered from, and the details about how
to track and manage content delivery.

Contents
ActiveTrustedSigners

CloudFront automatically adds this element to the response only if you've set up the distribution to
serve private content with signed URLs. The element lists the key pair IDs that CloudFront is aware
of for each trusted signer. The Signer child element lists the AWS account number of the trusted
signer (or an empty Self element if the signer is you). The Signer element also includes the IDs
of any active key pairs associated with the trusted signer's AWS account. If no KeyPairId element
appears for a Signer, that signer can't create working signed URLs.

Type: ActiveTrustedSigners (p. 278) object

Required: Yes
AliasICPRecordals

AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they
want to serve content publicly on an alternate domain name, also known as a CNAME, that they've
added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
distributions.

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started
with AWS services in China.

Type: Array of AliasICPRecordal (p. 280) objects

Required: No
ARN

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

Type: String

Required: Yes
DistributionConfig

The current configuration information for the distribution. Send a GET request to the /CloudFront
API version/distribution ID/config resource.

Type: DistributionConfig (p. 321) object

Required: Yes
DomainName

The domain name corresponding to the distribution, for example,


[Link].

Type: String

Required: Yes

API Version 2020-05-31


319
Amazon CloudFront API Reference
See Also

Id

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String

Required: Yes
InProgressInvalidationBatches

The number of invalidation batches currently in progress.

Type: Integer

Required: Yes
LastModifiedTime

The date and time the distribution was last modified.

Type: Timestamp

Required: Yes
Status

This response element indicates the current status of the distribution. When the status is Deployed,
the distribution's information is fully propagated to all CloudFront edge locations.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


320
Amazon CloudFront API Reference
DistributionConfig

DistributionConfig
A distribution configuration.

Contents
Aliases

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

Type: Aliases (p. 279) object

Required: No
CacheBehaviors

A complex type that contains zero or more CacheBehavior elements.

Type: CacheBehaviors (p. 288) object

Required: No
CallerReference

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the DistributionConfig


object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String

Required: Yes
Comment

Any comments you want to include about the distribution.

If you don't want to specify a comment, include an empty Comment element.

To delete an existing comment, update the distribution configuration and include an empty
Comment element.

To add or change a comment, update the distribution configuration and specify the new comment.

Type: String

Required: Yes
CustomErrorResponses

A complex type that controls the following:


• 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.

API Version 2020-05-31


321
Amazon CloudFront API Reference
Contents

Type: CustomErrorResponses (p. 311) object

Required: No
DefaultCacheBehavior

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: DefaultCacheBehavior (p. 315) object

Required: Yes
DefaultRootObject

The object that you want CloudFront to request from your origin (for example, [Link])
when a viewer requests the root URL for your distribution ([Link] instead
of an object in your distribution ([Link]
Specifying a default root object avoids exposing the contents of your distribution.

Specify only the object name, for example, [Link]. Don't add a / before the object name.

If you don't want to specify a default root object when you create a distribution, include an empty
DefaultRootObject element.

To delete the default root object from an existing distribution, update the distribution configuration
and include an empty DefaultRootObject element.

To replace the default root object, update the distribution configuration and specify the new object.

For more information about the default root object, see Creating a Default Root Object in the
Amazon CloudFront Developer Guide.

Type: String

Required: No
Enabled

From this field, you can enable or disable the selected distribution.

Type: Boolean

Required: Yes
HttpVersion

(Optional) 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
automatically use an earlier HTTP version.

For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support
Server Name Identification (SNI).

In general, configuring CloudFront to communicate with viewers using HTTP/2 reduces latency. You
can improve performance by optimizing for HTTP/2. For more information, do an Internet search for
"http/2 optimization."

Type: String

Valid Values: http1.1 | http2

Required: No

API Version 2020-05-31


322
Amazon CloudFront API Reference
Contents

IsIPV6Enabled

If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution,
specify true. If you specify false, CloudFront responds to IPv6 DNS requests with the DNS
response code NOERROR and with no IP addresses. This allows viewers to submit a second request,
for an IPv4 address for your distribution.

In general, you should enable IPv6 if you have users on IPv6 networks who want to access your
content. However, if you're using signed URLs or signed cookies to restrict access to your content,
and if you're using a custom policy that includes the IpAddress parameter to restrict the IP
addresses that can access your content, don't enable IPv6. If you want to restrict access to some
content by IP address and not restrict access to other content (or restrict access but not by IP
address), you can create two distributions. For more information, see Creating a Signed URL Using a
Custom Policy in the Amazon CloudFront Developer Guide.

If you're using an Amazon Route 53 alias resource record set to route traffic to your CloudFront
distribution, you need to create a second alias resource record set when both of the following are
true:
• You enable IPv6 for the distribution
• You're using alternate domain names in the URLs for your objects

For more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your
Domain Name in the Amazon Route 53 Developer Guide.

If you created a CNAME resource record set, either with Amazon Route 53 or with another DNS
service, you don't need to make any changes. A CNAME record will route traffic to your distribution
regardless of the IP address format of the viewer request.

Type: Boolean

Required: No
Logging

A complex type that controls whether access logs are written for the distribution.

For more information about logging, see Access Logs in the Amazon CloudFront Developer Guide.

Type: LoggingConfig (p. 363) object

Required: No
OriginGroups

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

Type: OriginGroups (p. 373) object

Required: No
Origins

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

Type: Origins (p. 382) object

Required: Yes
PriceClass

The price class that corresponds with the maximum price that you want to pay for CloudFront
service. If you specify PriceClass_All, CloudFront responds to requests for your objects from all
CloudFront edge locations.

API Version 2020-05-31


323
Amazon CloudFront API Reference
See Also

If you specify a price class other than PriceClass_All, CloudFront serves your objects from the
CloudFront edge location that has the lowest latency among the edge locations in your price class.
Viewers who are in or near regions that are excluded from your specified price class may encounter
slower performance.

For more information about price classes, see Choosing the Price Class for a CloudFront Distribution
in the Amazon CloudFront Developer Guide. For information about CloudFront pricing, including how
price classes (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing.
For price class information, scroll down to see the table at the bottom of the page.

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: No
Restrictions

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

Type: Restrictions (p. 400) object

Required: No
ViewerCertificate

A complex type that determines the distribution’s SSL/TLS configuration for communicating with
viewers.

Type: ViewerCertificate (p. 419) object

Required: No
WebACLId

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.
To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for example
arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-
f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using AWS WAF Classic, use the
ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that
are forwarded to CloudFront, and lets you control access to your content. Based on conditions that
you specify, such as the IP addresses that requests originate from or the values of query strings,
CloudFront responds to requests either with the requested content or with an HTTP 403 status code
(Forbidden). You can also configure CloudFront to return a custom error page when a request is
blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.

Type: String

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


324
Amazon CloudFront API Reference
See Also

API Version 2020-05-31


325
Amazon CloudFront API Reference
DistributionConfigWithTags

DistributionConfigWithTags
A distribution Configuration and a list of tags to be associated with the distribution.

Contents
DistributionConfig

A distribution configuration.

Type: DistributionConfig (p. 321) object

Required: Yes
Tags

A complex type that contains zero or more Tag elements.

Type: Tags (p. 417) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


326
Amazon CloudFront API Reference
DistributionIdList

DistributionIdList
A list of distribution IDs.

Contents
IsTruncated

A flag that indicates whether more distribution IDs remain to be listed. If your results were
truncated, you can make a subsequent request using the Marker request field to retrieve more
distribution IDs in the list.

Type: Boolean

Required: Yes
Items

Contains the distribution IDs in the list.

Type: Array of strings

Required: No
Marker

The value provided in the Marker request field.

Type: String

Required: Yes
MaxItems

The maximum number of distribution IDs requested.

Type: Integer

Required: Yes
NextMarker

Contains the value that you should use in the Marker field of a subsequent request to continue
listing distribution IDs where you left off.

Type: String

Required: No
Quantity

The total number of distribution IDs returned in the response.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2020-05-31


327
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


328
Amazon CloudFront API Reference
DistributionList

DistributionList
A distribution list.

Contents
IsTruncated

A flag that indicates whether more distributions remain to be listed. If your results were truncated,
you can make a follow-up pagination request using the Marker request parameter to retrieve more
distributions in the list.

Type: Boolean

Required: Yes
Items

A complex type that contains one DistributionSummary element for each distribution that was
created by the current AWS account.

Type: Array of DistributionSummary (p. 331) objects

Required: No
Marker

The value you provided for the Marker request parameter.

Type: String

Required: Yes
MaxItems

The value you provided for the MaxItems request parameter.

Type: Integer

Required: Yes
NextMarker

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your distributions where they left off.

Type: String

Required: No
Quantity

The number of distributions that were created by the current AWS account.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2020-05-31


329
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


330
Amazon CloudFront API Reference
DistributionSummary

DistributionSummary
A summary of the information about a CloudFront distribution.

Contents
Aliases

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

Type: Aliases (p. 279) object

Required: Yes
AliasICPRecordals

AWS services in China customers must file for an Internet Content Provider (ICP) recordal if they
want to serve content publicly on an alternate domain name, also known as a CNAME, that they've
added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
distributions.

For more information about ICP recordals, see Signup, Accounts, and Credentials in Getting Started
with AWS services in China.

Type: Array of AliasICPRecordal (p. 280) objects

Required: No
ARN

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

Type: String

Required: Yes
CacheBehaviors

A complex type that contains zero or more CacheBehavior elements.

Type: CacheBehaviors (p. 288) object

Required: Yes
Comment

The comment originally specified when this distribution was created.

Type: String

Required: Yes
CustomErrorResponses

A complex type that contains zero or more CustomErrorResponses elements.

Type: CustomErrorResponses (p. 311) object

Required: Yes

API Version 2020-05-31


331
Amazon CloudFront API Reference
Contents

DefaultCacheBehavior

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: DefaultCacheBehavior (p. 315) object

Required: Yes
DomainName

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


[Link].

Type: String

Required: Yes
Enabled

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

Type: Boolean

Required: Yes
HttpVersion

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.

Type: String

Valid Values: http1.1 | http2

Required: Yes
Id

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Type: String

Required: Yes
IsIPV6Enabled

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

Type: Boolean

Required: Yes
LastModifiedTime

The date and time the distribution was last modified.

Type: Timestamp

Required: Yes
OriginGroups

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

API Version 2020-05-31


332
Amazon CloudFront API Reference
See Also

Type: OriginGroups (p. 373) object

Required: No
Origins

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

Type: Origins (p. 382) object

Required: Yes
PriceClass

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

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: Yes
Restrictions

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

Type: Restrictions (p. 400) object

Required: Yes
Status

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

Type: String

Required: Yes
ViewerCertificate

A complex type that determines the distribution’s SSL/TLS configuration for communicating with
viewers.

Type: ViewerCertificate (p. 419) object

Required: Yes
WebACLId

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

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java

API Version 2020-05-31


333
Amazon CloudFront API Reference
See Also

• AWS SDK for Ruby V3

API Version 2020-05-31


334
Amazon CloudFront API Reference
EncryptionEntities

EncryptionEntities
Complex data type for field-level encryption profiles that includes all of the encryption entities.

Contents
Items

An array of field patterns in a field-level encryption content type-profile mapping.

Type: Array of EncryptionEntity (p. 336) objects

Required: No
Quantity

Number of field pattern items in a field-level encryption content type-profile mapping.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


335
Amazon CloudFront API Reference
EncryptionEntity

EncryptionEntity
Complex data type for field-level encryption profiles that includes the encryption key and field pattern
specifications.

Contents
FieldPatterns

Field patterns in a field-level encryption content type profile specify the fields that you want to be
encrypted. You can provide the full field name, or any beginning characters followed by a wildcard
(*). You can't overlap field patterns. For example, you can't have both ABC* and AB*. Note that field
patterns are case-sensitive.

Type: FieldPatterns (p. 346) object

Required: Yes
ProviderId

The provider associated with the public key being used for encryption. This value must also be
provided with the private key for applications to be able to decrypt data.

Type: String

Required: Yes
PublicKeyId

The public key associated with a set of field-level encryption patterns, to be used when encrypting
the fields that match the patterns.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


336
Amazon CloudFront API Reference
EndPoint

EndPoint
Contains information about the Amazon Kinesis data stream where you are sending real-time log data in
a real-time log configuration.

Contents
KinesisStreamConfig

Contains information about the Amazon Kinesis data stream where you are sending real-time log
data.

Type: KinesisStreamConfig (p. 359) object

Required: No
StreamType

The type of data stream where you are sending real-time log data. The only valid value is Kinesis.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


337
Amazon CloudFront API Reference
FieldLevelEncryption

FieldLevelEncryption
A complex data type that includes the profile configurations and other options specified for field-level
encryption.

Contents
FieldLevelEncryptionConfig

A complex data type that includes the profile configurations specified for field-level encryption.

Type: FieldLevelEncryptionConfig (p. 339) object

Required: Yes
Id

The configuration ID for a field-level encryption configuration which includes a set of profiles that
specify certain selected data fields to be encrypted by specific public keys.

Type: String

Required: Yes
LastModifiedTime

The last time the field-level encryption configuration was changed.

Type: Timestamp

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


338
Amazon CloudFront API Reference
FieldLevelEncryptionConfig

FieldLevelEncryptionConfig
A complex data type that includes the profile configurations specified for field-level encryption.

Contents
CallerReference

A unique number that ensures the request can't be replayed.

Type: String

Required: Yes
Comment

An optional comment about the configuration.

Type: String

Required: No
ContentTypeProfileConfig

A complex data type that specifies when to forward content if a content type isn't recognized and
profiles to use as by default in a request if a query argument doesn't specify a profile to use.

Type: ContentTypeProfileConfig (p. 304) object

Required: No
QueryArgProfileConfig

A complex data type that specifies when to forward content if a profile isn't found and the profile
that can be provided as a query argument in a request.

Type: QueryArgProfileConfig (p. 392) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


339
Amazon CloudFront API Reference
FieldLevelEncryptionList

FieldLevelEncryptionList
List of field-level encrpytion configurations.

Contents
Items

An array of field-level encryption items.

Type: Array of FieldLevelEncryptionSummary (p. 345) objects

Required: No
MaxItems

The maximum number of elements you want in the response body.

Type: Integer

Required: Yes
NextMarker

If there are more elements to be listed, this element is present and contains the value that you can
use for the Marker request parameter to continue listing your configurations where you left off.

Type: String

Required: No
Quantity

The number of field-level encryption items.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


340
Amazon CloudFront API Reference
FieldLevelEncryptionProfile

FieldLevelEncryptionProfile
A complex data type for field-level encryption profiles.

Contents
FieldLevelEncryptionProfileConfig

A complex data type that includes the profile name and the encryption entities for the field-level
encryption profile.

Type: FieldLevelEncryptionProfileConfig (p. 342) object

Required: Yes
Id

The ID for a field-level encryption profile configuration which includes a set of profiles that specify
certain selected data fields to be encrypted by specific public keys.

Type: String

Required: Yes
LastModifiedTime

The last time the field-level encryption profile was updated.

Type: Timestamp

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


341
Amazon CloudFront API Reference
FieldLevelEncryptionProfileConfig

FieldLevelEncryptionProfileConfig
A complex data type of profiles for the field-level encryption.

Contents
CallerReference

A unique number that ensures that the request can't be replayed.

Type: String

Required: Yes
Comment

An optional comment for the field-level encryption profile.

Type: String

Required: No
EncryptionEntities

A complex data type of encryption entities for the field-level encryption profile that include the
public key ID, provider, and field patterns for specifying which fields to encrypt with this key.

Type: EncryptionEntities (p. 335) object

Required: Yes
Name

Profile name for the field-level encryption profile.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


342
Amazon CloudFront API Reference
FieldLevelEncryptionProfileList

FieldLevelEncryptionProfileList
List of field-level encryption profiles.

Contents
Items

The field-level encryption profile items.

Type: Array of FieldLevelEncryptionProfileSummary (p. 344) objects

Required: No
MaxItems

The maximum number of field-level encryption profiles you want in the response body.

Type: Integer

Required: Yes
NextMarker

If there are more elements to be listed, this element is present and contains the value that you can
use for the Marker request parameter to continue listing your profiles where you left off.

Type: String

Required: No
Quantity

The number of field-level encryption profiles.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


343
Amazon CloudFront API Reference
FieldLevelEncryptionProfileSummary

FieldLevelEncryptionProfileSummary
The field-level encryption profile summary.

Contents
Comment

An optional comment for the field-level encryption profile summary.

Type: String

Required: No
EncryptionEntities

A complex data type of encryption entities for the field-level encryption profile that include the
public key ID, provider, and field patterns for specifying which fields to encrypt with this key.

Type: EncryptionEntities (p. 335) object

Required: Yes
Id

ID for the field-level encryption profile summary.

Type: String

Required: Yes
LastModifiedTime

The time when the the field-level encryption profile summary was last updated.

Type: Timestamp

Required: Yes
Name

Name for the field-level encryption profile summary.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


344
Amazon CloudFront API Reference
FieldLevelEncryptionSummary

FieldLevelEncryptionSummary
A summary of a field-level encryption item.

Contents
Comment

An optional comment about the field-level encryption item.

Type: String

Required: No
ContentTypeProfileConfig

A summary of a content type-profile mapping.

Type: ContentTypeProfileConfig (p. 304) object

Required: No
Id

The unique ID of a field-level encryption item.

Type: String

Required: Yes
LastModifiedTime

The last time that the summary of field-level encryption items was modified.

Type: Timestamp

Required: Yes
QueryArgProfileConfig

A summary of a query argument-profile mapping.

Type: QueryArgProfileConfig (p. 392) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


345
Amazon CloudFront API Reference
FieldPatterns

FieldPatterns
A complex data type that includes the field patterns to match for field-level encryption.

Contents
Items

An array of the field-level encryption field patterns.

Type: Array of strings

Required: No
Quantity

The number of field-level encryption field patterns.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


346
Amazon CloudFront API Reference
ForwardedValues

ForwardedValues
This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of
this field.

If you want to include values in the cache key, use a cache policy. For more information, see Creating
cache policies in the Amazon CloudFront Developer Guide.

If you want to send values to the origin but not include them in the cache key, use an origin request
policy. For more information, see Creating origin request policies in the Amazon CloudFront Developer
Guide.

A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

Contents
Cookies

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field.

If you want to include cookies in the cache key, use a cache policy. For more information, see
Creating cache policies in the Amazon CloudFront Developer Guide.

If you want to send cookies to the origin but not include them in the cache key, use an origin
request policy. For more information, see Creating origin request policies in the Amazon CloudFront
Developer Guide.

A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if
so, which ones. For more information about forwarding cookies to the origin, see How CloudFront
Forwards, Caches, and Logs Cookies in the Amazon CloudFront Developer Guide.

Type: CookiePreference (p. 307) object

Required: Yes
Headers

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field.

If you want to include headers in the cache key, use a cache policy. For more information, see
Creating cache policies in the Amazon CloudFront Developer Guide.

If you want to send headers to the origin but not include them in the cache key, use an origin
request policy. For more information, see Creating origin request policies in the Amazon CloudFront
Developer Guide.

A complex type that specifies the Headers, if any, that you want CloudFront to forward to the
origin for this cache behavior (whitelisted headers). For the headers that you specify, CloudFront also
caches separate versions of a specified object that is based on the header values in viewer requests.

For more information, see Caching Content Based on Request Headers in the Amazon CloudFront
Developer Guide.

Type: Headers (p. 352) object

Required: No

API Version 2020-05-31


347
Amazon CloudFront API Reference
See Also

QueryString

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field.

If you want to include query strings in the cache key, use a cache policy. For more information, see
Creating cache policies in the Amazon CloudFront Developer Guide.

If you want to send query strings to the origin but not include them in the cache key, use an origin
request policy. For more information, see Creating origin request policies in the Amazon CloudFront
Developer Guide.

Indicates whether you want CloudFront to forward query strings to the origin that is associated with
this cache behavior and cache based on the query string parameters. CloudFront behavior depends
on the value of QueryString and on the values that you specify for QueryStringCacheKeys, if
any:

If you specify true for QueryString and you don't specify any values for QueryStringCacheKeys,
CloudFront forwards all query string parameters to the origin and caches based on all query
string parameters. Depending on how many query string parameters and values you have, this can
adversely affect performance because CloudFront must forward more requests to the origin.

If you specify true for QueryString and you specify one or more values for
QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only
caches based on the query string parameters that you specify.

If you specify false for QueryString, CloudFront doesn't forward any query string parameters to
the origin, and doesn't cache based on query string parameters.

For more information, see Configuring CloudFront to Cache Based on Query String Parameters in the
Amazon CloudFront Developer Guide.

Type: Boolean

Required: Yes
QueryStringCacheKeys

This field is deprecated. We recommend that you use a cache policy or an origin request policy
instead of this field.

If you want to include query strings in the cache key, use a cache policy. For more information, see
Creating cache policies in the Amazon CloudFront Developer Guide.

If you want to send query strings to the origin but not include them in the cache key, use an origin
request policy. For more information, see Creating origin request policies in the Amazon CloudFront
Developer Guide.

A complex type that contains information about the query string parameters that you want
CloudFront to use for caching for this cache behavior.

Type: QueryStringCacheKeys (p. 394) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++

API Version 2020-05-31


348
Amazon CloudFront API Reference
See Also

• AWS SDK for Go


• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


349
Amazon CloudFront API Reference
GeoRestriction

GeoRestriction
A complex type that controls the countries in which your content is distributed. CloudFront determines
the location of your users using MaxMind GeoIP databases.

Contents
Items

A complex type that contains a Location element for each country in which you want CloudFront
either to distribute your content (whitelist) or not distribute your content (blacklist).

The Location element is a two-letter, uppercase country code for a country that you want to
include in your blacklist or whitelist. Include one Location element for each country.

CloudFront and MaxMind both use ISO 3166 country codes. For the current list of countries and
the corresponding codes, see ISO 3166-1-alpha-2 code on the International Organization for
Standardization website. You can also refer to the country list on the CloudFront console, which
includes both country names and codes.

Type: Array of strings

Required: No
Quantity

When geo restriction is enabled, this is the number of countries in your whitelist or blacklist.
Otherwise, when it is not enabled, Quantity is 0, and you can omit Items.

Type: Integer

Required: Yes
RestrictionType

The method that you want to use to restrict distribution of your content by country:
• none: No geo restriction is enabled, meaning access to content is not restricted by client geo
location.
• blacklist: The Location elements specify the countries in which you don't want CloudFront to
distribute your content.
• whitelist: The Location elements specify the countries in which you want CloudFront to
distribute your content.

Type: String

Valid Values: blacklist | whitelist | none

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java

API Version 2020-05-31


350
Amazon CloudFront API Reference
See Also

• AWS SDK for Ruby V3

API Version 2020-05-31


351
Amazon CloudFront API Reference
Headers

Headers
Contains a list of HTTP header names.

Contents
Items

A list of HTTP header names.

Type: Array of strings

Required: No
Quantity

The number of header names in the Items list.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


352
Amazon CloudFront API Reference
Invalidation

Invalidation
An invalidation.

Contents
CreateTime

The date and time the invalidation request was first made.

Type: Timestamp

Required: Yes
Id

The identifier for the invalidation request. For example: IDFDVBD632BHDS5.

Type: String

Required: Yes
InvalidationBatch

The current invalidation information for the batch request.

Type: InvalidationBatch (p. 354) object

Required: Yes
Status

The status of the invalidation request. When the invalidation batch is finished, the status is
Completed.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


353
Amazon CloudFront API Reference
InvalidationBatch

InvalidationBatch
An invalidation batch.

Contents
CallerReference

A value that you specify to uniquely identify an invalidation request. CloudFront uses the value
to prevent you from accidentally resubmitting an identical request. Whenever you create a new
invalidation request, you must specify a new value for CallerReference and change other values
in the request as applicable. One way to ensure that the value of CallerReference is unique is to
use a timestamp, for example, 20120301090000.

If you make a second invalidation request with the same value for CallerReference, and if the
rest of the request is the same, CloudFront doesn't create a new invalidation request. Instead,
CloudFront returns information about the invalidation request that you previously created with the
same CallerReference.

If CallerReference is a value you already sent in a previous invalidation batch request


but the content of any Path is different from the original request, CloudFront returns an
InvalidationBatchAlreadyExists error.

Type: String

Required: Yes
Paths

A complex type that contains information about the objects that you want to invalidate. For more
information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide.

Type: Paths (p. 386) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


354
Amazon CloudFront API Reference
InvalidationList

InvalidationList
The InvalidationList complex type describes the list of invalidation objects. For more information
about invalidation, see Invalidating Objects (Web Distributions Only) in the Amazon CloudFront Developer
Guide.

Contents
IsTruncated

A flag that indicates whether more invalidation batch requests remain to be listed. If your results
were truncated, you can make a follow-up pagination request using the Marker request parameter
to retrieve more invalidation batches in the list.

Type: Boolean

Required: Yes
Items

A complex type that contains one InvalidationSummary element for each invalidation batch
created by the current AWS account.

Type: Array of InvalidationSummary (p. 357) objects

Required: No
Marker

The value that you provided for the Marker request parameter.

Type: String

Required: Yes
MaxItems

The value that you provided for the MaxItems request parameter.

Type: Integer

Required: Yes
NextMarker

If IsTruncated is true, this element is present and contains the value that you can use for the
Marker request parameter to continue listing your invalidation batches where they left off.

Type: String

Required: No
Quantity

The number of invalidation batches that were created by the current AWS account.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2020-05-31


355
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


356
Amazon CloudFront API Reference
InvalidationSummary

InvalidationSummary
A summary of an invalidation request.

Contents
CreateTime

The time that an invalidation request was created.

Type: Timestamp

Required: Yes
Id

The unique ID for an invalidation request.

Type: String

Required: Yes
Status

The status of an invalidation request.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


357
Amazon CloudFront API Reference
KeyPairIds

KeyPairIds
A complex type that lists the active CloudFront key pairs, if any, that are associated with
AwsAccountNumber.

For more information, see ActiveTrustedSigners.

Contents
Items

A complex type that lists the active CloudFront key pairs, if any, that are associated with
AwsAccountNumber.

For more information, see ActiveTrustedSigners.

Type: Array of strings

Required: No
Quantity

The number of active CloudFront key pairs for AwsAccountNumber.

For more information, see ActiveTrustedSigners.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


358
Amazon CloudFront API Reference
KinesisStreamConfig

KinesisStreamConfig
Contains information about the Amazon Kinesis data stream where you are sending real-time log data.

Contents
RoleARN

The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that
CloudFront can use to send real-time log data to your Kinesis data stream.

For more information the IAM role, see Real-time log configuration IAM role in the Amazon
CloudFront Developer Guide.

Type: String

Required: Yes
StreamARN

The Amazon Resource Name (ARN) of the Kinesis data stream where you are sending real-time log
data.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


359
Amazon CloudFront API Reference
LambdaFunctionAssociation

LambdaFunctionAssociation
A complex type that contains a Lambda function association.

Contents
EventType

Specifies the event type that triggers a Lambda function invocation. You can specify the following
values:
• viewer-request: The function executes when CloudFront receives a request from a viewer and
before it checks to see whether the requested object is in the edge cache.
• origin-request: The function executes only when CloudFront sends a request to your origin.
When the requested object is in the edge cache, the function doesn't execute.
• origin-response: The function executes after CloudFront receives a response from the origin
and before it caches the object in the response. When the requested object is in the edge cache,
the function doesn't execute.
• viewer-response: The function executes before CloudFront returns the requested object to the
viewer. The function executes regardless of whether the object was already in the edge cache.

If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute.

Type: String

Valid Values: viewer-request | viewer-response | origin-request | origin-


response

Required: Yes
IncludeBody

A flag that allows a Lambda function to have read access to the body content. For more information,
see Accessing the Request Body by Choosing the Include Body Option in the Amazon CloudFront
Developer Guide.

Type: Boolean

Required: No
LambdaFunctionARN

The ARN of the Lambda function. You must specify the ARN of a function version; you can't specify a
Lambda alias or $LATEST.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


360
Amazon CloudFront API Reference
See Also

API Version 2020-05-31


361
Amazon CloudFront API Reference
LambdaFunctionAssociations

LambdaFunctionAssociations
A complex type that specifies a list of Lambda functions associations for a cache behavior.

If you want to invoke one or more Lambda functions triggered by requests that match the PathPattern
of the cache behavior, specify the applicable values for Quantity and Items. Note that there can be up
to 4 LambdaFunctionAssociation items in this list (one for each possible value of EventType) and
each EventType can be associated with the Lambda function only once.

If you don't want to invoke any Lambda functions for the requests that match PathPattern, specify 0
for Quantity and omit Items.

Contents
Items

Optional: A complex type that contains LambdaFunctionAssociation items for this cache
behavior. If Quantity is 0, you can omit Items.

Type: Array of LambdaFunctionAssociation (p. 360) objects

Required: No
Quantity

The number of Lambda function associations for this cache behavior.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


362
Amazon CloudFront API Reference
LoggingConfig

LoggingConfig
A complex type that controls whether access logs are written for the distribution.

Contents
Bucket

The Amazon S3 bucket to store the access logs in, for example,
[Link].

Type: String

Required: Yes
Enabled

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't
want to enable logging when you create a distribution or if you want to disable logging for
an existing distribution, specify false for Enabled, and specify empty Bucket and Prefix
elements. If you specify false for Enabled but you specify values for Bucket, prefix, and
IncludeCookies, the values are automatically deleted.

Type: Boolean

Required: Yes
IncludeCookies

Specifies whether you want CloudFront to include cookies in access logs, specify true for
IncludeCookies. If you choose to include cookies in logs, CloudFront logs all cookies regardless
of how you configure the cache behaviors for this distribution. If you don't want to include cookies
when you create a distribution or if you want to disable include cookies for an existing distribution,
specify false for IncludeCookies.

Type: Boolean

Required: Yes
Prefix

An optional string that you want CloudFront to prefix to the access log filenames for this
distribution, for example, myprefix/. If you want to enable logging, but you don't want to specify a
prefix, you still must include an empty Prefix element in the Logging element.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


363
Amazon CloudFront API Reference
See Also

API Version 2020-05-31


364
Amazon CloudFront API Reference
MonitoringSubscription

MonitoringSubscription
A monitoring subscription. This structure contains information about whether additional CloudWatch
metrics are enabled for a given CloudFront distribution.

Contents
RealtimeMetricsSubscriptionConfig

A subscription configuration for additional CloudWatch metrics.

Type: RealtimeMetricsSubscriptionConfig (p. 399) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


365
Amazon CloudFront API Reference
Origin

Origin
An origin.

An origin is the location where content is stored, and from which CloudFront gets content to serve to
viewers. To specify an origin:

• Use the S3OriginConfig type to specify an Amazon S3 bucket that is not configured with static
website hosting.
• Use the CustomOriginConfig type to specify various other kinds of content containers or HTTP
servers, including:
• An Amazon S3 bucket that is configured with static website hosting
• An Elastic Load Balancing load balancer
• An AWS Elemental MediaPackage origin
• An AWS Elemental MediaStore container
• Any other HTTP server, running on an Amazon EC2 instance or any other kind of host

For the current maximum number of origins that you can specify per distribution, see General Quotas on
Web Distributions in the Amazon CloudFront Developer Guide (quotas were formerly referred to as limits).

Contents
ConnectionAttempts

The number of times that CloudFront attempts to connect to the origin. The minimum number is 1,
the maximum is 3, and the default (if you don’t specify otherwise) is 3.

For a custom origin (including an Amazon S3 bucket that’s configured with static website hosting),
this value also specifies the number of times that CloudFront attempts to get a response from the
origin, in the case of an Origin Response Timeout.

For more information, see Origin Connection Attempts in the Amazon CloudFront Developer Guide.

Type: Integer

Required: No
ConnectionTimeout

The number of seconds that CloudFront waits when trying to establish a connection to the origin.
The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don’t specify
otherwise) is 10 seconds.

For more information, see Origin Connection Timeout in the Amazon CloudFront Developer Guide.

Type: Integer

Required: No
CustomHeaders

A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.

For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront
Developer Guide.

Type: CustomHeaders (p. 312) object

API Version 2020-05-31


366
Amazon CloudFront API Reference
See Also

Required: No
CustomOriginConfig

Use this type to specify an origin that is a content container or HTTP server, including an Amazon S3
bucket that is configured with static website hosting. To specify an Amazon S3 bucket that is not
configured with static website hosting, use the S3OriginConfig type instead.

Type: CustomOriginConfig (p. 313) object

Required: No
DomainName

The domain name for the origin.

For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.

Type: String

Required: Yes
Id

A unique identifier for the origin. This value must be unique within the distribution.

Use this value to specify the TargetOriginId in a CacheBehavior or DefaultCacheBehavior.

Type: String

Required: Yes
OriginPath

An optional path that CloudFront appends to the origin domain name when CloudFront requests
content from the origin.

For more information, see Origin Path in the Amazon CloudFront Developer Guide.

Type: String

Required: No
S3OriginConfig

Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static
website hosting. To specify any other type of origin, including an Amazon S3 bucket that is
configured with static website hosting, use the CustomOriginConfig type instead.

Type: S3OriginConfig (p. 402) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


367
Amazon CloudFront API Reference
OriginCustomHeader

OriginCustomHeader
A complex type that contains HeaderName and HeaderValue elements, if any, for this distribution.

Contents
HeaderName

The name of a header that you want CloudFront to send to your origin. For more information, see
Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.

Type: String

Required: Yes
HeaderValue

The value for the header that you specified in the HeaderName field.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


368
Amazon CloudFront API Reference
OriginGroup

OriginGroup
An origin group includes two origins (a primary origin and a second origin to failover to) and a failover
criteria that you specify. You create an origin group to support origin failover in CloudFront. When
you create or update a distribution, you can specifiy the origin group instead of a single origin, and
CloudFront will failover from the primary origin to the second origin under the failover conditions that
you've chosen.

Contents
FailoverCriteria

A complex type that contains information about the failover criteria for an origin group.

Type: OriginGroupFailoverCriteria (p. 370) object

Required: Yes
Id

The origin group's ID.

Type: String

Required: Yes
Members

A complex type that contains information about the origins in an origin group.

Type: OriginGroupMembers (p. 372) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


369
Amazon CloudFront API Reference
OriginGroupFailoverCriteria

OriginGroupFailoverCriteria
A complex data type that includes information about the failover criteria for an origin group, including
the status codes for which CloudFront will failover from the primary origin to the second origin.

Contents
StatusCodes

The status codes that, when returned from the primary origin, will trigger CloudFront to failover to
the second origin.

Type: StatusCodes (p. 404) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


370
Amazon CloudFront API Reference
OriginGroupMember

OriginGroupMember
An origin in an origin group.

Contents
OriginId

The ID for an origin in an origin group.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


371
Amazon CloudFront API Reference
OriginGroupMembers

OriginGroupMembers
A complex data type for the origins included in an origin group.

Contents
Items

Items (origins) in an origin group.

Type: Array of OriginGroupMember (p. 371) objects

Array Members: Fixed number of 2 items.

Required: Yes
Quantity

The number of origins in an origin group.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


372
Amazon CloudFront API Reference
OriginGroups

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

Contents
Items

The items (origin groups) in a distribution.

Type: Array of OriginGroup (p. 369) objects

Required: No
Quantity

The number of origin groups.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


373
Amazon CloudFront API Reference
OriginRequestPolicy

OriginRequestPolicy
An origin request policy.

When it’s attached to a cache behavior, the origin request policy determines the values that CloudFront
includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes
the following:

• The request body and the URL path (without the domain name) from the viewer request.
• The headers that CloudFront automatically includes in every origin request, including Host, User-
Agent, and X-Amz-Cf-Id.
• All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin
request policy. These can include items from the viewer request and, in the case of headers, additional
ones that are added by CloudFront.

CloudFront sends a request when it can’t find an object in its cache that matches the request. If you want
to send values to the origin and also include them in the cache key, use CachePolicy.

Contents
Id

The unique identifier for the origin request policy.

Type: String

Required: Yes
LastModifiedTime

The date and time when the origin request policy was last modified.

Type: Timestamp

Required: Yes
OriginRequestPolicyConfig

The origin request policy configuration.

Type: OriginRequestPolicyConfig (p. 375) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


374
Amazon CloudFront API Reference
OriginRequestPolicyConfig

OriginRequestPolicyConfig
An origin request policy configuration.

This configuration determines the values that CloudFront includes in requests that it sends to the origin.
Each request that CloudFront sends to the origin includes the following:

• The request body and the URL path (without the domain name) from the viewer request.
• The headers that CloudFront automatically includes in every origin request, including Host, User-
Agent, and X-Amz-Cf-Id.
• All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin
request policy. These can include items from the viewer request and, in the case of headers, additional
ones that are added by CloudFront.

CloudFront sends a request when it can’t find an object in its cache that matches the request. If you want
to send values to the origin and also include them in the cache key, use CachePolicy.

Contents
Comment

A comment to describe the origin request policy.

Type: String

Required: No
CookiesConfig

The cookies from viewer requests to include in origin requests.

Type: OriginRequestPolicyCookiesConfig (p. 377) object

Required: Yes
HeadersConfig

The HTTP headers to include in origin requests. These can include headers from viewer requests and
additional headers added by CloudFront.

Type: OriginRequestPolicyHeadersConfig (p. 378) object

Required: Yes
Name

A unique name to identify the origin request policy.

Type: String

Required: Yes
QueryStringsConfig

The URL query strings from viewer requests to include in origin requests.

Type: OriginRequestPolicyQueryStringsConfig (p. 380) object

Required: Yes

API Version 2020-05-31


375
Amazon CloudFront API Reference
See Also

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


376
Amazon CloudFront API Reference
OriginRequestPolicyCookiesConfig

OriginRequestPolicyCookiesConfig
An object that determines whether any cookies in viewer requests (and if so, which cookies) are included
in requests that CloudFront sends to the origin.

Contents
CookieBehavior

Determines whether cookies in viewer requests are included in requests that CloudFront sends to the
origin. Valid values are:
• none – Cookies in viewer requests are not included in requests that CloudFront sends to the origin.
Even when this field is set to none, any cookies that are listed in a CachePolicy are included in
origin requests.
• whitelist – The cookies in viewer requests that are listed in the CookieNames type are included
in requests that CloudFront sends to the origin.
• all – All cookies in viewer requests are included in requests that CloudFront sends to the origin.

Type: String

Valid Values: none | whitelist | all

Required: Yes
Cookies

Contains a list of cookie names.

Type: CookieNames (p. 306) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


377
Amazon CloudFront API Reference
OriginRequestPolicyHeadersConfig

OriginRequestPolicyHeadersConfig
An object that determines whether any HTTP headers (and if so, which headers) are included in requests
that CloudFront sends to the origin.

Contents
HeaderBehavior

Determines whether any HTTP headers are included in requests that CloudFront sends to the origin.
Valid values are:
• none – HTTP headers are not included in requests that CloudFront sends to the origin. Even
when this field is set to none, any headers that are listed in a CachePolicy are included in origin
requests.
• whitelist – The HTTP headers that are listed in the Headers type are included in requests that
CloudFront sends to the origin.
• allViewer – All HTTP headers in viewer requests are included in requests that CloudFront sends
to the origin.
• allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and the additional
CloudFront headers that are listed in the Headers type are included in requests that CloudFront
sends to the origin. The additional headers are added by CloudFront.

Type: String

Valid Values: none | whitelist | allViewer | allViewerAndWhitelistCloudFront

Required: Yes
Headers

Contains a list of HTTP header names.

Type: Headers (p. 352) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


378
Amazon CloudFront API Reference
OriginRequestPolicyList

OriginRequestPolicyList
A list of origin request policies.

Contents
Items

Contains the origin request policies in the list.

Type: Array of OriginRequestPolicySummary (p. 381) objects

Required: No
MaxItems

The maximum number of origin request policies requested.

Type: Integer

Required: Yes
NextMarker

If there are more items in the list than are in this response, this element is present. It contains the
value that you should use in the Marker field of a subsequent request to continue listing origin
request policies where you left off.

Type: String

Required: No
Quantity

The total number of origin request policies returned in the response.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


379
Amazon CloudFront API Reference
OriginRequestPolicyQueryStringsConfig

OriginRequestPolicyQueryStringsConfig
An object that determines whether any URL query strings in viewer requests (and if so, which query
strings) are included in requests that CloudFront sends to the origin.

Contents
QueryStringBehavior

Determines whether any URL query strings in viewer requests are included in requests that
CloudFront sends to the origin. Valid values are:
• none – Query strings in viewer requests are not included in requests that CloudFront sends to the
origin. Even when this field is set to none, any query strings that are listed in a CachePolicy are
included in origin requests.
• whitelist – The query strings in viewer requests that are listed in the QueryStringNames type
are included in requests that CloudFront sends to the origin.
• all – All query strings in viewer requests are included in requests that CloudFront sends to the
origin.

Type: String

Valid Values: none | whitelist | all

Required: Yes
QueryStrings

Contains a list of the query strings in viewer requests that are included in requests that CloudFront
sends to the origin.

Type: QueryStringNames (p. 395) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


380
Amazon CloudFront API Reference
OriginRequestPolicySummary

OriginRequestPolicySummary
Contains an origin request policy.

Contents
OriginRequestPolicy

The origin request policy.

Type: OriginRequestPolicy (p. 374) object

Required: Yes
Type

The type of origin request policy, either managed (created by AWS) or custom (created in this AWS
account).

Type: String

Valid Values: managed | custom

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


381
Amazon CloudFront API Reference
Origins

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

Contents
Items

A complex type that contains origins or origin groups for this distribution.

Type: Array of Origin (p. 366) objects

Array Members: Minimum number of 1 item.

Required: Yes
Quantity

The number of origins or origin groups for this distribution.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


382
Amazon CloudFront API Reference
OriginSslProtocols

OriginSslProtocols
A complex type that contains information about the SSL/TLS protocols that CloudFront can use when
establishing an HTTPS connection with your origin.

Contents
Items

A list that contains allowed SSL/TLS protocols for this distribution.

Type: Array of strings

Valid Values: SSLv3 | TLSv1 | TLSv1.1 | TLSv1.2

Required: Yes
Quantity

The number of SSL/TLS protocols that you want to allow CloudFront to use when establishing an
HTTPS connection with this origin.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


383
Amazon CloudFront API Reference
ParametersInCacheKeyAndForwardedToOrigin

ParametersInCacheKeyAndForwardedToOrigin
This object determines the values that CloudFront includes in the cache key. These values can include
HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its
cache that it can return to the viewer.

The headers, cookies, and query strings that are included in the cache key are automatically included in
requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find an object in
its cache that matches the request’s cache key. If you want to send values to the origin but not include
them in the cache key, use OriginRequestPolicy.

Contents
CookiesConfig

An object that determines whether any cookies in viewer requests (and if so, which cookies) are
included in the cache key and automatically included in requests that CloudFront sends to the origin.

Type: CachePolicyCookiesConfig (p. 293) object

Required: Yes
EnableAcceptEncodingGzip

A flag that determines whether the Accept-Encoding HTTP header is included in the cache key
and included in requests that CloudFront sends to the origin.

If this field is true and the viewer request includes the Accept-Encoding header, then CloudFront
normalizes the value of the viewer’s Accept-Encoding header to one of the following:
• Accept-Encoding: gzip (if gzip is in the viewer’s Accept-Encoding header)
• Accept-Encoding: identity (if gzip is not in the viewer’s Accept-Encoding header)

CloudFront includes the normalized header in the cache key and includes it in requests that
CloudFront sends to the origin.

If this field is false, then CloudFront treats the Accept-Encoding header the same as any other
HTTP header in the viewer request. By default, it’s not included in the cache key and it’s not included
in origin requests. You can manually add Accept-Encoding to the headers whitelist like any other
HTTP header.

When this field is true, you should not whitelist the Accept-Encoding header in the cache policy
or in an origin request policy attached to the same cache behavior.

For more information, see Cache compressed objects in the Amazon CloudFront Developer Guide.

Type: Boolean

Required: Yes
HeadersConfig

An object that determines whether any HTTP headers (and if so, which headers) are included in the
cache key and automatically included in requests that CloudFront sends to the origin.

Type: CachePolicyHeadersConfig (p. 294) object

Required: Yes

API Version 2020-05-31


384
Amazon CloudFront API Reference
See Also

QueryStringsConfig

An object that determines whether any URL query strings in viewer requests (and if so, which query
strings) are included in the cache key and automatically included in requests that CloudFront sends
to the origin.

Type: CachePolicyQueryStringsConfig (p. 296) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


385
Amazon CloudFront API Reference
Paths

Paths
A complex type that contains information about the objects that you want to invalidate. For more
information, see Specifying the Objects to Invalidate in the Amazon CloudFront Developer Guide.

Contents
Items

A complex type that contains a list of the paths that you want to invalidate.

Type: Array of strings

Required: No
Quantity

The number of invalidation paths specified for the objects that you want to invalidate.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


386
Amazon CloudFront API Reference
PublicKey

PublicKey
A complex data type of public keys you add to CloudFront to use with features like field-level encryption.

Contents
CreatedTime

A time you added a public key to CloudFront.

Type: Timestamp

Required: Yes
Id

A unique ID assigned to a public key you've added to CloudFront.

Type: String

Required: Yes
PublicKeyConfig

A complex data type for a public key you add to CloudFront to use with features like field-level
encryption.

Type: PublicKeyConfig (p. 388) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


387
Amazon CloudFront API Reference
PublicKeyConfig

PublicKeyConfig
Information about a public key you add to CloudFront to use with features like field-level encryption.

Contents
CallerReference

A unique number that ensures that the request can't be replayed.

Type: String

Required: Yes
Comment

An optional comment about a public key.

Type: String

Required: No
EncodedKey

The encoded public key that you want to add to CloudFront to use with features like field-level
encryption.

Type: String

Required: Yes
Name

The name for a public key you add to CloudFront to use with features like field-level encryption.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


388
Amazon CloudFront API Reference
PublicKeyList

PublicKeyList
A list of public keys you've added to CloudFront to use with features like field-level encryption.

Contents
Items

An array of information about a public key you add to CloudFront to use with features like field-level
encryption.

Type: Array of PublicKeySummary (p. 390) objects

Required: No
MaxItems

The maximum number of public keys you want in the response body.

Type: Integer

Required: Yes
NextMarker

If there are more elements to be listed, this element is present and contains the value that you can
use for the Marker request parameter to continue listing your public keys where you left off.

Type: String

Required: No
Quantity

The number of public keys you added to CloudFront to use with features like field-level encryption.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


389
Amazon CloudFront API Reference
PublicKeySummary

PublicKeySummary
A complex data type for public key information.

Contents
Comment

Comment for public key information summary.

Type: String

Required: No
CreatedTime

Creation time for public key information summary.

Type: Timestamp

Required: Yes
EncodedKey

Encoded key for public key information summary.

Type: String

Required: Yes
Id

ID for public key information summary.

Type: String

Required: Yes
Name

Name for public key information summary.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


390
Amazon CloudFront API Reference
QueryArgProfile

QueryArgProfile
Query argument-profile mapping for field-level encryption.

Contents
ProfileId

ID of profile to use for field-level encryption query argument-profile mapping

Type: String

Required: Yes
QueryArg

Query argument for field-level encryption query argument-profile mapping.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


391
Amazon CloudFront API Reference
QueryArgProfileConfig

QueryArgProfileConfig
Configuration for query argument-profile mapping for field-level encryption.

Contents
ForwardWhenQueryArgProfileIsUnknown

Flag to set if you want a request to be forwarded to the origin even if the profile specified by the
field-level encryption query argument, fle-profile, is unknown.

Type: Boolean

Required: Yes
QueryArgProfiles

Profiles specified for query argument-profile mapping for field-level encryption.

Type: QueryArgProfiles (p. 393) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


392
Amazon CloudFront API Reference
QueryArgProfiles

QueryArgProfiles
Query argument-profile mapping for field-level encryption.

Contents
Items

Number of items for query argument-profile mapping for field-level encryption.

Type: Array of QueryArgProfile (p. 391) objects

Required: No
Quantity

Number of profiles for query argument-profile mapping for field-level encryption.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


393
Amazon CloudFront API Reference
QueryStringCacheKeys

QueryStringCacheKeys
This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of
this field.

If you want to include query strings in the cache key, use QueryStringsConfig in a cache policy. See
CachePolicy.

If you want to send query strings to the origin but not include them in the cache key, use
QueryStringsConfig in an origin request policy. See OriginRequestPolicy.

A complex type that contains information about the query string parameters that you want CloudFront
to use for caching for a cache behavior.

Contents
Items

A list that contains the query string parameters that you want CloudFront to use as a basis for
caching for a cache behavior. If Quantity is 0, you can omit Items.

Type: Array of strings

Required: No
Quantity

The number of whitelisted query string parameters for a cache behavior.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


394
Amazon CloudFront API Reference
QueryStringNames

QueryStringNames
Contains a list of query string names.

Contents
Items

A list of query string names.

Type: Array of strings

Required: No
Quantity

The number of query string names in the Items list.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


395
Amazon CloudFront API Reference
RealtimeLogConfig

RealtimeLogConfig
A real-time log configuration.

Contents
ARN

The Amazon Resource Name (ARN) of this real-time log configuration.

Type: String

Required: Yes
EndPoints

Contains information about the Amazon Kinesis data stream where you are sending real-time log
data for this real-time log configuration.

Type: Array of EndPoint (p. 337) objects

Required: Yes
Fields

A list of fields that are included in each real-time log record. In an API response, the fields are
provided in the same order in which they are sent to the Amazon Kinesis data stream.

For more information about fields, see Real-time log configuration fields in the Amazon CloudFront
Developer Guide.

Type: Array of strings

Required: Yes
Name

The unique name of this real-time log configuration.

Type: String

Required: Yes
SamplingRate

The sampling rate for this real-time log configuration. The sampling rate determines the percentage
of viewer requests that are represented in the real-time log data. The sampling rate is an integer
between 1 and 100, inclusive.

Type: Long

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java

API Version 2020-05-31


396
Amazon CloudFront API Reference
See Also

• AWS SDK for Ruby V3

API Version 2020-05-31


397
Amazon CloudFront API Reference
RealtimeLogConfigs

RealtimeLogConfigs
A list of real-time log configurations.

Contents
IsTruncated

A flag that indicates whether there are more real-time log configurations than are contained in this
list.

Type: Boolean

Required: Yes
Items

Contains the list of real-time log configurations.

Type: Array of RealtimeLogConfig (p. 396) objects

Required: No
Marker

This parameter indicates where this list of real-time log configurations begins. This list includes real-
time log configurations that occur after the marker.

Type: String

Required: Yes
MaxItems

The maximum number of real-time log configurations requested.

Type: Integer

Required: Yes
NextMarker

If there are more items in the list than are in this response, this element is present. It contains the
value that you should use in the Marker field of a subsequent request to continue listing real-time
log configurations where you left off.

Type: String

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


398
Amazon CloudFront API Reference
RealtimeMetricsSubscriptionConfig

RealtimeMetricsSubscriptionConfig
A subscription configuration for additional CloudWatch metrics.

Contents
RealtimeMetricsSubscriptionStatus

A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront
distribution.

Type: String

Valid Values: Enabled | Disabled

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


399
Amazon CloudFront API Reference
Restrictions

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

Contents
GeoRestriction

A complex type that controls the countries in which your content is distributed. CloudFront
determines the location of your users using MaxMind GeoIP databases.

Type: GeoRestriction (p. 350) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


400
Amazon CloudFront API Reference
S3Origin

S3Origin
A complex type that contains information about the Amazon S3 bucket from which you want CloudFront
to get your media files for distribution.

Contents
DomainName

The DNS name of the Amazon S3 origin.

Type: String

Required: Yes
OriginAccessIdentity

The CloudFront origin access identity to associate with the distribution. Use an origin access identity
to configure the distribution so that end users can only access objects in an Amazon S3 bucket
through CloudFront.

If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3
URL, specify an empty OriginAccessIdentity element.

To delete the origin access identity from an existing distribution, update the distribution
configuration and include an empty OriginAccessIdentity element.

To replace the origin access identity, update the distribution configuration and specify the new origin
access identity.

For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3
Content in the Amazon CloudFront Developer Guide.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


401
Amazon CloudFront API Reference
S3OriginConfig

S3OriginConfig
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin or
an S3 bucket that is configured as a website endpoint, use the CustomOriginConfig element instead.

Contents
OriginAccessIdentity

The CloudFront origin access identity to associate with the origin. Use an origin access identity
to configure the origin so that viewers can only access objects in an Amazon S3 bucket through
CloudFront. The format of the value is:

origin-access-identity/cloudfront/ID-of-origin-access-identity

where ID-of-origin-access-identity is the value that CloudFront returned in the ID


element when you created the origin access identity.

If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3
URL, specify an empty OriginAccessIdentity element.

To delete the origin access identity from an existing distribution, update the distribution
configuration and include an empty OriginAccessIdentity element.

To replace the origin access identity, update the distribution configuration and specify the new origin
access identity.

For more information about the origin access identity, see Serving Private Content through
CloudFront in the Amazon CloudFront Developer Guide.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


402
Amazon CloudFront API Reference
Signer

Signer
A complex type that lists the AWS accounts that were included in the TrustedSigners complex type, as
well as their active CloudFront key pair IDs, if any.

Contents
AwsAccountNumber

An AWS account that is included in the TrustedSigners complex type for this distribution. Valid
values include:
• self, which is the AWS account used to create the distribution.
• An AWS account number.

Type: String

Required: No
KeyPairIds

A complex type that lists the active CloudFront key pairs, if any, that are associated with
AwsAccountNumber.

Type: KeyPairIds (p. 358) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


403
Amazon CloudFront API Reference
StatusCodes

StatusCodes
A complex data type for the status codes that you specify that, when returned by a primary origin,
trigger CloudFront to failover to a second origin.

Contents
Items

The items (status codes) for an origin group.

Type: Array of integers

Array Members: Minimum number of 1 item.

Required: Yes
Quantity

The number of status codes.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


404
Amazon CloudFront API Reference
StreamingDistribution

StreamingDistribution
A streaming distribution tells CloudFront where you want RTMP content to be delivered from, and the
details about how to track and manage content delivery.

Contents
ActiveTrustedSigners

A complex type that lists the AWS accounts, if any, that you included in the TrustedSigners
complex type for this distribution. These are the accounts that you want to allow to create signed
URLs for private content.

The Signer complex type lists the AWS account number of the trusted signer or self if the signer
is the AWS account that created the distribution. The Signer element also includes the IDs of
any active CloudFront key pairs that are associated with the trusted signer's AWS account. If no
KeyPairId element appears for a Signer, that signer can't create signed URLs.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Type: ActiveTrustedSigners (p. 278) object

Required: Yes
ARN

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

Type: String

Required: Yes
DomainName

The domain name that corresponds to the streaming distribution, for example,
[Link].

Type: String

Required: Yes
Id

The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.

Type: String

Required: Yes
LastModifiedTime

The date and time that the distribution was last modified.

Type: Timestamp

Required: No
Status

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

API Version 2020-05-31


405
Amazon CloudFront API Reference
See Also

Type: String

Required: Yes
StreamingDistributionConfig

The current configuration information for the RTMP distribution.

Type: StreamingDistributionConfig (p. 407) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


406
Amazon CloudFront API Reference
StreamingDistributionConfig

StreamingDistributionConfig
The RTMP distribution's configuration information.

Contents
Aliases

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

Type: Aliases (p. 279) object

Required: No
CallerReference

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the


StreamingDistributionConfig object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution,
CloudFront returns a DistributionAlreadyExists error.

Type: String

Required: Yes
Comment

Any comments you want to include about the streaming distribution.

Type: String

Required: Yes
Enabled

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

Type: Boolean

Required: Yes
Logging

A complex type that controls whether access logs are written for the streaming distribution.

Type: StreamingLoggingConfig (p. 414) object

Required: No
PriceClass

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

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: No

API Version 2020-05-31


407
Amazon CloudFront API Reference
See Also

S3Origin

A complex type that contains information about the Amazon S3 bucket from which you want
CloudFront to get your media files for distribution.

Type: S3Origin (p. 401) object

Required: Yes
TrustedSigners

A complex type that specifies any AWS accounts that you want to permit to create signed URLs for
private content. If you want the distribution to use signed URLs, include this element; if you want
the distribution to use public URLs, remove this element. For more information, see Serving Private
Content through CloudFront in the Amazon CloudFront Developer Guide.

Type: TrustedSigners (p. 418) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


408
Amazon CloudFront API Reference
StreamingDistributionConfigWithTags

StreamingDistributionConfigWithTags
A streaming distribution Configuration and a list of tags to be associated with the streaming distribution.

Contents
StreamingDistributionConfig

A streaming distribution Configuration.

Type: StreamingDistributionConfig (p. 407) object

Required: Yes
Tags

A complex type that contains zero or more Tag elements.

Type: Tags (p. 417) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


409
Amazon CloudFront API Reference
StreamingDistributionList

StreamingDistributionList
A streaming distribution list.

Contents
IsTruncated

A flag that indicates whether more streaming distributions remain to be listed. If your results were
truncated, you can make a follow-up pagination request using the Marker request parameter to
retrieve more distributions in the list.

Type: Boolean

Required: Yes
Items

A complex type that contains one StreamingDistributionSummary element for each


distribution that was created by the current AWS account.

Type: Array of StreamingDistributionSummary (p. 412) objects

Required: No
Marker

The value you provided for the Marker request parameter.

Type: String

Required: Yes
MaxItems

The value you provided for the MaxItems request parameter.

Type: Integer

Required: Yes
NextMarker

If IsTruncated is true, this element is present and contains the value you can use for the Marker
request parameter to continue listing your RTMP distributions where they left off.

Type: String

Required: No
Quantity

The number of streaming distributions that were created by the current AWS account.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2020-05-31


410
Amazon CloudFront API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


411
Amazon CloudFront API Reference
StreamingDistributionSummary

StreamingDistributionSummary
A summary of the information for a CloudFront streaming distribution.

Contents
Aliases

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

Type: Aliases (p. 279) object

Required: Yes
ARN

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

Type: String

Required: Yes
Comment

The comment originally specified when this distribution was created.

Type: String

Required: Yes
DomainName

The domain name corresponding to the distribution, for example,


[Link].

Type: String

Required: Yes
Enabled

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

Type: Boolean

Required: Yes
Id

The identifier for the distribution, for example, EDFDVBD632BHDS5.

Type: String

Required: Yes
LastModifiedTime

The date and time the distribution was last modified.

Type: Timestamp

API Version 2020-05-31


412
Amazon CloudFront API Reference
See Also

Required: Yes
PriceClass

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

Type: String

Valid Values: PriceClass_100 | PriceClass_200 | PriceClass_All

Required: Yes
S3Origin

A complex type that contains information about the Amazon S3 bucket from which you want
CloudFront to get your media files for distribution.

Type: S3Origin (p. 401) object

Required: Yes
Status

Indicates the current status of the distribution. When the status is Deployed, the distribution's
information is fully propagated throughout the Amazon CloudFront system.

Type: String

Required: Yes
TrustedSigners

A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs
for private content. If you want to require signed URLs in requests for objects in the target origin
that match the PathPattern for this cache behavior, specify true for Enabled, and specify the
applicable values for Quantity and [Link] you don't want to require signed URLs in requests for
objects that match PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
To add, change, or remove one or more trusted signers, change Enabled to true (if it's currently
false), change Quantity as applicable, and specify all of the trusted signers that you want to
include in the updated distribution.

For more information, see Serving Private Content through CloudFront in the Amazon CloudFront
Developer Guide.

Type: TrustedSigners (p. 418) object

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


413
Amazon CloudFront API Reference
StreamingLoggingConfig

StreamingLoggingConfig
A complex type that controls whether access logs are written for this streaming distribution.

Contents
Bucket

The Amazon S3 bucket to store the access logs in, for example,
[Link].

Type: String

Required: Yes
Enabled

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't
want to enable logging when you create a streaming distribution or if you want to disable logging
for an existing streaming distribution, specify false for Enabled, and specify empty Bucket and
Prefix elements. If you specify false for Enabled but you specify values for Bucket and Prefix,
the values are automatically deleted.

Type: Boolean

Required: Yes
Prefix

An optional string that you want CloudFront to prefix to the access log filenames for this streaming
distribution, for example, myprefix/. If you want to enable logging, but you don't want to specify a
prefix, you still must include an empty Prefix element in the Logging element.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


414
Amazon CloudFront API Reference
Tag

Tag
A complex type that contains Tag key and Tag value.

Contents
Key

A string that contains Tag key.

The string length should be between 1 and 128 characters. Valid characters include a-z, A-Z, 0-9,
space, and the special characters _ - . : / = + @.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: Yes
Value

A string that contains an optional Tag value.

The string length should be between 0 and 256 characters. Valid characters include a-z, A-Z, 0-9,
space, and the special characters _ - . : / = + @.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


415
Amazon CloudFront API Reference
TagKeys

TagKeys
A complex type that contains zero or more Tag elements.

Contents
Items

A complex type that contains Tag key elements.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


416
Amazon CloudFront API Reference
Tags

Tags
A complex type that contains zero or more Tag elements.

Contents
Items

A complex type that contains Tag elements.

Type: Array of Tag (p. 415) objects

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


417
Amazon CloudFront API Reference
TrustedSigners

TrustedSigners
A complex type that specifies the AWS accounts, if any, that you want to allow to create signed URLs for
private content.

If you want to require signed URLs in requests for objects in the target origin that match the
PathPattern for this cache behavior, specify true for Enabled, and specify the applicable values for
Quantity and Items. For more information, see Serving Private Content through CloudFront in the
Amazon CloudFront Developer Guide.

If you don't want to require signed URLs in requests for objects that match PathPattern, specify false
for Enabled and 0 for Quantity. Omit Items.

To add, change, or remove one or more trusted signers, change Enabled to true (if it's currently
false), change Quantity as applicable, and specify all of the trusted signers that you want to include
in the updated distribution.

For more information about updating the distribution configuration, see DistributionConfig in the
Amazon CloudFront API Reference.

Contents
Enabled

Specifies whether you want to require viewers to use signed URLs to access the files specified by
PathPattern and TargetOriginId.

Type: Boolean

Required: Yes
Items

Optional: A complex type that contains trusted signers for this cache behavior. If Quantity is 0, you
can omit Items.

Type: Array of strings

Required: No
Quantity

The number of trusted signers for this cache behavior.

Type: Integer

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


418
Amazon CloudFront API Reference
ViewerCertificate

ViewerCertificate
A complex type that determines the distribution’s SSL/TLS configuration for communicating with
viewers.

If the distribution doesn’t use Aliases (also known as alternate domain names or CNAMEs)—that is, if
the distribution uses the CloudFront domain name such as [Link]—set
CloudFrontDefaultCertificate to true and leave all other fields empty.

If the distribution uses Aliases (alternate domain names or CNAMEs), use the fields in this type to
specify the following settings:

• Which viewers the distribution accepts HTTPS connections from: only viewers that support server
name indication (SNI) (recommended), or all viewers including those that don’t support SNI.
• To accept HTTPS connections from only viewers that support SNI, set SSLSupportMethod to sni-
only. This is recommended. Most browsers and clients support SNI. (In CloudFormation, the field
name is SslSupportMethod. Note the different capitalization.)
• To accept HTTPS connections from all viewers, including those that don’t support SNI, set
SSLSupportMethod to vip. This is not recommended, and results in additional monthly charges
from CloudFront. (In CloudFormation, the field name is SslSupportMethod. Note the different
capitalization.)
• The minimum SSL/TLS protocol version that the distribution can use to communicate with viewers. To
specify a minimum version, choose a value for MinimumProtocolVersion. For more information, see
Security Policy in the Amazon CloudFront Developer Guide.
• The location of the SSL/TLS certificate, AWS Certificate Manager (ACM) (recommended) or AWS
Identity and Access Management (AWS IAM). You specify the location by setting a value in one of the
following fields (not both):
• ACMCertificateArn (In CloudFormation, this field name is AcmCertificateArn. Note the
different capitalization.)
• IAMCertificateId (In CloudFormation, this field name is IamCertificateId. Note the different
capitalization.)

All distributions support HTTPS connections from viewers. To require viewers to use HTTPS only,
or to redirect them from HTTP to HTTPS, use ViewerProtocolPolicy in the CacheBehavior or
DefaultCacheBehavior. To specify how CloudFront should use SSL/TLS to communicate with your
custom origin, use CustomOriginConfig.

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

Contents
ACMCertificateArn
Note
In CloudFormation, this field name is AcmCertificateArn. Note the different
capitalization.

If the distribution uses Aliases (alternate domain names or CNAMEs) and the SSL/TLS certificate
is stored in AWS Certificate Manager (ACM), provide the Amazon Resource Name (ARN) of the
ACM certificate. CloudFront only supports ACM certificates in the US East (N. Virginia) Region (us-
east-1).

If you specify an ACM certificate ARN, you must also specify values for MinimumProtocolVerison
and SSLSupportMethod. (In CloudFormation, the field name is SslSupportMethod. Note the
different capitalization.)

API Version 2020-05-31


419
Amazon CloudFront API Reference
Contents

Type: String

Required: No
Certificate

This field is deprecated. Use one of the following fields instead:


• ACMCertificateArn (In CloudFormation, this field name is AcmCertificateArn. Note the
different capitalization.)
• IAMCertificateId (In CloudFormation, this field name is IamCertificateId. Note the
different capitalization.)
• CloudFrontDefaultCertificate

Type: String

Required: No
CertificateSource

This field is deprecated. Use one of the following fields instead:


• ACMCertificateArn (In CloudFormation, this field name is AcmCertificateArn. Note the
different capitalization.)
• IAMCertificateId (In CloudFormation, this field name is IamCertificateId. Note the
different capitalization.)
• CloudFrontDefaultCertificate

Type: String

Valid Values: cloudfront | iam | acm

Required: No
CloudFrontDefaultCertificate

If the distribution uses the CloudFront domain name such as [Link],


set this field to true.

If the distribution uses Aliases (alternate domain names or CNAMEs), set this field to false and
specify values for the following fields:
• ACMCertificateArn or IAMCertificateId (specify a value for one, not both)

In CloudFormation, these field names are AcmCertificateArn and IamCertificateId. Note


the different capitalization.
• MinimumProtocolVersion
• SSLSupportMethod (In CloudFormation, this field name is SslSupportMethod. Note the
different capitalization.)

Type: Boolean

Required: No
IAMCertificateId
Note
In CloudFormation, this field name is IamCertificateId. Note the different
capitalization.

If the distribution uses Aliases (alternate domain names or CNAMEs) and the SSL/TLS certificate is
stored in AWS Identity and Access Management (AWS IAM), provide the ID of the IAM certificate.

API Version 2020-05-31


420
Amazon CloudFront API Reference
Contents

If you specify an IAM certificate ID, you must also specify values for MinimumProtocolVerison
and SSLSupportMethod. (In CloudFormation, the field name is SslSupportMethod. Note the
different capitalization.)

Type: String

Required: No
MinimumProtocolVersion

If the distribution uses Aliases (alternate domain names or CNAMEs), specify the security policy
that you want CloudFront to use for HTTPS connections with viewers. The security policy determines
two settings:
• The minimum SSL/TLS protocol that CloudFront can use to communicate with viewers.
• The ciphers that CloudFront can use to encrypt the content that it returns to viewers.

For more information, see Security Policy and Supported Protocols and Ciphers Between Viewers
and CloudFront in the Amazon CloudFront Developer Guide.
Note
On the CloudFront console, this setting is called Security Policy.

When you’re using SNI only (you set SSLSupportMethod to sni-only), you must specify TLSv1 or
higher. (In CloudFormation, the field name is SslSupportMethod. Note the different capitalization.)

If the distribution uses the CloudFront domain name such as [Link]


(you set CloudFrontDefaultCertificate to true), CloudFront automatically sets the security
policy to TLSv1 regardless of the value that you set here.

Type: String

Valid Values: SSLv3 | TLSv1 | TLSv1_2016 | TLSv1.1_2016 | TLSv1.2_2018 |


TLSv1.2_2019

Required: No
SSLSupportMethod
Note
In CloudFormation, this field name is SslSupportMethod. Note the different
capitalization.

If the distribution uses Aliases (alternate domain names or CNAMEs), specify which viewers the
distribution accepts HTTPS connections from.
• sni-only – The distribution accepts HTTPS connections from only viewers that support server
name indication (SNI). This is recommended. Most browsers and clients support SNI.
• vip – The distribution accepts HTTPS connections from all viewers including those that don’t
support SNI. This is not recommended, and results in additional monthly charges from CloudFront.
• static-ip - Do not specify this value unless your distribution has been enabled for this feature
by the CloudFront team. If you have a use case that requires static IP addresses for a distribution,
contact CloudFront through the AWS Support Center.

If the distribution uses the CloudFront domain name such as [Link],


don’t set a value for this field.

Type: String

Valid Values: sni-only | vip | static-ip

Required: No

API Version 2020-05-31


421
Amazon CloudFront API Reference
See Also

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V3

API Version 2020-05-31


422
Amazon CloudFront API Reference

Common Parameters
The following list contains the parameters that all actions use for signing Signature Version 4 requests
with a query string. Any action-specific parameters are listed in the topic for that action. For more
information about Signature Version 4, see Signature Version 4 Signing Process in the Amazon Web
Services General Reference.

Action

The action to be performed.

Type: string

Required: Yes
Version

The API version that the request is written for, expressed in the format YYYY-MM-DD.

Type: string

Required: Yes
X-Amz-Algorithm

The hash algorithm that you used to create the request signature.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Valid Values: AWS4-HMAC-SHA256

Required: Conditional
X-Amz-Credential

The credential scope value, which is a string that includes your access key, the date, the region you
are targeting, the service you are requesting, and a termination string ("aws4_request"). The value is
expressed in the following format: access_key/YYYYMMDD/region/service/aws4_request.

For more information, see Task 2: Create a String to Sign for Signature Version 4 in the Amazon Web
Services General Reference.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Required: Conditional
X-Amz-Date

The date that is used to create the signature. The format must be ISO 8601 basic format
(YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value:
20120325T120000Z.

Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for
signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is

API Version 2020-05-31


423
Amazon CloudFront API Reference

not required. When X-Amz-Date is used, it always overrides the value of the Date header. For
more information, see Handling Dates in Signature Version 4 in the Amazon Web Services General
Reference.

Type: string

Required: Conditional
X-Amz-Security-Token

The temporary security token that was obtained through a call to AWS Security Token Service (AWS
STS). For a list of services that support temporary security credentials from AWS Security Token
Service, go to AWS Services That Work with IAM in the IAM User Guide.

Condition: If you're using temporary security credentials from the AWS Security Token Service, you
must include the security token.

Type: string

Required: Conditional
X-Amz-Signature

Specifies the hex-encoded signature that was calculated from the string to sign and the derived
signing key.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Required: Conditional
X-Amz-SignedHeaders

Specifies all the HTTP headers that were included as part of the canonical request. For more
information about specifying signed headers, see Task 1: Create a Canonical Request For Signature
Version 4 in the Amazon Web Services General Reference.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Required: Conditional

API Version 2020-05-31


424
Amazon CloudFront API Reference

Common Errors
This section lists the errors common to the API actions of all AWS services. For errors specific to an API
action for this service, see the topic for that API action.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400


IncompleteSignature

The request signature does not conform to AWS standards.

HTTP Status Code: 400


InternalFailure

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500


InvalidAction

The action or operation requested is invalid. Verify that the action is typed correctly.

HTTP Status Code: 400


InvalidClientTokenId

The X.509 certificate or AWS access key ID provided does not exist in our records.

HTTP Status Code: 403


InvalidParameterCombination

Parameters that must not be used together were used together.

HTTP Status Code: 400


InvalidParameterValue

An invalid or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400


InvalidQueryParameter

The AWS query string is malformed or does not adhere to AWS standards.

HTTP Status Code: 400


MalformedQueryString

The query string contains a syntax error.

HTTP Status Code: 404


MissingAction

The request is missing an action or a required parameter.

HTTP Status Code: 400

API Version 2020-05-31


425
Amazon CloudFront API Reference

MissingAuthenticationToken

The request must contain either a valid (registered) AWS access key ID or X.509 certificate.

HTTP Status Code: 403


MissingParameter

A required parameter for the specified action is not supplied.

HTTP Status Code: 400


OptInRequired

The AWS access key ID needs a subscription for the service.

HTTP Status Code: 403


RequestExpired

The request reached the service more than 15 minutes after the date stamp on the request or more
than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp
on the request is more than 15 minutes in the future.

HTTP Status Code: 400


ServiceUnavailable

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503


ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400


ValidationError

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

API Version 2020-05-31


426

You might also like